The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I am using a tabBarSplitterControl and am dynamically adding a GridControl to a TabBarPage and the TabBarPage to the tabBarSplitterControl.
I am also subscribing to the CurrentCellActivated event of the new GridControl
In this event I am using the following code
GridControl item = (GridControl)sender; GridCurrentCell cc = item.CurrentCell; GridStyleInfo style = new GridStyleInfo(); GridStyleInfo style1 = new GridStyleInfo(); style.BackColor = VoucherBackGroundColor; style1.BackColor = Color.LightGray; if (cc.MoveToRowIndex != cc.MoveFromRowIndex) { item.ChangeCells(GridRangeInfo.Cells(cc.MoveFromRowIndex, 1, cc.MoveFromRowIndex, 6), style); item.ChangeCells(GridRangeInfo.Cells(cc.MoveToRowIndex, 1, cc.MoveToRowIndex, 6), style1); }
I have tried simply to change the background color of the curent row of the GridControl by using item.RowStyles[cc.MoveFromRowIndex].BackColor = VoucherBackGroundColor; item.RowStyles[cc.MoveToRowIndex].BackColor = Color.LightGray;
but this has not worked also
I would like the background color of the current row in this grid to change on the user changing the row thru keyboard / mouse
I forgot to add that the GridControl is populated by populatevalues method and the source is a generic list.
Thanks Again Rahul
>Hi
This problem relates to
Syncfusion.Windows.Forms.Grid.GridControl
I am using a tabBarSplitterControl and am dynamically adding a GridControl to a TabBarPage and the TabBarPage to the tabBarSplitterControl.
I am also subscribing to the CurrentCellActivated event of the new GridControl
In this event I am using the following code
GridControl item = (GridControl)sender; GridCurrentCell cc = item.CurrentCell; GridStyleInfo style = new GridStyleInfo(); GridStyleInfo style1 = new GridStyleInfo(); style.BackColor = VoucherBackGroundColor; style1.BackColor = Color.LightGray; if (cc.MoveToRowIndex != cc.MoveFromRowIndex) { item.ChangeCells(GridRangeInfo.Cells(cc.MoveFromRowIndex, 1, cc.MoveFromRowIndex, 6), style); item.ChangeCells(GridRangeInfo.Cells(cc.MoveToRowIndex, 1, cc.MoveToRowIndex, 6), style1); }
I have tried simply to change the background color of the curent row of the GridControl by using item.RowStyles[cc.MoveFromRowIndex].BackColor = VoucherBackGroundColor; item.RowStyles[cc.MoveToRowIndex].BackColor = Color.LightGray;
but this has not worked also
I would like the background color of the current row in this grid to change on the user changing the row thru keyboard / mouse