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

PrepareViewStyleInfo Event - DataBoundGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

16834 Jul 26,2004 09:06 AM UTC Jul 27,2004 05:27 AM UTC WinForms 3
loading
Tags: GridControl
Satish
Asked On July 26, 2004 09:06 AM UTC

Clay, I have sitution where I need to callt below event. I tried calling using the below code but no luck. this.gridDataBoundGrid1.PrepareViewStyleInfo += new GridPrepareViewStyleInfoEventHandler(grid_PrepareViewStyleInfo); I would like to change the background color of the row. User will click on some cell, then we open the dialogbox to enter some row number. Once we return back to the calling problem that particular row background color should be changed! Thanks Satish

Administrator [Syncfusion]
Replied On July 26, 2004 09:22 AM UTC

You do not call PrepareViewStyleInfo. Instead, you tell the grid to repaint itself, and during this process, the PrepareViewStyleInfo event is raised. So, in your button handler, you might include code like, grid.Focus(); grid.RefreshRange(GridRangeInfo.Row(someRowIndex)); to have the grid redraw the row whose index is someRowIndex.

Satish
Replied On July 27, 2004 04:17 AM UTC

Clay, Thanks a lot. Please find the attachment. In this file I would like to make whole (selected) row background color change not a single column. How to achieve this. Thanks, Satish >You do not call PrepareViewStyleInfo. Instead, you tell the grid to repaint itself, and during this process, the PrepareViewStyleInfo event is raised. > >So, in your button handler, you might include code like, > >grid.Focus(); >grid.RefreshRange(GridRangeInfo.Row(someRowIndex)); > >to have the grid redraw the row whose index is someRowIndex. DisableCol2_9544.zip

Administrator [Syncfusion]
Replied On July 27, 2004 05:27 AM UTC

Comment out this line in your PrepareViewStyleInfo so the coloring code is hit for every column, not just the perJobColIndex column. //if (e.ColIndex == perJobColIndex)

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

;