Datagrid Problem

Discussion in 'ASP .Net Datagrid Control' started by pargat singh, Feb 6, 2004.

  1. pargat singh

    pargat singh Guest

    Hello .Net Users

    I have two datagrid on page and one move button(button).
    Both datagrid has same data like client_id,client_name.
    I want to do the following

    1. When i click on second datagrid i want that row to be highlighted.

    ( I added a template column and add select button and
    OnItemCommand="HighLightME"

    Sub HighLightME(ByVal source As Object, ByVal e As
    System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
    DataGrid1.ItemCommand
    If Session("test") = 1 Then
    Session("oObj").Item.BackColor =
    System.Drawing.Color.white End If

    e.Item.BackColor = System.Drawing.Color.Green
    LastColoredIndex = e
    Session("oObj") = LastColoredIndex
    Session("test") = "1"

    End Sub

    Where LastColoredIndex = Public LastColoredIndex As
    System.Web.UI.WebControls.DataGridCommandEventArgs



    it is working fine but the problem is when i select second row first
    row remain green and after click second row also become green.So i
    endup with both green row,but i want when i click on second row first
    row should change back to original color.Please help.

    2.Suppose No.1 is working.When i click on first datagrid selected row
    should be highlighted (Same as No.1) and when i press Move button
    selected row from first datagrid should move under the selected row of
    second datagrid.

    Can anyone please help me.
    I am using vb.net.
    Please provide sample code.
    Any help is much appriciate.

    Thanks in advance.

    P Gill
     
    pargat singh, Feb 6, 2004
    #1
    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. sajvargs
    Replies:
    0
    Views:
    383
    sajvargs
    Feb 20, 2005
  2. DC
    Replies:
    2
    Views:
    615
  3. Andreas Klemt
    Replies:
    0
    Views:
    310
    Andreas Klemt
    Oct 8, 2003
  4. roberto
    Replies:
    1
    Views:
    228
    roberto
    Feb 17, 2005
  5. John Walsch
    Replies:
    0
    Views:
    202
    John Walsch
    Jul 9, 2004
Loading...

Share This Page