show embedded datagrid when click on a datagrid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • simonyong
    New Member
    • Jul 2008
    • 28

    show embedded datagrid when click on a datagrid

    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_numbe r and direct_manager_ personnel_numbe r which refer to who is his/her direct boss...

    eg.
    CEO hav personnel_numbe r= 2 and direct_manager_ personnel_numbe r=1 means that CEO has to report to boss(personnel_ number = 1)
    IT manager hav personnel_numbe r = 44 and he will hav many employees (direct_manager _personnel_numb er = 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
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    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.


    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

    Comment

    • simonyong
      New Member
      • Jul 2008
      • 28

      #3
      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..

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        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

        Comment

        Working...