I'm trying to get the value of the IDPair of the row that triggered the event. How do I go about doing that in c#
void WebDatGrid1_RowUpdated(object sender, Infragistics.Web.UI.GridControls.RowUpdatedEventArgs e)
{
if(e.Exception == null)
var x = e.RowID.Values; <--- I would like to get the value here to query the SQL database and get values related to that row. Not the Key..
using(SqlConnection conn = new SqlConnection(connectionstring)
using(SqlCommand command = conn.CreateCommand())
command.CommandText= "SELECT blah FROM tblBLAH WHERE PrimaryKey = @x";
command.Parameters.AddWithValue("@x, x.ToString());
conn.Open();
int result = command.ExecuteNonQuery();
conn.Close();
}
Please remove I figured it out on my own..
string x = e.RowID.Key;
Thank you for sharing this solution so that other community members can benefit from it also !