Hello All,
I have the IP address of the user and I want to set one of the columns in the data source of the grid. In Pseudo code, I want to achieve the following
MyGrid . RowBeingUpdated . Column ("IPAddress).Value = "192.168.1.1";
Could someone advise which event I should use and the syntax to update the cell value. I have tried to get it working with DataKeyValues, but am not familiar enough yet to get it working.
I have included below the code that I used with the VS2008 default grid, and it works fine for that control.
Thanks in advance,
Mark Breen
Ireland
<snip>
protected void LinqDSBoatBuilders_Inserting(object sender, LinqDataSourceInsertEventArgs e)
{
BoatBuilder oRec = (BoatBuilder)e.NewObject; //This is my LINQtoSQL data source
oRec.CreatedOnDate = DateTime.Now;
oRec.CreatedByIPAddress = GetIPAddress();
}
</snip>