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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Can you retrieve the column layout back from the GDBG?

Thread ID:





28136 Apr 25,2005 05:28 PM UTC Apr 26,2005 02:27 AM UTC WinForms 2
Tags: GridControl
Asked On April 25, 2005 05:28 PM UTC

We''re trying to write a configuration tool, that will let our users configure what columns they want to see in GDBG. We do it by generating a string array that we pass to LayoutColumns() function to each HierarchyLevel (we have more that one level). However we couldn''t find a way to get the current layout of the grid. Basically, if we pass the array (including "." and "-") to the LayoutColumns() function, can we get it back somehow? If it is possible, can we also get the width of "-" columns (in the first row)?

Administrator [Syncfusion]
Replied On April 26, 2005 01:12 AM UTC

The width you can get by indexing grid.Model.ColWidths. But the grid does not save the string array that was passed into LayoutColumns. Instead, it processes setting thing like rowcount and covered cells. You might consider creating a method that wraps the call to LayoutColumns, and in your method you save a copy of these string array for your use. If you wanted to encapsulate this functionality in teh grid, you can derive the grid and expose this wrapped LayoutFunction method as a public method of the derived grid. Then your users would call your public method instead of calling LayoutColumns directly.

Administrator [Syncfusion]
Replied On April 26, 2005 02:27 AM UTC

What you describe is very similar to what we do. Yet it''s only enough for the order of the columns. We''re trying to create an interface that will remember widths as well. Column width indexer (ColWidth) is available to the model only, and applies to the top hierarchy level''s list of mappings.


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

Live Chat Icon For mobile
Live Chat Icon