Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
20569 | Oct 21,2004 07:16 AM UTC | Dec 12,2004 10:30 AM UTC | WinForms | 8 |
![]() |
Tags: Grouping |
private void gridGroupingControl1_TableControlPrepareViewStyleInfo(object sender, GridTableControlPrepareViewStyleInfoEventArgs e)
{
GridTableCellStyleInfo style = (GridTableCellStyleInfo) e.Inner.Style;
if (style.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell
|| style.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell
|| style.TableCellIdentity.TableCellType == GridTableCellType.AddNewRecordFieldCell)
{
Record r = style.TableCellIdentity.DisplayElement.ParentRecord;
if (r.IsCurrent)
{
GridControlBase grid = e.TableControl;
if (!grid.CurrentCell.HasCurrentCellAt(e.Inner.RowIndex, e.Inner.ColIndex))
{
e.Inner.Style.BackColor = SystemColors.Highlight;
e.Inner.Style.TextColor = SystemColors.HighlightText;
}
}
}
}
Stefan
> private void gridGroupingControl1_TableControlPrepareViewStyleInfo(object sender, GridTableControlPrepareViewStyleInfoEventArgs e)
> {
> GridTableCellStyleInfo style = (GridTableCellStyleInfo) e.Inner.Style;
> if (style.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell
> || style.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell
> || style.TableCellIdentity.TableCellType == GridTableCellType.AddNewRecordFieldCell)
> {
> Record r = style.TableCellIdentity.DisplayElement.ParentRecord;
> if (r.IsCurrent)
> {
> GridControlBase grid = e.TableControl;
> if (!grid.CurrentCell.HasCurrentCellAt(e.Inner.RowIndex, e.Inner.ColIndex))
> {
> e.Inner.Style.BackColor = SystemColors.Highlight;
> e.Inner.Style.TextColor = SystemColors.HighlightText;
> }
> }
> }
> }
>
>
>
>Stefan
> This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.