Exception on setting column width

Hi, I try to set the column widths of my grid on resize. I get the following exception when I do that .. Any clues??? Exception - System.ArgumentException. Additional information - negative key. Thanks Sheela

1 Reply

AD Administrator Syncfusion Team April 19, 2006 09:07 AM UTC

Hi Sheela, Normally this issue happens in the following reason. 1)Setting the ColWidths through Header Text (grid.Model.ColWidths["Header Text"] = 10) 2) If you are binding to any empty table that causing this issue ColWidths accepts either the column number or the mapping name. It will not accept the HeaderText. so try this, col.MappingName = "Name" grid.Model.ColWidths["Name"] = 10; // or grid.Model.ColWidths[5] = 10; // If it is added as the Fifth Column Let me know if this helps. Regards, Haneef

Loader.
Up arrow icon