Can someone tell how to set GridViewDataColumn width to Auto in C#. Below is the sample code.
GridViewDataColumn firstName= new GridViewDataColumn();
firstName.Header = "FirstName";
firstName.Width= Auto ? //something like this?
Thanks,
Nalini
2 Answers, 1 is accepted
0
Accepted
Dimitrina
Telerik team
answered on 28 May 2015, 01:48 PM
Hello Nalini,
You can set the Width like so:
firstName.Width = new GridViewLength(0, GridViewLengthUnitType.Auto)
Regards,
Dimitrina
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items