How to get PagedDataSource ItemIndex from Repeater item in OnTextChanged event?

Discussion in 'ASP .Net' started by Fred Dag, Jan 19, 2006.

  1. Fred Dag

    Fred Dag Guest

    I want to get the database table ID of a row in a Repeater that uses a
    PagedDataSource when OnTexctChanged event is fired. It seems that the
    DataSource property isn’t persisted when the event is triggered so I have to
    get the values from the database again. Correct?



    Or is there a way of hiding the row ID’s in the page?



    How do I get the correct values ie. find the table ID associated with this
    row in the repater? I need the variables from the Repeater and the
    PagedDataSource to find the correct row to update. How do I get these from
    an OnTextChanged event? WHat does the maths look like?



    Thanks in advance.
     
    Fred Dag, Jan 19, 2006
    #1
    1. Advertising

  2. RE: How to get PagedDataSource ItemIndex from Repeater item in OnTextC

    Fred,

    I have never used repeater, but I suspect that its use is similar to that
    of DataGrid control. In the grid, I can create an invisible column that is
    bind to the ID. Then in your event you can always refer to the Item property
    to retrieve row's values.

    HTH

    "Fred Dag" wrote:

    > I want to get the database table ID of a row in a Repeater that uses a
    > PagedDataSource when OnTexctChanged event is fired. It seems that the
    > DataSource property isn’t persisted when the event is triggered so I have to
    > get the values from the database again. Correct?
    >
    >
    >
    > Or is there a way of hiding the row ID’s in the page?
    >
    >
    >
    > How do I get the correct values ie. find the table ID associated with this
    > row in the repater? I need the variables from the Repeater and the
    > PagedDataSource to find the correct row to update. How do I get these from
    > an OnTextChanged event? WHat does the maths look like?
    >
    >
    >
    > Thanks in advance.
    >
    >
    >
    >
    >
     
    =?Utf-8?B?U2VyZ2V5IFBvYmVyZXpvdnNraXk=?=, Jan 20, 2006
    #2
    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. Stephan

    e.Item.ItemIndex returns wrong value

    Stephan, Jul 26, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    3,498
    Stephan Bussing
    Jul 26, 2004
  2. =?Utf-8?B?d3J5dGF0?=

    PagedDataSource, ArrayList, Repeater, Objects

    =?Utf-8?B?d3J5dGF0?=, May 20, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    875
    =?Utf-8?B?d3J5dGF0?=
    May 20, 2005
  3. Replies:
    1
    Views:
    1,864
  4. Joel Finkel

    DataGrid1.DataKeys[e.Item.ItemIndex] array index out of bounds

    Joel Finkel, Sep 4, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    364
    Joel Finkel
    Sep 4, 2003
  5. Scott M.

    e.Item.ItemIndex and e.Item.DataSetIndex

    Scott M., Nov 1, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    7
    Views:
    284
    Steven Cheng[MSFT]
    Apr 13, 2005
Loading...

Share This Page