Hello,
I'm brand new to the WHDG and wanted to know if it's possible to activate a horizontal scollbar. My grid has a lot of colums and i addes a WebSplitter so i need to display a hoorizontal scrollbar if the user rezizes the window or splitter. the currect bevavour is that the coulms get smaler and smaler.
Hi Sebastian,
Thank you for posting in the community.
By default, WebDataGrid columns autosize in order to fit in the available width of the grid. You can set the DefaultColumnWidth property of the grid or alternatively set the widths for each column and given that the summed width of the columns is greater than the width of the grid, the horizontal scrollbar will be shown.
Please let me know if this helps.
Best Regards,
Petar IvanovDeveloper Support EngineerInfragistics, Inc.http://www.infragistics.com/support
Hello Petar,
first of all the property works. But i'm not satisfied....
Is it possible to set the width property to a value that the grid calculate the size initially to the content of the column?
The reason why is that some columns have only a short informations like statusinformations other columns have a companyname in it that might be longer than the statusinformation.
Thank you for your reply.
There is currently no built-in functionality for autosizing columns in WebDataGrid/WebHierarchicalDataGrid, however this can be achieved by handling the Initialize client-side event. You can find sample pages and code regarding that scenario at:
http://community.infragistics.com/forums/t/60115.aspx
http://blogs.infragistics.com/forums/p/24800/272158.aspx
For WebHierarchicalDataGrid you would need to access the columns for each band in order to autosize them. The root band can be accessed using:
$find("WebHierarchicalDataGrid1").get_gridView().get_band()
and its child bands may be accessed using:
$find("WebHierarchicalDataGrid1").get_gridView().get_band().get_bands()[0]
Please let me know if you need further assistance.