What is the Equivalent of the CurrentRowIndex Property for a DataGrid Web Control?

Discussion in 'ASP .Net Web Controls' started by .NETn00b, Nov 26, 2005.

  1. .NETn00b

    .NETn00b Guest

    I am trying to convert the following windows app method, to use in an
    ASP.NET application:

    private void DataGrid1_CurrentCellChanged(object sender, EventArgs e)
    {

    int c = DataGrid1.CurrentRowIndex;
    DataGrid1.Select(c);
    DataGrid1_Click( sender, e);

    }

    The problem is that there is no CurrentRowIndex property for the
    DataGrid web control. Is there something else I can use, that will give
    me similar functionality?

    I also need to figure out what I can use in place of the Select method,
    which also doesn't exist for the DataGrid web control. Would
    SelectedIndex work? Can this method be adapted?

    Thanks!!!
     
    .NETn00b, Nov 26, 2005
    #1
    1. Advertising

  2. .NETn00b

    Hans Guest

    This might be done with the hittest function?

    this is like:
    hti:=Grid.HitTest(e.X, e.Y);


    Hans

    ".NETn00b" <> schreef in bericht
    news:...
    >I am trying to convert the following windows app method, to use in an
    > ASP.NET application:
    >
    > private void DataGrid1_CurrentCellChanged(object sender, EventArgs e)
    > {
    >
    > int c = DataGrid1.CurrentRowIndex;
    > DataGrid1.Select(c);
    > DataGrid1_Click( sender, e);
    >
    > }
    >
    > The problem is that there is no CurrentRowIndex property for the
    > DataGrid web control. Is there something else I can use, that will give
    > me similar functionality?
    >
    > I also need to figure out what I can use in place of the Select method,
    > which also doesn't exist for the DataGrid web control. Would
    > SelectedIndex work? Can this method be adapted?
    >
    > Thanks!!!
    >
     
    Hans, Nov 29, 2005
    #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. Bob Loveshade
    Replies:
    0
    Views:
    395
    Bob Loveshade
    Nov 26, 2005
  2. .NETn00b
    Replies:
    1
    Views:
    1,271
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
    Nov 26, 2005
  3. Replies:
    1
    Views:
    580
    Eliyahu Goldin
    Nov 13, 2007
  4. .NETn00b
    Replies:
    1
    Views:
    163
    Elton Wang
    Nov 27, 2005
  5. .NETn00b
    Replies:
    0
    Views:
    131
    .NETn00b
    Nov 26, 2005
Loading...

Share This Page