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.

grid control exception

Thread ID:

Created:

Updated:

Platform:

Replies:

63316 Jul 2,2007 11:32 AM Jul 2,2007 11:47 AM Windows Forms 1
loading
Tags: GridControl
yaacov
Asked On July 2, 2007 11:32 AM

My application refesh two grid control every time period , each gridcontrol is laid on tab.

The refresh cycle is as follows :
a) begin update
b)set grid control rowscount to zero
c) grid insert range (1, x)
d) populate the grid with new data
e) end update + refresh

I have seen two problems that i need your help with :
1. how can i make the grid column width change with regrad to the data inserted to it ?

2. while moving the mouse over the grid or changing column border I am experiencing exception "value does not within the expected range" , I can't figure out why?
It would be nice to understand what the source of the exception, meaning and how to handel it.


haneefm [Syncfusion]
Replied On July 2, 2007 11:47 AM

Hi Yaacov,

Question 1:how can i make the grid column width change with regrad to the data inserted to it ?
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
You would have to call the ResizeToFit each time you rebind a grid. Here is a code:

this.grid.Model.ColWidths.ResizeToFit(GridRangeInfo.Table());

Question 2:while moving the mouse over the grid or changing column border I am experiencing exception "value does not within the expected range" , I can't figure out why?
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
The error which you have mentioned, is an indication of threading issues. Are there multiple threads involved in your appilcation? If so, please check the Knowledge Base(KB) article link below.
http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=78

Intermittant errors can be indications of threading issues. Any calls into the grid must be done on the thread that creates it, and you can use grid.InvokeRequired to check for this.
Here is a sample.
LoaddatainBackGroundThread.zip

Best 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.

;