Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
210
Get RowID Value in RowUpdated Event C#
posted

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();

            }

        }

    }

}

Parents Reply Children
No Data