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

[Solved] hierarchy select from master table

3 Answers 145 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nyceane
Top achievements
Rank 1
Nyceane asked on 30 Dec 2007, 03:56 AM
Ok,
this is a little complicated, and i'll try to explain it the best way I can, and please don't redirect me to one of the examples because I've looked at all of them.

Under hierarchy RadGrid, I am loading 2 databases, they are foreign keyed with each other, we'll call first databse dummy1 and second one dummy2, [key] under dummy is the [id] for dummy2.

under <detailtables> I've set up the property.
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="id" MasterKeyField="Key" />
</ParentTableRelation>   

[id] is not the primary key for dummy2,

here comes the problem, when I try to insert new data on dummy2, it would always give me error where [id] is null and can't be null, how do I put it in a parameter where [id] will take the [key] value from dummy1?

something like
<asp:ControlParameter ControlID="dummy1" Name="id" Type="Int16" />
but works... this doesn't work, since the selected value from dummy1 isn't necessarily the hierarchy thats open.

Peter

3 Answers, 1 is accepted

Sort by
0
Nyceane
Top achievements
Rank 1
answered on 31 Dec 2007, 04:56 PM
the example provided,
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Hierarchy/ThreeLevel/DefaultCS.aspx

can not enter a new order, whenever you enter a new order, the customer ID does not apply, and because of this everytime you refresh the record does not show up. The SessionDataSource2 needs to carry the customerID from 1st tier hierarchy, and how do I do that?
0
Vladimir
Top achievements
Rank 1
answered on 01 Jan 2008, 09:43 PM
Peter,

Please visit this code-library for more info:
http://www.telerik.com/community/code-library/submission/b311D-ghdhk.aspx

Vlad
0
Nyceane
Top achievements
Rank 1
answered on 02 Jan 2008, 07:07 PM
thanks a lot, got it
Tags
Grid
Asked by
Nyceane
Top achievements
Rank 1
Answers by
Nyceane
Top achievements
Rank 1
Vladimir
Top achievements
Rank 1
Share this question
or