Plz Help---GridView and Cells text

Discussion in 'ASP .Net Building Controls' started by Shafia, Apr 13, 2005.

  1. Shafia

    Shafia Guest

    Hi,
    I have a TreeView and a GridView in my UI. On a "CheckChanged" event of
    tree, I do the following
    GridView1.Rows[nextRow].Cells[0].Text = e.Node.Text;

    or rather

    ((Label)GridView1.Rows[newRow].Cells[0].FindControl("Label5")).Text =
    e.Node.Text;

    static newRow = 0; and
    newRow is incremented on each event call
    I need to insert tree node items to the first cells of GridView rows on
    subsequent event firing. The problem is when I click a tree node 2nd time

    (to set Rows[1].Cells[0].Text) the value from Rows[0].Cells[0].Text
    disappears.

    What should I do to have it there?

    Plz help me,

    Shafia
     
    Shafia, Apr 13, 2005
    #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. Replies:
    1
    Views:
    400
  2. Replies:
    2
    Views:
    354
    Nick Keighley
    Nov 24, 2006
  3. Replies:
    1
    Views:
    359
  4. Joel Finkel

    Cells[].Text or Cells[].Controls[0]

    Joel Finkel, Sep 1, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    319
    Joel Finkel
    Sep 1, 2003
  5. Shafia

    Plz Help.....GridView and Cells text

    Shafia, Apr 13, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    113
    Shafia
    Apr 13, 2005
Loading...

Share This Page