assign value to a cell referencing by column name in itemdatabound

Discussion in 'ASP .Net Datagrid Control' started by gane, Jun 1, 2006.

  1. gane

    gane Guest

    Hi,

    I would like to assign a value to a datagrid item using the column name
    instead of using something like e.item.cell[1].text in itemdatabound

    eg:
    DataRowView rv = (DataRowView)e.Item.DataItem;
    string strLocation = Convert.ToString(rv.Row["locationptr"].ToString())

    I used dataitem to fetch, but i donno how to assign some value.

    Thanks
    Gane
     
    gane, Jun 1, 2006
    #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. =?Utf-8?B?ZGF2aWQ=?=
    Replies:
    11
    Views:
    1,028
    deandany
    Jul 17, 2006
  2. simon
    Replies:
    0
    Views:
    326
    simon
    Mar 1, 2007
  3. asgars
    Replies:
    1
    Views:
    2,395
    Patrice
    May 11, 2010
  4. cnSoftware

    assign value to a new column

    cnSoftware, Dec 27, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    149
    Eliyahu Goldin
    Dec 27, 2004
  5. xzzy

    how to get value of datarow column on ItemDataBound

    xzzy, Jun 18, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    400
    Bhuva
    Jun 19, 2006
Loading...

Share This Page