Skip to main content

Microsoft Silverlight

Answered Question DataGrid Column adjustmentRSS Feed

(0)

RenukaPalani
RenukaPa...

Member

Member

161 points

173 Posts

DataGrid Column adjustment

Hai,

 

In a datagrid control, all the columns are aligned to left, there are more spaces on the right hand size if the size of the datagrid is large. how to make the column width adjustable based on the width of the datagrid control

 

 

Thanks

Renu

bryant
bryant

Star

Star

9937 points

1,629 Posts

Silverlight MVP

Re: DataGrid Column adjustment

You could use star sizing on the columns to scale them proportionally to the size of the grid. For an example see Jesse Liberty's post on sizing in Silverlight.

-- bryant

Blog | Twitter
_________________
Dont forget to click "Mark as Answer" on the post that helped you.

RenukaPalani
RenukaPa...

Member

Member

161 points

173 Posts

Re: DataGrid Column adjustment

Hai bryant,

 

Thanks for your reply,

I am asking for DataGrid control

 

Thanks

Renu

Amanda Wang - MSFT
Amanda W...

All-Star

All-Star

17241 points

1,466 Posts

Answered Question

Re: DataGrid Column adjustment

Hi,

You can try to  use  HorizontalContentAlignment to adjust the datagridcell's alignment.

Try to refer this thread: http://silverlight.net/forums/t/50162.aspx

Amanda Wang
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