Syncfusion.SfSpreadsheet.WPF
Example 


QueryRange Event

Occurs when grid queries for Syncfusion.XlsIO.IRange information about a specifc cell while rendering.
Syntax
'Declaration
 
Public Event QueryRange As SpreadsheetQueryRangeEventHandler
'Usage
 
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.

PropertyDescription
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.  
Example
var grid = spreadsheet.ActiveGrid;
grid.QueryRange+=grid_QueryRange;
void grid_QueryRange(object sender, SpreadsheetQueryRangeEventArgs e)
{
   if (e.Cell.ColumnIndex == 5)
       e.ExcelStyle.ColorIndex = ExcelKnownColors.Blue;
}
AssemblyVersion

Syncfusion.SfSpreadsheet.WPF: 17.1460.0.47

See Also