Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
245
WebDataGrid and first row selection (ServerSide)
posted

Hello, I have a problem with webdatagrid and the server side selection of the first row.

The Grid is used only for details selection and after loaded and show datain each rows, I need to select the first row and load the relative details in a separate Ajax Panel.

During the normal use, selecting a different row, the Ajax Panel content is correctly updated.

My problem happen if I select the first row (server side) in the following way:

SelectedRowCollection selectedRows = Grid.Behaviors.Selection.SelectedRows;

selectedRows.Add (Grid.Rows [0]);

selecting other rows everything seems work good (Rows > zero), but if I go back to the first Row (Row [0]), it seems that I am losing alignment, and Ajax Panel show old data.

If I choose other rows again, everything seems good.

If, on the other hand, I don't select the first Row (by server side code) and click each rows, the selection Grid works correctly, updating the Ajax Panel, even when I select Row [0].

This is my Grid:

<ig:WebDataGrid ID="Grid" runat="server" AutoGenerateColumns="False"
                        EnableDataViewState="True" EnableRelativeLayout="True" BorderWidth="1px"
                        Height="130px" Width="720px" DataKeyFields="Indice"
                        BorderStyle="Solid" BackColor="White" EnableAjax="False"
                        EnableAjaxViewState="False" onrowselectionchanged="Grid_ActiveRowChange">
                            <Columns>
                                <ig:BoundDataField DataFieldName="KDE02" DataType="System.Int32" Hidden="True" Key="KDE02" Width="10px">
                                    <Header Text="KDE02" />
                                </ig:BoundDataField>
                                <ig:BoundDataField DataFieldName="A01" DataType="System.String" HtmlEncode="False" Key="A01" Width="100px">
                                    <Header Text="A01" />
                                </ig:BoundDataField>
                                <ig:BoundDataField DataFieldName="A03" DataType="System.Int32" HtmlEncode="False" Key="A03" Width="40px">
                                    <Header Text="A03" />
                                </ig:BoundDataField>
                                <ig:BoundDataField DataFieldName="WXDD" DataType="System.String" HtmlEncode="False" Key="WXDD" Width="140px">
                                    <Header Text="WXDD" />
                                </ig:BoundDataField>
                                <ig:BoundDataField DataFieldName="A50Z" DataType="System.Decimal" Key="A50Z" Width="160px">
                                    <Header Text="A50Z" />
                                </ig:BoundDataField>
                                <ig:BoundDataField DataFieldName="X80A" DataType="System.String" Key="X80A" Width="80px">
                                    <Header Text="X80A" />
                                </ig:BoundDataField>
                                <ig:BoundDataField DataFieldName="X80E" DataType="System.String" Key="X80E" HtmlEncode="False" Width="50px" CssClass="igg_CheckBoxAlignCentrer">
                                    <Header Text="X80E" />
                                </ig:BoundDataField>
                                <ig:BoundDataField DataFieldName="Indice" DataType="System.String" Hidden="true" Key="Indice" Width="10px">
                                    <Header Text="Indice" />
                                </ig:BoundDataField>
                            </Columns>
                            <Behaviors>
                                <ig:EditingCore AutoCRUD="False" BatchUpdating="True">
                                </ig:EditingCore>
                                     <ig:Activation></ig:Activation>
                                <ig:Selection CellClickAction="Row" RowSelectType="Single">
                                    <AutoPostBackFlags RowSelectionChanged="True" />
                                </ig:Selection>
                                <ig:RowSelectors>
                                </ig:RowSelectors>
                            </Behaviors>
                        </ig:WebDataGrid>

For me it is essential to load the details of the first GridRow and populate the relative Ajax Panel.

I can also loading data by forcing the index "0" from code, but I need that the Grid show the first row selected, but does not misalign the selections of other rows

PS:   Infragistics4 20.2, Version=20.2.20202.1

some advice?

Thank you

Parents Reply Children
No Data