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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Properly refreshing a non databound grid.

Thread ID:





9119 Dec 6,2003 10:09 PM UTC Dec 7,2003 09:29 PM UTC WinForms 2
Tags: GridControl
Administrator [Syncfusion]
Asked On December 6, 2003 10:09 PM UTC

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

Administrator [Syncfusion]
Replied On December 6, 2003 10:32 PM UTC

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

Jim Frapper
Replied On 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


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon