sfDataGrid.CellDoubleClick += SfDataGrid_CellDoubleClick;
private void SfDataGrid_CellDoubleClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellClickEventArgs e)
{
var rowData = e.DataRow.RowData as OrderInfo;
if (e.DataRow.RowIndex > 0 && rowData != null)
{
var inlineForm = new InlineForm(rowData);
inlineForm.StartPosition = FormStartPosition.CenterParent;
inlineForm.ShowDialog();
e.DataRow.RowData = inlineForm.RowData;
}
} |
private void SfDataGrid_CellDoubleClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellClickEventArgs e)
{
if (e.DataRow.RowIndex > 0 && e.DataRow.RowData != null)
{
var propertiesProvider = this.sfDataGrid.View.GetPropertyAccessProvider();
//To get the value from the selected record.
var customerID = propertiesProvider.GetValue(e.DataRow.RowData, "CustomerID");
//To set the value to the particular field.
propertiesProvider.SetValue(e.DataRow.RowData, "CustomerID", "Edited");
}
} |