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
985
How do I set focus to the first row of the xamWebGrid programatically?
posted

I have xamWebGrid binding to a list and I would like to set focus to first row when application is launched, I have tried different ways, but no luck. Microsoft datagrid has a very simple way to do it. Can someone please help. Thanks

 

                <igGrid:XamWebGrid x:Name="_dgEventsList" AutoGenerateColumns="False" ColumnWidth="*" Height="300" Width="500" ItemsSource="{Binding EventList}">
                    <igGrid:XamWebGrid.SelectionSettings>
                        <igGrid:SelectionSettings CellClickAction="SelectRow" RowSelection="Single"></igGrid:SelectionSettings>
                    </igGrid:XamWebGrid.SelectionSettings>
                    <igGrid:XamWebGrid.Columns>
                        <igGrid:TextColumn Key="EventName" Width="200" HeaderText="Name"/>
                        <igGrid:TextColumn Key="EventDesc" Width="*" HeaderText="Description"/>
                        <igGrid:TextColumn Key="AppModule"  Visibility="Collapsed" HeaderText="AppModule"/>
                    </igGrid:XamWebGrid.Columns>
                </igGrid:XamWebGrid>