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.
Syncfusion Feedback

Problem with ColHiddenEntries

Thread ID:

Created:

Updated:

Platform:

Replies:

71802 Feb 13,2008 06:35 PM UTC Feb 16,2008 06:39 AM UTC Windows Forms 1
loading
Tags: GridControl
Burke Harris
Asked On February 13, 2008 06:35 PM UTC

I am using v5.102.0.51 of the Syncfusion databound grid and I am having a problem getting the grid to display columns when after rebinding when there are a different number of columns in the second datasource. I have two 'views' the first has 25 columns and I use Model.Cols.Hidden = true; to hide about half of them. The problem comes in when I rebind to my second 'view' which has 17 columns only a few of which are hidden. The problem is that in the second smaller view there are columns I cannot get to appear using Model.Cols.Hidden = false;. I noticed that after binding the second view Model.ColHiddenEntries count is way too high as if it was not cleared by the rebind. Everything else appears to be ok, the missing column are in Binder.InternalColumns and have colWidths greater than zero but they still do not appear. If I go into the debugger immediate window and manuall try to set the Model.Cols.Hidden[] for every column I get to about 21 (although there are only 17 cols in the model) before it just hangs. The only work around I could come up with was to loop through the model columns and set all columns to visible before rebinding this makes the second view work as expected.

My question is is this a known issue? Is there a better work around?


SubhaSheela R [Syncfusion]
Replied On February 16, 2008 06:39 AM UTC

Hi Burke,

Thank you for using Syncfusion products.

I am not able to reproduce the issue of rebinding the data view in GDBG. You can call the ResetRange method by passing the column count value before rebinding the underlying data source. Please refer the below code snippet to achieve this:

this.gridDataBoundGrid1.Model.Cols.Hidden.ResetRange(1, this.gridDataBoundGrid1.Model.ColCount);


Please refer the sample in the below link which illustrates the above:

http://websamples.syncfusion.com//samples/Grid.Windows/F71802/main.htm

Please have a look at the above sample and if still the issue exists, could you please try reproducing it in the above sample and send us the modified sample, so that we could sort out the cause of the issue and provide you a solution.

Regards,
Subhasheela R



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.

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

;