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. Image for the cookie policy date

QueryCellInfo and Border help

It is easy to know what cell is being rendered but I would like to know if is there is a fast way to determine what is immediately under the rendered cell?

Look at this image: http://prntscr.com/fesyr

My goal is to put a bottom border on the light red rectangular cells if the cell immediately below it is a grouping cell.  You cannot simply just supply a rowIndex+1, colIndex (I don't think)...

How can one achieve this and as fast as possible in the query cell info?

Thanks!
-jv


1 Reply

VK Vinish Kumar K Syncfusion Team September 15, 2012 03:01 PM UTC

The Style.Border property is used to set the border in GridGroupingControl cell. If you need the Border in every three columns, then please try using Style.Border.Right property with conditional statements in QueryCellStyleInfo event to achieve this behavior. The Right property is used to Draw the Border in Right side of the cell.
Refer the code below:

 void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if (((e.TableCellIdentity.ColIndex+2) % 3) == 0)
{
e.Style.Borders.Bottom = new GridBorder(GridBorderStyle.Solid, Color.Black);           
}
}
 
Above code is user to draw the border in bottom in GGC. Please let me know if i misunderstood your query . 
 
 
Let me know if you need more information.
 
Regards,
Vinish.

Loader.
Live Chat Icon For mobile
Up arrow icon