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

Potential Issue with Gridview

4 Answers 31 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Cameron Molyneux
Top achievements
Rank 1
Cameron Molyneux asked on 25 Feb 2010, 06:23 AM
I have a hierachical grid view that binds to a datasource with autogenerate columns set to true.

I have a timer on my screen that the user can switch on and off to 'auto refresh' the grid

I have noticed that when i next cycle trhough and fetch data and bind, the data in the child tables doesnt get cleared

for example i have 4 rows in my table, each with 2 rows underneath .. next time i refresh i still have 4 rows but they each have 4 underneath

I can clear this by clearing them all before i rebind .. by i thought that binding would sort this out without having to clear them

is the working as it should?

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 25 Feb 2010, 07:53 AM
Hello Cameron,

Can you post more info how the grid is bound in your case and how child tables are defined? More info about the grid version will be appreciated as well.

Sincerely yours,
Vlad
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Cameron Molyneux
Top achievements
Rank 1
answered on 25 Feb 2010, 08:01 AM
 
 
selectedableOrdersGrid.ChildTableDefinitions.Clear();  
var currentIndex = this.selectedableOrdersGrid.Items.IndexOf(this.selectedableOrdersGrid.SelectedItem);  
DataSet tDS = iLaboratoryDataBroker.CellularPathology.Module.ReportingWorklist.GetWorkList();  
selectedableOrdersGrid.AutoGenerateColumns = true;  
selectedableOrdersGrid.ShowGroupPanel = false;  
selectedableOrdersGrid.ShowColumnHeaders = true;  
selectedableOrdersGrid.ItemsSource = tDS;  
selectedableOrdersGrid.ExpandAllGroups();  
if (currentIndex > 0) {thisthis.selectedableOrdersGrid.SelectedItem = this.selectedableOrdersGrid.Items[currentIndex];}  
 

This is the code I use to bind the data .. my call to the GetWorklist funtion returns a relational dataset  with 3 or 4 child tables

This is happening with the 2010 Q1 beta, thats why i stuck the post in this forum .. is this the right place?

the clear child tables call is in there to FIX the problem ... without it the child tables seem to retain thier data

Am i doing something wrong?
0
Vlad
Telerik team
answered on 25 Feb 2010, 08:58 AM
Hello Cameron,

Issue confirmed and fixed immediately! I've added 2000 Telerik points to your account.

Sincerely yours,
Vlad
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Cameron Molyneux
Top achievements
Rank 1
answered on 25 Feb 2010, 09:02 AM
thanks :)
Tags
General Discussions
Asked by
Cameron Molyneux
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Cameron Molyneux
Top achievements
Rank 1
Share this question
or