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

[Solved] Error on Refresh Grid

4 Answers 157 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Paolo
Top achievements
Rank 1
Paolo asked on 10 Jun 2009, 03:09 PM
I've a grid with  3 GridViewColumn defined with style and template and so on...
Every column has his style and template. This is one of this:

<

 

telerikGridView:GridViewDataColumn Width="*">

 

 

 

<telerikGridView:GridViewDataColumn.CellTemplate>

 

 

 

<DataTemplate>

 

 

 

<StackPanel VerticalAlignment="Top">

 

 

 

<StackPanel Orientation="Horizontal" Margin="5">

 

 

 

<TextBlock Text="Codice:" FontWeight="bold"></TextBlock>

 

 

 

<TextBlock Text="{Binding voce_listino.codice}" ></TextBlock>

 

 

 

</StackPanel>

 

 

 

<ScrollViewer Margin="0,5,5,0">

 

 

 

<TextBox Height="80" AcceptsReturn="True" IsReadOnly="True" BorderThickness="0" Background="#00FFFFFF" TextWrapping="Wrap" Text="{Binding voce_listino.descrizione}" ></TextBox>

 

 

 

</ScrollViewer>

 

 

 

</StackPanel>

 

 

 

</DataTemplate>

 

 

 

</telerikGridView:GridViewDataColumn.CellTemplate>

 

 

 

</telerikGridView:GridViewDataColumn>

 



Out of the grid I have a tree and when i click an item on the tree the grid load the details. But after the first load, the grid doesn't refresh, is empty, even if the data are correct (i see on debug).
If I click allways on the first item the grid load the same data and refresh correctly, but when i Click on other node the grid seems not loading the template(or similar...)
Any Idea?

there's some "grid.refresh item template " to call?
Thanks

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 11 Jun 2009, 05:07 AM
Hi Paolo,

How the grid is bound in your case? Please provide more info.

Best wishes,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Paolo
Top achievements
Rank 1
answered on 11 Jun 2009, 02:48 PM
Hi Vlad,
this is the object I boud to grid:
GrigliaDettagli.ItemsSource = elementoSelezionato.righe_consuntivo
(GrigliaDettagli -> the grid)

"righe_consuntivo" is an ObservableCollection of object.

when i add a new row in the grid, i see the row indicator (on the left), without the column template
and if I click the tree, the grid change but i can see just the row indicator, without the column...

It's something like the grid bound the element but the column template doesn't work. Work just the first time, when I bound the first time

Paolo






0
Rossen Hristov
Telerik team
answered on 12 Jun 2009, 01:23 PM
Hi Paolo,

Unfortunately, I could not quite understand what is happening from the description you provided. Can you please provide me with a sample project that demonstrates the issue you are faced with, and tell us the exact steps to reproduce it. We will examine it, run it and identify the problem.

I am looking forward to hearing from you.

Best wishes,
Ross
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Paolo
Top achievements
Rank 1
answered on 12 Jun 2009, 02:14 PM
Hi, i have understand!
to clear the grid when i click a tree element without any record to show in the grid, i did:
grid.ItemsSource = nothing

but this action clear also the template i use in the grid to show data

so now i use

GrigliaDettagli.ItemsSource =

New System.Collections.ObjectModel.ObservableCollection(Of MyObject)

 


the list is empty (but inizialized) and in this way the grid is now clear, but "remembr" the column template

Paolo

 

Tags
GridView
Asked by
Paolo
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Paolo
Top achievements
Rank 1
Rossen Hristov
Telerik team
Share this question
or