The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I took the modified sort by column from the samples and modified it for my virtual grid. However, due to something unknown that I have done, the sort direction arrow on the column header 1) only shows on column 1, and 2) doesn't change when clicked. I have the data source sorting correctly, and the grid displays is correctly.
Please check the enclosed file for the code. I've remove most of the extraneous code not applicable to this situation.
Also, please explain what mechanism causes the arrow to show and how to change its indication.
Thanks in advance,
Jim Stewart
ADAdministrator Syncfusion Team July 15, 2003 06:48 AM UTC
You said you removed some code from the file. Have you overridden OnSaveCellInfo? If so, are you setting e.Handled = true when e.RowIndex = 0. If you did, then the grid is not trying to save the values you set into the header cells. In particular, it will not be saving the Tag object that is used to handle the sorting header. This might explain the behavior you are seeing.
JSJim StewartJuly 15, 2003 12:02 PM UTC
Thinking that was extraneous, I did remove it. As it turns out, you caught it without even seeing it! Here's the old code:
protected override void OnSaveCellInfo(GridSaveCellInfoEventArgs e)
{
if (m_AllowEdits && e.RowIndex > 0 && e.ColIndex > 0)
{
object data = m_Data[e.RowIndex - 1];
GridStyleInfo gridStyle = e.Style;
m_CellInfo[e.ColIndex].SaveCellData (gridStyle, data);
}
e.Handled = true;
}
When I move the e.Handled into the if block, That takes care of it.
Thanks so much.