Results 1 to 4 of 4

Thread: Datagrid - PageIndex

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2004
    Posts
    94

    Datagrid - PageIndex

    I have a page with a datagrid on it. When I click on a row of this datagrid, I receive another page where I can edit this record.

    After updating this record I want to return to the first page (no problem), but I want the same page on the datagrid (PageIndex).

    !! Instead of updating the record, I can also delete it !!

    How can I do that ?

  2. #2
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267

    Re: Datagrid - PageIndex

    try keeping your pageindex in a property that is based on ViewState
    Magiaus

    If I helped give me some points.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2004
    Posts
    94

    Re: Datagrid - PageIndex

    Sorry, can't follow you...

    In my datagrid I created a hyperlink column where I fill in the url format string as "AddEditToepassing.aspx?CodeID={0}" (AddEditToepassing.aspx is my second page where I can modify or delete the record).

    Solution ?

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Aug 2004
    Posts
    94

    Re: Datagrid - PageIndex

    Ok, found it myself.

    For interesting people, you just have to replace the DataNavigateUrlFormatString in the page_load and the datagrid_PageIndexChanged event with something like "....aspx?PageIndex=...".

    Of course, in page 2 you need to send the "PageIndex" back.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width