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

Properly refreshing a non databound grid.

Thread ID:

Created:

Updated:

Platform:

Replies:

9119 Dec 6,2003 05:09 PM Dec 7,2003 04:29 PM Windows Forms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On December 6, 2003 05:09 PM

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 05:32 PM

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

Jim Frapper
Replied On December 7, 2003 04:29 PM

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

CONFIRMATION

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.

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.

;