Hi!
I have two tables with a master/detail relationship in a database.
On a form, for each table i have a gridview to manipulate the data. When I navigate throw the master gridview, the refresh of the detail gridview doesn't seem to work. Most of the time, the real data has nothing to do with what the detail gridview shows.
I hope for a rapid solution. Thanks.
5 Answers, 1 is accepted
0
Hello liviu,
Thank you for the reported issue. The bug was confirmed and logged in our bug tracker. Your Telerik points have been updated as well.
Currently, we can suggest the following workaround:
We hope that this solution will work for you until we fix the issue in the Q2 release.
Regards,
Evtim
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Thank you for the reported issue. The bug was confirmed and logged in our bug tracker. Your Telerik points have been updated as well.
Currently, we can suggest the following workaround:
protected override OnLoad(EventArgs e) |
{ |
base.OnLoad(e); |
radGridViewMaster.CurrentRowChanged +=new CurrentRowChangedEventHandler(radGridView1_CurrentRowChanged); |
} |
private void radGridView1_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e) |
{ |
radGridViewDetail.MasterGridViewInfo.UpdateView(true); |
} |
We hope that this solution will work for you until we fix the issue in the Q2 release.
Regards,
Evtim
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
liviu
Top achievements
Rank 1
answered on 27 Sep 2007, 10:48 AM
Hi!
I got the Q2, suspended the workaround and I was expecting the GridViews to work properly. They didn't.
Was I supposed to do something more?
Regards
0
Hi Liviu,
In order to use a RadGridView in this scenario you must create a child view and bind it to the detail grid for every change of the master row:
Another approach is using RadGridView in hierarchical mode.
I hope this was helpful.
Kind regards,
Julian Benkov
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
In order to use a RadGridView in this scenario you must create a child view and bind it to the detail grid for every change of the master row:
private void radGridView1_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e) |
{ |
DataRowView row = e.CurrentRow.DataBoundItem as DataRowView; |
radGridView2.DataSource = row.CreateChildView(nwindDataSet.Orders.ParentRelations[0]); |
} |
Another approach is using RadGridView in hierarchical mode.
I hope this was helpful.
Kind regards,
Julian Benkov
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
liviu
Top achievements
Rank 1
answered on 28 Sep 2007, 10:12 AM
Hi!
Not exactly the answer I was waiting for. The previous response from your team suggested that it will be an automatic behaviour for this situation. You are giving me just another workaround.
About the solution using the CurrentRowChanged event.... This event doesn't seem to be fired when a new row is added. So, if I add a row in the master grid, the refresh for the detail grid will not be done.
About the hierarchical mode.... It doesn't seem to be the design I am looking for, but I have anyway a question. Using this mode, is it posible to add rows into the detail grid? In your example, I couldn't find a way to do this.
Regards
Not exactly the answer I was waiting for. The previous response from your team suggested that it will be an automatic behaviour for this situation. You are giving me just another workaround.
About the solution using the CurrentRowChanged event.... This event doesn't seem to be fired when a new row is added. So, if I add a row in the master grid, the refresh for the detail grid will not be done.
About the hierarchical mode.... It doesn't seem to be the design I am looking for, but I have anyway a question. Using this mode, is it posible to add rows into the detail grid? In your example, I couldn't find a way to do this.
Regards
0
Hi Liviu,
Up to your questions:
Regards,
Julian Benkov
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Up to your questions:
- We are sorry for the misunderstanding. This behavior is not automatic in RadGridView. Actually, it is not automatic for most grids on the market, but it can be. We will consider providing this feature in a future version.
- Thank you for the note about the CurrentRowChanged event. The issue was addressed immediately, and the fixed version will appear in the Q2 SP1 release in two weeks.
- As to the hierarchical mode, adding a new row in the detail table is possible. We are still adding and improving the API for it and this task will be easier with each new version of RadGridView.
Regards,
Julian Benkov
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center