We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Exception on setting column width

Thread ID:





43240 Apr 19,2006 08:19 AM UTC Apr 19,2006 09:07 AM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On April 19, 2006 08:19 AM UTC

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

Administrator [Syncfusion]
Replied On 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


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon