Query
Solution Feedback
|
As per screenshots, we understood that the you don’t want to set the selection backcolor by hardcode and the selection backcolor should be taken from the backcolor of the row. As per this case, we had provided the solution as ListBoxSelectionColorOptions = GridListBoxSelectionColorOptions.None.
We have provided the information about all the options available in the Selections in the below UG link,
We have provided information about customization and workarounds in the below Knowledge Base,
We will ensure that this kind of miscommunication won’t happen anymore in the future. Thanks for your understanding.
|
Query
How can I detect the the cell style info event QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e) being on a "selected row"?
|
The row can be checked if it is selected or not by the using the GetRecord().IsSelected() method. Please make use of the below code,
this.gridGroupingControl1.QueryCellStyleInfo += new
GridTableCellStyleInfoEventHandler(gridGroupingControl1_QueryCellStyleInfo);
void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if (e.TableCellIdentity != null && (e.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell
|| e.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell) &&
e.TableCellIdentity.DisplayElement.GetRecord().IsSelected())
e.Style.BackColor = Color.Red;
}
|
Private Sub TableModel_QueryColWidth(sender As Object, e As GridRowColSizeEventArgs)
Apparently, both solutions get into an infinite loop on the form opening. It is not an important feature at the moment, just a "nice-to-have", maybe the team could think of integrating a dedicated property for this one in a future deployment. My side, I consider the case as closed, but let me know if there is any development, thanks to the team - Nicolas