hello, i have a problem with my project.
i am using 2013 version of telerik,
i have a RadGridView with about 40-50 records , which spread across 2-3 pages.
i want to sort them by a column, but due to lazy loading it sorts only the specific page i am in.
i have tried to disable lazy loading by using the command EnableRowVirtualization="false", but without success.
does any newer version have a solution to this problem, or any other solution?
thank you very much,
elad.
3 Answers, 1 is accepted
In general, disabling the UI Virtulization of RadGridView is something that we do not recommend as such approach would significantly affect the performance of the control. I suggest you taking a look at the UI Virtualization topic for more information.
As to your requirement,can you please share some details on how have you implemented the paging of RadGridView and its sorting operation, as such behavior is not reproducible at my side.
You can take a look at the attached project as a demonstration. Can you please elaborate on how it defers from your implementation?
Additionally, for paging RadGridView you can check out the RadDataPager control.
Regards,
Stefan
Telerik
Hello Stefan,
I am Elad CoWorker,
In our code we did use RadDataPager with no succes.
this is our code:
......
<telerik:RadDataPager
HorizontalAlignment="Stretch"
DisplayMode="FirstLastPreviousNextNumeric,Text"
IsTotalItemCountFixed="True"
PageSize="30"
SelectiveScrollingGrid.SelectiveScrollingOrientation="Both"
Source="{Binding Items, ElementName=GridView}" />
<!-- Scenarios List -->
<telerik:RadGridView x:Name="GridView"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
AutoGenerateColumns="False"
CanUserFreezeColumns="False"
CanUserReorderColumns="False"
DataContext="{Binding UpdateSourceTrigger=PropertyChanged, Mode=OneWay}"
DataLoadMode="Synchronous"
GridLinesVisibility="Horizontal"
helpers:GridViewHeaderMenu.IsEnabled="True"
IsBusy="False"
IsReadOnly="True"
IsSynchronizedWithCurrentItem="True"
ItemsSource="{Binding ScenariosDataSetFiltered, UpdateSourceTrigger=PropertyChanged}"
Keyboard.KeyUp="GridView_KeyUp"
ReorderColumnsMode="None"
RowActivated="GridView_RowActivated"
RowIndicatorVisibility="Collapsed"
ScrollMode="RealTime"
SelectedItem="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type y:C2ViewControl}},Path=ScenariosListViewPresenter.CurrentScenario,Mode=TwoWay}"
SelectionMode="{Binding Converter={ StaticResource ModeToGridSelectionModeConverter }, Path=TranslationObject.MultiSelectionEnableModesList}"
SelectionUnit="FullRow"
ShowGroupPanel="False">
<telerik:RadContextMenu.ContextMenu>
<telerik:RadContextMenu IsEnabled="{Binding SessionStartSharingService.IsEnabledUI}"
Opened="RadContextMenu_Opened"
Visibility="{Binding IsContextMenuVisible, Converter={StaticResource booleanToVisibilityConverter}}">
<telerik:RadContextMenu.Items>
<telerik:RadMenuItem Command="{Binding EditCommand}"
Header="Edit" />
<telerik:RadMenuItem Command="{Binding RenameCommand}"
Header="Rename" />
<telerik:RadMenuItem Command="{Binding SaveAsCommand}"
Header="Duplicate" />
<telerik:RadMenuItem Command="{Binding DeleteCommand}"
Header="Delete" />
</telerik:RadContextMenu.Items>
</telerik:RadContextMenu>
</telerik:RadContextMenu.ContextMenu>
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn Header="Scenario Name"
IsFilterable="True"
translation:TranslateExtension.Uid="IOS.MT.Modules.ScenariosModule.ScenarioslistView.ScenarioNameCol"
UniqueName="Name"
SortMemberPath="Name"
>
<telerik:GridViewDataColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name,UpdateSourceTrigger=PropertyChanged}" />
</DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
.....
Any sugestion?
Thanks a lot,
Einav
Can you check out the project my colleague previously attached? It illustrates how you can work with RadGridView together with RadDataPager successfully. Furthermore, you can run through the "Using Telerik RadDataPager" article for more information.
Regards,
Maya
Telerik