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

Properly refreshing a non databound grid.

I am attempting to combine a virtual grid with some filtering capabilities. However, when try for example: this.filteredAppointments.DefaultView.RowFilter = "FirstName LIKE 'as*'"; this.grdAppointments2.ResetVolatileData(); I have also tried removing and adding back the virtual grid event handlers as well. I cant get the grid to update itself with the filtered data. Here is my event handling code for reference. The variable filteredAppointments is a datatable: //provide the row count from the datasource void GridQueryRowCount(object sender, GridRowColCountEventArgs e) { e.Count = this.filteredAppointments.DefaultView.Count; e.Handled = true; } //provide the column count from the datasource void GridQueryColCount(object sender, GridRowColCountEventArgs e) { e.Count = this.filteredAppointments.Columns.Count; e.Handled = true; } //provide the data from the datasource void GridQueryCellInfo(object sender, GridQueryCellInfoEventArgs e) { if (e.RowIndex > 0 && e.ColIndex > 0) { e.Style.CellValue = this.filteredAppointments.DefaultView[e.RowIndex-1][e.ColIndex-1]; e.Handled = true; } } Cheers, JF

2 Replies

AD Administrator Syncfusion Team December 6, 2003 10:32 PM UTC

Instead of this.grdAppointments2.ResetVolatileData(); try this.grdAppointments2.Refresh();

JF Jim Frapper December 7, 2003 09:29 PM UTC

Dam, Did I mention I have the flu and my boss has me working this weekend :P Your suggestion works perfectly. JF

Live Chat Icon For mobile
Up arrow icon