Hi Telerik,
I'm working on a project that needs to load a massive amount of data into the grid.
The data loading is divided into two chunks: the first chunk will bring only several rows for the user to be able to start working with.
The second chunk will load the rest of the data in a separate thread.
While loading the first chunk I'm setting the IsBusy property to true.
Once the first chunk is loaded isBusy is false (the user should be able to start working), and I want to "add" a row to the end of the grid's rows collection that will represent a loading indicator (like in the iPhone) - this is exactly like in the iPhone (see attachment).
I tried to make modifications in the grid's GridViewScrollViewer template by changing the content of the ScrollContentPresenter to contain a ContentPresenter with the loading indicator below it (I made it a button for simplicity).
This works well when applied to a regular ScrollViewer's template, but on GridViewScrollViewer template it throws an exception:
In a FrameworkTemplate, ContentPresenter and GridViewRowPresenter cannot be in each other inclusively or exclusively.
Please help!!
Regards,
David.
I'm working on a project that needs to load a massive amount of data into the grid.
The data loading is divided into two chunks: the first chunk will bring only several rows for the user to be able to start working with.
The second chunk will load the rest of the data in a separate thread.
While loading the first chunk I'm setting the IsBusy property to true.
Once the first chunk is loaded isBusy is false (the user should be able to start working), and I want to "add" a row to the end of the grid's rows collection that will represent a loading indicator (like in the iPhone) - this is exactly like in the iPhone (see attachment).
I tried to make modifications in the grid's GridViewScrollViewer template by changing the content of the ScrollContentPresenter to contain a ContentPresenter with the loading indicator below it (I made it a button for simplicity).
<
ScrollContentPresenter
Grid.Row
=
"2"
CanContentScroll
=
"{TemplateBinding CanContentScroll}"
CanHorizontallyScroll
=
"False"
CanVerticallyScroll
=
"False"
>
<
ScrollContentPresenter.Content
>
<
StackPanel
Orientation
=
"Vertical"
>
<
ContentPresenter
ContentTemplate
=
"{TemplateBinding ContentTemplate}"
Content
=
"{TemplateBinding Content}"
ContentStringFormat
=
"{TemplateBinding ContentStringFormat}"
/>
<!-- Loading indicator -->
<
Button
Content
=
"Loading..."
/>
</
StackPanel
>
</
ScrollContentPresenter.Content
>
</
ScrollContentPresenter
>
This works well when applied to a regular ScrollViewer's template, but on GridViewScrollViewer template it throws an exception:
In a FrameworkTemplate, ContentPresenter and GridViewRowPresenter cannot be in each other inclusively or exclusively.
Please help!!
Regards,
David.