QueryRange Event

Occurs when grid queries for Syncfusion.XlsIO.IRange information about a specifc cell while rendering.
Public Event QueryRange As SpreadsheetQueryRangeEventHandler
Dim instance As SpreadsheetGrid
Dim handler As SpreadsheetQueryRangeEventHandler
AddHandler instance.QueryRange, handler
public event SpreadsheetQueryRangeEventHandler QueryRange
Event Data

The event handler receives an argument of type SpreadsheetQueryRangeEventArgs containing data related to this event. The following SpreadsheetQueryRangeEventArgs properties provide information specific to this event.

Gets the value indicating the instance of Syncfusion.UI.Xaml.Grid.ScrollAxis.RowColumnIndex of cell.  
Gets or sets the type of the cell.  
Gets or sets the value of the specified cell.  
Gets the Syncfusion.XlsIO.IRange of the cell.  
Gets the Syncfusion.XlsIO.IStyle of the cell.  
Gets or sets whether the event should be handled or not. (Inherited from Syncfusion.UI.Xaml.CellGrid.Helpers.GridHandledEventArgs)
Gets the Syncfusion.XlsIO.IWorksheet of the cell.  
var grid = spreadsheet.ActiveGrid;
void grid_QueryRange(object sender, SpreadsheetQueryRangeEventArgs e)
   if (e.Cell.ColumnIndex == 5)
       e.ExcelStyle.ColorIndex = ExcelKnownColors.Blue;

Syncfusion.SfSpreadsheet.WPF: 17.1460.0.47

See Also