BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
Hi Yujing,
Thank you for your interest in Syncfusion products.
Query 1 1 special column can be edited
|
If you want to edit a column in a grid, you can use “AllowEdit” property as true. Please refer the below code,
Code: gridGroupingControl1.TableDescriptor.AllowEdit = true; gridGroupingControl1.Table.TableDescriptor.Columns[0].ReadOnly = true; gridGroupingControl1.Table.TableDescriptor.Columns[1].ReadOnly = false; gridGroupingControl1.Table.TableDescriptor.Columns[2].ReadOnly = true
|
Query 2 Modified data row index in a grid
|
If you want to modified data row index in a grid, you can use “TableControlCurrentCellEditingComplete”event. Please refer the below code,
Code: this.gridGroupingControl1.TableControlCurrentCellEditingComplete += new GridTableControlEventHandler(gridGroupingControl1_TableControlCurrentCellEditingComplete); void gridGroupingControl1_TableControlCurrentCellEditingComplete(object sender, GridTableControlEventArgs e) { GridCurrentCell cc = this.gridGroupingControl1.TableControl.CurrentCell; MessageBox.Show("Row "+cc.RowIndex.ToString()+", Column" +cc.ColIndex.ToString()); }
|
Query 3 background-color of the selected rows in a grid
|
If you want to change the selected row back color in a grid, you can use “SelectionBackColor” property. Please refer the below code,
Code: gridGroupingControl1.TableOptions.AllowSelection = GridSelectionFlags.Any | GridSelectionFlags.Row; gridGroupingControl1.TableOptions.ListBoxSelectionCurrentCellOptions = GridListBoxSelectionCurrentCellOptions.MoveCurrentCellWithMouse; gridGroupingControl1.TableOptions.ListBoxSelectionMode = SelectionMode.One; gridGroupingControl1.TableOptions.SelectionBackColor = Color.Yellow;
|
Please let us know if you have any concern.
Regards,
Muthukumar K
Hi Yujin,
Thanks for the update.
If you want to clear the style of selected row after editing completed in a cell, you can use Selections.Clear() method. Please refer the below code,
Code:
private void button3_Click(object sender, EventArgs e)
{
this.gridGroupingControl1.TableControl.Selections.Clear();
this.gridGroupingControl1.Refresh();
}
Please let us know if you have any concern.
Regards,
Muthukumar K
Hi Yujin,
We are glad to hear that the reported issue has been resolved. Please let us know if you need any further assistance.
Regards,
Muthukumar K