Hi,
you can set DataKeyField programmatically, but of course if you mean
changing the key value for separate rows (taking it from different column
based on row), then it is not possible. In that case, you'd pick the data
column you need via DataItem property of every DataGridItem (in
ItemDataBound for example).
--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke
"Alex" <no****@nospam.com> wrote in message
news:O5**************@TK2MSFTNGP10.phx.gbl...
I'm wondering how I can add data to the datakey property of the DataGrid.
It seems to be read only. How can I populate it?
I'm using data bound columns, however do not autogenerate the entire grid
table.