Skip to main content

Microsoft Silverlight

Answered Question Problem In scrollbar control of a datagrid in silverlightRSS Feed

(0)

Manishe
Manishe

Member

Member

0 points

3 Posts

Problem In scrollbar control of a datagrid in silverlight

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

bharathkumars87
bharathk...

Member

Member

280 points

51 Posts

Re: Problem In scrollbar control of a datagrid in silverlight

 just explain more briefly .plz

 

bharath kumar.s
Please "Mark as Answer" if this post answered your question. :)

Manishe
Manishe

Member

Member

0 points

3 Posts

Re: Re: Problem In scrollbar control of a datagrid in silverlight

 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

bharathkumars87
bharathk...

Member

Member

280 points

51 Posts

Re: Re: Re: Problem In scrollbar control of a datagrid in silverlight

 ya try this it may help u,

add in datagrid

FrozenColumnCount="3"

bharath kumar.s
Please "Mark as Answer" if this post answered your question. :)

Manishe
Manishe

Member

Member

0 points

3 Posts

Re: Re: Re: Re: Problem In scrollbar control of a datagrid in silverlight

 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

 

Thanks

Min-Hong Tang - MSFT
Min-Hong...

Contributor

Contributor

3619 points

412 Posts

Answered Question

Re: Problem In scrollbar control of a datagrid in silverlight

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. 

Min-Hong Tang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities