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. Image for the cookie policy date

Can you retrieve the column layout back from the GDBG?

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)?

2 Replies

AD Administrator Syncfusion Team April 25, 2005 08:12 PM

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.


AD Administrator Syncfusion Team April 25, 2005 09:27 PM

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.

Loader.
Live Chat Icon For mobile
Up arrow icon