Hello,
I have just read this demo:http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultcs.aspx .
In this demo,the "Category" column is not a field in table [Products] ,but in table [Categories ].And the demo use the following code to show the category's name accurately:
But now I have 3 tables in my datebase,for example,table A,table B and table C.Table A has a foreign key pointing to table B.And table B has a foreign key pointing to table C.Now I want to show A.X,B.Y,C.Z in a grid and realize the insert/update/delete functions.How to?
In addition,if I use dropdownlist to show B.Y and C.Z,I have to deal with the SelectedIndexChanged event to refresh the other dropdownlist.
It seems that my question is a little stupid.Let me give an example.Now I have to manage the students' information.Each student comes from different college,and has their major.Each major is in different college.Now I have 3 tables:[Students],[Majors],[Colleges].[Students].MajorID is a foreign key pointing to [Majors]. [Majors].[CollegeID] is a foreign key pointing to [Colleges]. [Majors].Name is the name of a major and [College].Name is the name of a college.Now I want to use a grid to show/insert/update/delete students.
My current solution is to use other pages for insert/update,is there a faster way?
Thanks very much.
I have just read this demo:http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultcs.aspx .
In this demo,the "Category" column is not a field in table [Products] ,but in table [Categories ].And the demo use the following code to show the category's name accurately:
<
telerik:GridDropDownColumn
DataField
=
"CategoryID"
DataSourceID
=
"SqlDataSource2"
HeaderText
=
"Category"
ListTextField
=
"CategoryName"
ListValueField
=
"CategoryID"
UniqueName
=
"CategoryID"
ColumnEditorID
=
"GridDropDownColumnEditor1"
>
</
telerik:GridDropDownColumn
>
But now I have 3 tables in my datebase,for example,table A,table B and table C.Table A has a foreign key pointing to table B.And table B has a foreign key pointing to table C.Now I want to show A.X,B.Y,C.Z in a grid and realize the insert/update/delete functions.How to?
In addition,if I use dropdownlist to show B.Y and C.Z,I have to deal with the SelectedIndexChanged event to refresh the other dropdownlist.
It seems that my question is a little stupid.Let me give an example.Now I have to manage the students' information.Each student comes from different college,and has their major.Each major is in different college.Now I have 3 tables:[Students],[Majors],[Colleges].[Students].MajorID is a foreign key pointing to [Majors]. [Majors].[CollegeID] is a foreign key pointing to [Colleges]. [Majors].Name is the name of a major and [College].Name is the name of a college.Now I want to use a grid to show/insert/update/delete students.
My current solution is to use other pages for insert/update,is there a faster way?
Thanks very much.