We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Double Click even for GridGroupingControl

Hi, I've just used GridGroupingControl to display a list of contacts retrieved from a dB contact table. I'd like to allow the user to double click on a row to open up a contact edit form. How can I do this? Thx.


1 Reply

AD Administrator Syncfusion Team March 31, 2008 10:12 PM UTC

Hi cheung,

To open up a contact edit form by double clicking in a row you need to handle below code snippet in TableControlCllDoubleClick event.

Form2 f = new Form2();

Record rec = e.TableControl.Table.CurrentRecord;

f.Col0 = rec.GetValue("Col0").ToString() ;
f.Col1 = rec.GetValue("Col1").ToString();
f.Col2 = rec.GetValue("Col2").ToString();
f.Col3 = rec.GetValue("Col3").ToString();

f.ShowDialog();
if (f.DialogResult == DialogResult.OK)
{
rec.SetValue("Col0", f.Col0);
rec.SetValue("Col1", f.Col1);
rec.SetValue("Col2", f.Col2);
rec.SetValue("Col3", f.Col3);
}


Please refer the sample for implementation and let me know me know if you need further assistance.

Sample:


http://websamples.syncfusion.com/samples/Grid.Windows/F72642/main.htm


Best regards,
Johnson




Loader.
Live Chat Icon For mobile
Up arrow icon