How can I toggle-freeze on a cell in XamSpreadSheet. Say I want to freeze on cell D7 on the sheet. How can I do it programmatically from code behind.
Hello Sherry,
In order to freeze the XamSpreadsheet based on a specific cell (all rows above it and all columns left of it), you can use a SpreadsheetCommand with a SpreadsheetCommandType set to ToggleFreezePanes. This command will freeze the control based on the currently active cell by default (we can set the active cell in code-behind).
For example:
spreadsheet.ActiveCell = new SpreadsheetCell("D7"); SpreadsheetCommand cmd = new SpreadsheetCommand(SpreadsheetCommandType.ToggleFreezePanes);cmd.Execute(spreadsheet);
SpreadsheetCommand cmd = new SpreadsheetCommand(SpreadsheetCommandType.ToggleFreezePanes);cmd.Execute(spreadsheet);
For more detailed information on working with the commands for the XamSpreadsheet, you can take a look at the following topic.
I have attached a sample application that demonstrates the approach from above.
If you have any questions, please let me know.