Skip to main content
Home Forums Silverlight Design Designing with Silverlight Problem In scrollbar control of a datagrid in silverlight
5 replies. Latest Post by Min-Hong Tang - MSFT on November 3, 2009.
(0)
Manishe
Member
0 points
3 Posts
10-29-2009 4:16 AM |
I need a help.iam new to silverlight.I have a grid in my form and has few rows and columns of textboxes.If the column exceeds the width of the datagrid the scrollbar automatically comes,But when i use tab control in the grid it does jump to the next Column of the grid but the scrollbar does not sizes according to the position of the column..Thanks in advance
Manish
bharathk...
280 points
51 Posts
10-29-2009 4:25 AM |
just explain more briefly .plz
10-29-2009 6:55 AM |
LIke I have Datagrid contrl in my silverlight project.
Suppose i have 4 columns ot textbox in my grid and my grid's height and width is set .when i load my screen lets say only 3 will be visible bcos of the width set to the datagrid...
Then i Select on 1 row 1st column cell and press tab key it goes to 2nd column then again when i click tab it goes to 3rd column and again when i click it goes to the 4 column.But this Column wont be visible to the user bcos of the width of the datagrid so i have to manually click on the scroll bar to view this column....
So does Datagrid has a option whichautomatically adjust the scroll bar such that to view the 4th column
Thanks
10-29-2009 7:04 AM |
ya try this it may help u,
add in datagrid
FrozenColumnCount="3"
10-29-2009 7:34 AM |
Thanks for replying...It didnt work...it froze the first 3 colums and created a horizontal scrollbar for the 4th one but when i press tab from the 3rd column to 4th column it didnt show the fourth column bcos the scrollbar didnt move
Min-Hong...
Contributor
3619 points
412 Posts
11-03-2009 3:18 AM |
Hi,
Based on my knowledge , the datagrid control does not support such a funtion , the scroll bar will not scroll according to the selection of user.
You may create your own custom control implement a scroll-to-center. But if you only need to scroll the bar so that the column could be seen when you hit tab. Then you can add some logic in your keydown event.
Best Regards.