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.
Unfortunately, activation email could not send to your email. Please try again.

Exception on setting column width

Thread ID:

Created:

Updated:

Platform:

Replies:

43240 Apr 19,2006 04:19 AM Apr 19,2006 05:07 AM Windows Forms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On April 19, 2006 04:19 AM

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 05:07 AM

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

CONFIRMATION

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.

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.

;