Posted 30 March 2023, 2:11 pm EST
Hi Mayur,
a. Since you have set C1NumericBox inside the cell template of the DataGridTemplateColumn, then you can handle the increment/decrement button clicks by handling C1NumericBox’s ValueChanged event.
b. In order to get the row details on clicking the C1NumericBox column element, you will first need to set the datagrid’s RowDetailsVisibilityMode to VisibleWhenSelected as shown in the following line of code:
datagrid.RowDetailsVisibilityMode = C1.WPF.DataGrid.DataGridRowDetailsVisibilityMode.VisibleWhenSelected;
and then handle the datagrid’s PreviewMouseLeftButtonDown event as shown below:
private void datagrid_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
var cell = datagrid.GetCellFromPoint(e.GetPosition(this));
if(cell.Column.Index == 1)
{
datagrid.SelectedItem = cell.Row.DataItem;
}
}
Kindly refer to the attached sample for implementation. See NumericColumnDataGrid_Mod.zip
Thanks & Regards,
Aastha