Add additional row

Discussion in 'ASP .Net' started by Vishal, Mar 7, 2005.

  1. Vishal

    Vishal Guest

    Hello,

    I need to add an additional row for each exisitng row in
    my datagrid. How can I do that?

    Thanks
     
    Vishal, Mar 7, 2005
    #1
    1. Advertising

  2. you could try to add it when the DataList.ItemDataBound Event is called

    http://msdn.microsoft.com/library/d...ebcontrolsdatalistclassitemdataboundtopic.asp

    or try to use a templatecolumn

    http://aspnet.4guysfromrolla.com/articles/021203-1.aspx

    the addRow method typically adds a row to the end of teh datagrid followin g
    a bind event, so you may have to intercept this and see if theres anyhting
    you can do. I suppose it depends on what you actually want the extra row
    for.
    --
    Regards

    John Timney
    ASP.NET MVP
    Microsoft Regional Director

    "Vishal" <> wrote in message
    news:565101c52355$431fff90$...
    > Hello,
    >
    > I need to add an additional row for each exisitng row in
    > my datagrid. How can I do that?
    >
    > Thanks
     
    John Timney \(ASP.NET MVP\), Mar 7, 2005
    #2
    1. Advertising

  3. Vishal

    Vishal Guest

    Well, I am using a datagrid and I have to stick to that. I
    need the addtional row for each existing row, so the 4Guys
    article doesnt help me. The additional row will be used to
    place a nested datagrid. I hope you can help me out.

    Thanks



    >-----Original Message-----
    >you could try to add it when the DataList.ItemDataBound

    Event is called
    >
    >http://msdn.microsoft.com/library/default.asp?

    url=/library/en-
    us/cpref/html/frlrfsystemwebuiwebcontrolsdatalistclassitemd
    ataboundtopic.asp
    >
    >or try to use a templatecolumn
    >
    >http://aspnet.4guysfromrolla.com/articles/021203-1.aspx
    >
    >the addRow method typically adds a row to the end of teh

    datagrid followin g
    >a bind event, so you may have to intercept this and see

    if theres anyhting
    >you can do. I suppose it depends on what you actually

    want the extra row
    >for.
    >--
    >Regards
    >
    >John Timney
    >ASP.NET MVP
    >Microsoft Regional Director
    >
    >"Vishal" <> wrote in

    message
    >news:565101c52355$431fff90$...
    >> Hello,
    >>
    >> I need to add an additional row for each exisitng row in
    >> my datagrid. How can I do that?
    >>
    >> Thanks

    >
    >
    >.
    >
     
    Vishal, Mar 7, 2005
    #3
  4. Take a read through the article below, its by some of the best asp.net
    people and focusses specifically on nested datagrids, the example on nesting
    a datagrid within a template column might be what your after or at least
    given you an insight into building on that.

    http://www.quepublishing.com/articles/article.asp?p=173410&rl=1

    --
    Regards

    John Timney
    ASP.NET MVP
    Microsoft Regional Director

    "Vishal" <> wrote in message
    news:56bb01c5235e$278bab90$...
    > Well, I am using a datagrid and I have to stick to that. I
    > need the addtional row for each existing row, so the 4Guys
    > article doesnt help me. The additional row will be used to
    > place a nested datagrid. I hope you can help me out.
    >
    > Thanks
    >
    >
    >
    > >-----Original Message-----
    > >you could try to add it when the DataList.ItemDataBound

    > Event is called
    > >
    > >http://msdn.microsoft.com/library/default.asp?

    > url=/library/en-
    > us/cpref/html/frlrfsystemwebuiwebcontrolsdatalistclassitemd
    > ataboundtopic.asp
    > >
    > >or try to use a templatecolumn
    > >
    > >http://aspnet.4guysfromrolla.com/articles/021203-1.aspx
    > >
    > >the addRow method typically adds a row to the end of teh

    > datagrid followin g
    > >a bind event, so you may have to intercept this and see

    > if theres anyhting
    > >you can do. I suppose it depends on what you actually

    > want the extra row
    > >for.
    > >--
    > >Regards
    > >
    > >John Timney
    > >ASP.NET MVP
    > >Microsoft Regional Director
    > >
    > >"Vishal" <> wrote in

    > message
    > >news:565101c52355$431fff90$...
    > >> Hello,
    > >>
    > >> I need to add an additional row for each exisitng row in
    > >> my datagrid. How can I do that?
    > >>
    > >> Thanks

    > >
    > >
    > >.
    > >
     
    John Timney \(ASP.NET MVP\), Mar 7, 2005
    #4
  5. Vishal

    Vishal Guest

    No, I already know this article. They are adding the
    nested datagrid in a new column, not in a new row.


    >-----Original Message-----
    >Take a read through the article below, its by some of the

    best asp.net
    >people and focusses specifically on nested datagrids, the

    example on nesting
    >a datagrid within a template column might be what your

    after or at least
    >given you an insight into building on that.
    >
    >http://www.quepublishing.com/articles/article.asp?

    p=173410&rl=1
    >
    >--
    >Regards
    >
    >John Timney
    >ASP.NET MVP
    >Microsoft Regional Director
    >
    >"Vishal" <> wrote in

    message
    >news:56bb01c5235e$278bab90$...
    >> Well, I am using a datagrid and I have to stick to

    that. I
    >> need the addtional row for each existing row, so the

    4Guys
    >> article doesnt help me. The additional row will be used

    to
    >> place a nested datagrid. I hope you can help me out.
    >>
    >> Thanks
    >>
    >>
    >>
    >> >-----Original Message-----
    >> >you could try to add it when the DataList.ItemDataBound

    >> Event is called
    >> >
    >> >http://msdn.microsoft.com/library/default.asp?

    >> url=/library/en-
    >>

    us/cpref/html/frlrfsystemwebuiwebcontrolsdatalistclassitemd
    >> ataboundtopic.asp
    >> >
    >> >or try to use a templatecolumn
    >> >
    >> >http://aspnet.4guysfromrolla.com/articles/021203-1.aspx
    >> >
    >> >the addRow method typically adds a row to the end of

    teh
    >> datagrid followin g
    >> >a bind event, so you may have to intercept this and see

    >> if theres anyhting
    >> >you can do. I suppose it depends on what you actually

    >> want the extra row
    >> >for.
    >> >--
    >> >Regards
    >> >
    >> >John Timney
    >> >ASP.NET MVP
    >> >Microsoft Regional Director
    >> >
    >> >"Vishal" <> wrote in

    >> message
    >> >news:565101c52355$431fff90$...
    >> >> Hello,
    >> >>
    >> >> I need to add an additional row for each exisitng

    row in
    >> >> my datagrid. How can I do that?
    >> >>
    >> >> Thanks
    >> >
    >> >
    >> >.
    >> >

    >
    >
    >.
    >
     
    Vishal, Mar 7, 2005
    #5
  6. If you need to add related data in a nested fashion, take a look at this
    free code:

    HierarGrid - A hierarchical DataGrid that displays master-detail relations

    http://www.denisbauer.com/ASPNETControls/HierarGrid.aspx


    "Vishal" <> wrote in message
    news:565101c52355$431fff90$...
    > Hello,
    >
    > I need to add an additional row for each exisitng row in
    > my datagrid. How can I do that?
    >
    > Thanks
     
    Ken Cox [Microsoft MVP], Mar 8, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?ZGF2ZQ==?=
    Replies:
    3
    Views:
    447
    =?Utf-8?B?ZGF2ZQ==?=
    Apr 10, 2006
  2. Sugapablo
    Replies:
    5
    Views:
    463
    Peter Flynn
    May 27, 2005
  3. Coaster
    Replies:
    3
    Views:
    403
    Coaster
    Dec 17, 2007
  4. SK

    Add additional row into header?

    SK, Feb 17, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    4
    Views:
    202
  5. D
    Replies:
    0
    Views:
    235
Loading...

Share This Page