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

How to reset GridBoundColumns.

Thread ID:

Created:

Updated:

Platform:

Replies:

98805 Mar 31,2011 06:11 PM UTC Apr 8,2011 10:52 AM UTC Windows Forms 7
loading
Tags: GridControl
Alex Feldman
Asked On March 31, 2011 06:11 PM UTC

Hi,

I am having an issue resetting GridBoundColumns in my application. I will try to explain the issue on the attached example, although it's not easy to replicate and result is unpredictable.

By clicking "Once" button, different columns structure assign to the grid. Structure is generated randomly, using the same MappingName set ("COL_XX") and some columns are got hidden.Click "View" would populate text box with visible columns. "Reset" button suppose to reset columns and make all columns visible.

If user manually (on the screen, not programmatically) change ColWidth (some columns are get hidden by setting ColWidth to 0).
Also I move one or two columns around.

After 2-3 regeneration and playing around with ColWidth and hiding Columns. I've got into the state where I could not make columns visible.

Could you please investigate? Do I use the right method to reset Columns:
gdbView.Model.ResetColHiddenEntries();
gdbView.Model.ResetColWidthEntries();
gdbView.Model.ResetVolatileData();

Would you be able to replicate the issue I am trying to describe?

Thank you,
Alex Feldman.





GridColumnTest_97b85fbc.zip

Alex Feldman
Replied On March 31, 2011 06:20 PM UTC

I'm using Syncfusion v 9.103.0.20 .NET 3.5

I have linked "unrecoverable" columns (the columns, I could not see after resetting) to the ones I had hide in the grid manually.



Jisha Joy [Syncfusion]
Replied On April 1, 2011 12:08 PM UTC

Hi Alex,

To reset the Hidden columns at runtime, you can use code like:

this.gridControl1.Cols.Hidden.ResetRange(1, this.gridControl1.ColCount);


Regards,
Jisha


Alex Feldman
Replied On April 1, 2011 02:15 PM UTC

Thank you for the reply,
I have tried the code you suggested:
gdbView.Model.Cols.Hidden.ResetRange(1, gdbView.Model.ColCount);

It's GridDataBoundGrid so no Cols for actual grid.

It does not work. Some column(s) are still hidden.

If you just try to create columns, hide some columns and reset it would work.
The issue is create columns once. Hide some columns. Generate columns again, and maybe again (different columns are created, the only share the mapping name, the objects are different) and than reset doesn't work anymore.

It's not obvious straightforward issue, do you observe the behavior I describing?

Thank you,
Alex Feldman.


Alex Feldman
Replied On April 1, 2011 02:50 PM UTC

I'm providing update of replication of the issue.
I have added seed into the Random, so the scenario should be replicable.

1. Click "Once" button once. Cols appear: 9,2,6,3,8.
2. Hide columns 2 and 3 manually setting width to 0.
3. Move column 8 to the left of the column 9.
4. Click "Once" button once.
5. Only columns 4 and 2 are displayed.
6. Reset button suppose to make hidden columns also visible.

The question is what should be in code for Reset button handler to display all 5 columns that are assign in GridBoundColumns?

Thank you,
Alex Feldman.





GridColumnTest2_c2e78098.zip

Jisha Joy [Syncfusion]
Replied On April 6, 2011 06:10 AM UTC

Hi Alex,

I could able to see the issue mentioned. Could you please create a Direct Trac incident with the details?. So that we could analyze it further.

Regards,
Jisha


Alex Feldman
Replied On April 6, 2011 09:40 PM UTC

Incident 79181 has been submitted.
http://www.syncfusion.com/support/directtrac/incidentviewer
/detailsupdate/79181

Thank you,
Alex Feldman.


Jisha Joy [Syncfusion]
Replied On April 8, 2011 10:52 AM UTC

Hi Alex,

Thank you for your update.

Regards,
Jisha




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

;