This is a migrated thread and some comments may be shown as answers.

Bind only visible rows from GridViewRow in radgridview

2 Answers 120 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ashwini
Top achievements
Rank 1
Ashwini asked on 04 Feb 2012, 08:54 AM
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 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 06 Feb 2012, 07:51 AM
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 >>
0
Ashwini
Top achievements
Rank 1
answered on 09 Feb 2012, 07:52 AM
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?
Tags
GridView
Asked by
Ashwini
Top achievements
Rank 1
Answers by
Maya
Telerik team
Ashwini
Top achievements
Rank 1
Share this question
or