We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Unexpected behavior in RowStyles indexer

Thread ID:

Created:

Updated:

Platform:

Replies:

60857 May 14,2007 12:48 PM UTC May 14,2007 10:04 PM UTC WinForms 1
loading
Tags: GridControl
Dave Wilkins
Asked On May 14, 2007 12:48 PM UTC

FYI,

We discovered an issue with our application when setting a border for a particular row. We had an error that caused us to use an index of -1 in the grid's RowStyles property. The effect was to apply the border change to every row in the grid rather than throw an exception! Is that expected? I don't see anywhere in the docs that indicate this.

Thanks,

haneefm [Syncfusion]
Replied On May 14, 2007 10:04 PM UTC

Hi Dave,

For GridControl:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>
You can set rowstyles using grid.RowStyles collection. If you want to set an arbitrary range of cells, you can use grid.ChangeCells.

grid.RowStyles[5].Borders.All = GridBorder.Empty;
>>>>>>>>>>>>>>>>>>>>>>>>>>>>

For VirtualGrid:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Please refer to the below forum thread for more details.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=27259
>>>>>>>>>>>>>>>>>>>>>>>>>>>>

For DataBoundGrid.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>
You will have to use PrepareviewStyleInfo to do this.

Try code like this in PrepareviewStyleInfo to color the whole row.

if( e.ColIndex > 0 && e.RowIndex == 5)
{
e.Style.Borders.All = GridBorder.Empty;
}
>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Best regards,
Haneef

CONFIRMATION

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.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;