In my WebDataGrid (11.2) the Column width don't fit to the headers of the column. (IE9) They look something like that:
Is that a known bug. Is there something I can do?
Here is my code:
<ig:WebDataGrid ID="GridMeterList" runat="server" Height="300px" Width="100%" AutoGenerateColumns="False" StyleSetName="Default" EnableAppStyling="True" EnableDataViewState="True" EnableAjax="True" EnableAjaxViewState="True" AfterSelectChangeHandler="GridSelectChangedMtr"> <Columns> <ig:BoundDataField DataFieldName="meter_name" Key="meter_name" Header-Text="<%$ Resources:MultiLang, _338 %>" Width="150px" /> <ig:BoundDataField DataFieldName="description" Key="description" Header-Text="<%$ Resources:MultiLang, _239 %>" Width="200px" /> <ig:BoundDataField DataFieldName="domain" Key="domain" Header-Text="<%$ Resources:MultiLang, _250 %>" Width="100px" /> <ig:BoundDataField DataFieldName="center_name" Key="center_name" Header-Text="<%$ Resources:MultiLang, _262 %>" Width="100px" /> <ig:BoundDataField DataFieldName="consum_type" Key="consum_type" Header-Text="<%$ Resources:MultiLang, _68 %>" Width="100px" /> <ig:BoundDataField DataFieldName="dimension_text" Key="dimension_text" Header-Text="<%$ Resources:MultiLang, _237 %>" Width="100px" /> <ig:BoundDataField DataFieldName="meter_id" Key="meter_id" Hidden="true" Width="0px" /> <ig:BoundDataField DataFieldName="dimension_index" Key="dimension_index" Hidden="true" Width="0px" /> </Columns> <Behaviors> <ig:Paging PagerAppearance="Bottom" PageSize="50" Enabled="true" /> <ig:Selection CellSelectType="None" RowSelectType="Multiple"> <SelectionClientEvents RowSelectionChanged="GridObjectListRowSelectionChanged" /> </ig:Selection> <ig:Activation> </ig:Activation> <ig:Sorting> </ig:Sorting> <ig:RowSelectors> </ig:RowSelectors> <ig:EditingCore> <Behaviors> <ig:CellEditing> <ColumnSettings> <ig:EditingColumnSetting ColumnKey="Name" ReadOnly="True" /> <ig:EditingColumnSetting ColumnKey="Description" ReadOnly="True" /> </ColumnSettings> </ig:CellEditing> </Behaviors> </ig:EditingCore> <ig:ColumnFixing> <ColumnSettings> <ig:ColumnFixingSetting ColumnKey="object_name" /> <ig:ColumnFixingSetting ColumnKey="description" /> </ColumnSettings> </ig:ColumnFixing> <ig:ColumnResizing> </ig:ColumnResizing> </Behaviors> ... </ig:WebDataGrid>
Hi,
If you have on column fixing, it is expected that the WebDataGrid has a horizontal scroll bar. Otherwise, you can end up with misalignments such as these. Please make sure all of your columns either have a width defined or you have a DefaultColumnWidth. And that the total column width causes a scroll bar. Otherwise, turn off ColumnFixing and use VisibleIndex property of cells to rearrange them visibly.
regards,
David Young
Hi AgentD5,
Thank you for your fast answer. I tried your work around which works, but now I'm having other problems. I can't use the resize behaviour and if I try to, the columns still get messed up.
To me that looks like a bug or at least there should be some way to enforce which behaviour can't be used together.
Also I don't want the user to force to use the scrollbar. I want to support a big variety of screen sizes and so I can’t ensure the scrollbar without using a limited space of the window.
Thanks
Uli