hi,
how i can resize the width of the column/field though if the field is auto or I want to assign the width
it shows the width of the field as Auto after i try to assign the field width during run time on particular scenarios
e.g
currentFields.Fields[fieldList[i]].Width =200 where fieldList[i] defines the particular column name
i get the width the of columns after System.Convert.ToInt32(currentField.CellWidthResolved);
and after that i resize the column and get that width and on some particular some rule i want to set to previous width how i can achieve that
Thanks
Munish
Hello Munish,
Thank you for your post. Unfortunately I am not sure I understand your question. Can you please attach a sample application showing the issue. You can also check the following code snippet if it can be of help to you:
Field field = this.dataGrid.DefaultFieldLayout.Fields[0];
// obtain resolved width
double d = field.CellWidthResolved;
// set the width to the resolved width
field.Width = new FieldLength(d, FieldLengthUnitType.Pixel);
// set the width to a specific value
field.Width = new FieldLength(200, FieldLengthUnitType.Pixel);
// set the width to the width initially set on application start-up
field.Width = FieldLength.InitialAuto;
// set the width to match the widest cell value in the current columns
field.Width = FieldLength.Auto;
Please do not hesitate to let me know if you have any further questions on this matter.
Sincerely,
Radko Kolev
Infragistics Inc.
www.infragistics.com/support
I am just checking if you have any further questions on this matter. Please do not hesitate to let me know if you do.