I'm trying to achieve the look like in this sample: Using a Multi-Column Header
I can't find any Layout properties in the WHDG.
Is there a possibility to get Multi Columns or Column Span in WHDG?
TIA
Tomek
Hi Tomek,
This is not a built in feature of the WHDG or WebDataGrid currently. You could submit a feature request for this. You could handle the initialize event and modify the html yourself to achieve this look and feel.
regards,David Young
Hi David,
thank you.
Could you post some sample code, please?I cant find the properties, which I can use to manitpulate the whole header HTML.
The grid's initialize event has one event arg, the sender, which is the grid object.
From there you can get a column header element with the following code.
var header1 = grid.get_columns().get_column(0).get_element();
This is the TH. You could set the colspan of one header to be 2 and then remove the next header. If you wanted a multi-line, you could go up to the tbody that holds the tr with the th. Then add a second row. It really is all manipulating html with javascript at this point. There isn't really a propery on the grid you can set.
-Dave
Hi Dave,
thank you. That was exactliy what I was searching for.
And here is my second question.
I have 4 TemplateDataFields configured in my grid. One of them has to have fixed width.
Here is the sample code for my column resizing behavior:
<ig:ColumnResizing Enabled="true"> <ColumnSettings> <ig:ColumnResizeSetting ColumnKey="col1" EnableResize="true" /> <ig:ColumnResizeSetting ColumnKey="col2" EnableResize="true" MaximumWidth="400" MinimumWidth="400" /> <ig:ColumnResizeSetting ColumnKey="col3" EnableResize="true" /> <ig:ColumnResizeSetting ColumnKey="col4" EnableResize="true" /> </ColumnSettings> </ig:ColumnResizing>
I have set the width of col1, col3 and col4 to 200. If I resize col3 or col4 the grid also resizes col2 automaticaly. If I set the EnableResize attribute of col2 to false I get the same behavior.
It seems that the column width of the columns are evenly spread. My has a fixed width of 1000px. Could you tell me how I can disable this behavior?
Tomek,
The ContainerGrids that the WHDG uses to render do derive from WebDataGrid. But not all of the behaviors have been modified to officially work in the WHDG. For example, it may not be properly copied from Band to ContainerGrid. This is on our forecast to get resizing and moving working for 11.1. Your column settings are probably not copied to the Container Grid. You could try to do this yourself in row island populated. That may fix your problem.
Acutally I'm using the WebHierarchicalDataGrid, but the sample Code is from the WebDataGrid.Could you tell me when the resizing functionality will be officialy supported in WHDG?
The above described issue is from WebDataGrid. I will post this issue in WebDataGrid forum, also.
I need to resize the grids from my second WHDG hierarchy. Isn't it so that the grids in my WHDG hierarchy are type of WebDataGrids? Can I resize this grids?
My approach to solving this problem is to modify the HTML appropriate. Or could you suggest a better way.
Are you trying to use Column Resizing in the WebHierarchicalDataGrid? Be warned that this is not officially supported. Regardless, can you either open a new forum post in the WHDG forumor in the WebDataGrid forum? That way other members will be easier to find a solution to the problem.
thanks,Dave