assign value to a cell referencing by column name in itemdatabound

G

gane

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top