Connecting Tech Pros Worldwide Forums | Help | Site Map

show embedded datagrid when click on a datagrid

Newbie
 
Join Date: Jul 2008
Posts: 28
#1: Jul 23 '08
Im a newbie to asp.net, i hav a bit dilemma when thinking about how i should let it work..

My task as below:

My task is related to view all data from a table called "employee "
i had create a datagrid where called data from database and successfully display in a datagrid..
each employee will hav their own personnel_number and direct_manager_personnel_number which refer to who is his/her direct boss...

eg.
CEO hav personnel_number= 2 and direct_manager_personnel_number=1 means that CEO has to report to boss(personnel_number = 1)
IT manager hav personnel_number = 44 and he will hav many employees (direct_manager_personnel_number = 44) under him..

my task is to view in a embedded child datagrid where who are the persons should refer/direct to him when user click / activate tat row of tat person

i had create a datagrid to view all parent and last column i had insert a link button so tat when user click on it, embedded child datagrid will be shown

i had search lots of tutorial but found the different are

1. act my full task is to let user key in first name or last name then program ll view all employees with tat firstname/lastname once user click on tat "Search" button not load the data when page load

2. after that, from the datagrid, user can select tat row to be view with its embedded child datagrid.

im getting confuse what shoud i wirte tat coding after viewing parent datagrid and where should i put tat coding.

Im using microsoft visual studio .NET 2003, i think there are no grid view can be used.hope to get some direction from u all senior
vy thanks to you spending time to me..

Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,137
#2: Jul 24 '08

re: show embedded datagrid when click on a datagrid


Quote:

Originally Posted by simonyong

Imy task is to view in a embedded child datagrid where who are the persons should refer/direct to him when user click / activate tat row of tat person

i had create a datagrid to view all parent and last column i had insert a link button so tat when user click on it, embedded child datagrid will be shown

I don't think you need to embed a child DataGrid, look into using a TemplateField to display the data.


Quote:

Originally Posted by simonyong

1. act my full task is to let user key in first name or last name then program ll view all employees with tat firstname/lastname once user click on tat "Search" button not load the data when page load

2. after that, from the datagrid, user can select tat row to be view with its embedded child datagrid.

You are asking for too much right now. Please attempt to implement these features first and then post about the specific problems that you are facing.


Check out the MSDN library for more information on how to use the GridView control.

-Frinny
Newbie
 
Join Date: Jul 2008
Posts: 28
#3: Aug 1 '08

re: show embedded datagrid when click on a datagrid


Quote:

Originally Posted by Frinavale

I don't think you need to embed a child DataGrid, look into using a TemplateField to display the data.




You are asking for too much right now. Please attempt to implement these features first and then post about the specific problems that you are facing.


Check out the MSDN library for more information on how to use the GridView control.

-Frinny




Thanks for reply
i had done it using datalist b/cos i'm using microsoft visual studio .NET 2003
I cant find GridView..
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,137
#4: Aug 1 '08

re: show embedded datagrid when click on a datagrid


Quote:

Originally Posted by simonyong

Thanks for reply
i had done it using datalist b/cos i'm using microsoft visual studio .NET 2003
I cant find GridView..

Sorry, GridView's are just newer versions of DataGrids.
DataGrids still have TemplateItems.

Please see the DataGrid class for more information.

-Frinny
Reply