Bind only visible rows from GridViewRow in radgridview

3 posts, 0 answers
  1. Ashwini
    Ashwini avatar
    3 posts
    Member since:
    Jun 2011

    Posted 04 Feb 2012 Link to this post

    Hi 

    I have one RadGridView and Bind 32 rows.
     <grid:GridViewColumn >
                                                <grid:GridViewColumn.Header>
                                                    <TextBlock   x:Name=" txtRead
    " telerikControls:LocalizationManager.ResourceKey="Write" MouseLeftButtonUp=" txtRead
    _MouseLeftButtonUp" Style="{StaticResource UnderlineStyle}"></TextBlock>
                                                </grid:GridViewColumn.Header>
                                                <grid:GridViewColumn.CellTemplate>
                                                    <DataTemplate>
                                                        <my:CustomCheckbox x:Name="tglBuswrite" CheckStatus="{Binding write}" IsThreeState="True" CheckStatusChanged="CustomCheckbox_CheckStatusChanged"></my:CustomCheckbox>
                                                    </DataTemplate>
                                                </grid:GridViewColumn.CellTemplate>
                                            </grid:GridViewColumn>

    code behind code:
    private void txtRead_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
     {
              
                IList<GridViewRow> list = Radgvcustom.ChildrenOfType<GridViewRow>();
    }
      Here I am getting only visible rows count 
    Please if u have any solution help me 


    Thanks 
    Ashwini..
      
  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 06 Feb 2012 Link to this post

    Hi Ashwini,

    This would be the expected behavior since RadGridView is virtualized and only the visible visual elements are created. You can refer to our online documentation for a reference.
    The recommended approach is always to work with at data level in such cases (you can use Items collection of RadGridView). 

    Greetings,
    Maya
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. Ashwini
    Ashwini avatar
    3 posts
    Member since:
    Jun 2011

    Posted 09 Feb 2012 Link to this post

    hello maya,

    Thanks for your reply and I have one more problem
        
    here If I have Changed any selection mode like check, uncheck or none in check box in Radgridview. When I scroll up and down selection mode is changed. please do you have any solution for that?
Back to Top