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.

GridFilterBar and ReadOnly tables

Thread ID:

Created:

Updated:

Platform:

Replies:

12426 Mar 30,2004 03:05 AM Apr 5,2004 04:17 AM Windows Forms 3
loading
Tags: GridControl
Samuel Jack
Asked On March 30, 2004 03:05 AM

I have a GridFilterBar attached to my GridDataBound control. When I set the Grid control to ReadOnly the filter bar row becomes like a blank header row. I want the Filter Bar to be enabled even when the Grid is read only. How can I do this? Thanks, Sam

Administrator [Syncfusion]
Replied On March 30, 2004 07:29 AM

In the Filterbar sample, if I set either Me.gridDataBoundGrid1.Binder.EnableEdit = false or Me.gridDataBoundGrid1.TableStyle.ReadOnly = true at the bottom of FormLoad, I do not see an empty filter row. How are you setting your readonly property? Are you setting it before you wire the filterbar? If so, you might try calling grid.IgnoreReadOnly = true before you wire the filterbar, and then set it back false afterwards.

Samuel Jack
Replied On April 5, 2004 03:41 AM

Setting IgnoreReadOnly to true before wiring the filter bar to the grid works (ie the filter bar is displayed properly and I can select items from its dropdown). However, I now have another problem: Selecting an item to filter by does not work when the grid is set to read only (ie grid.Model.ReadOnly = true). The rows remain stubbornly unfiltered. We have a requirement that in particular cases users should not be able to edit the data in the grid, only view it. However in those cases users might well want to filter the information. Hope you can help. Sam

Administrator [Syncfusion]
Replied On April 5, 2004 04:17 AM

Using this.gridDataBoundGrid1.Binder.EnableEdit= false; instead of this.gridDataBoundGrid1.Model.ReadOnly = true; allows the filter to work for me, and still makes the grid uneditable. If you want to use ReadOnly settings, then instead of setting Model.ReadOnly, set grid.TableStyle.Readonly. Then subscribe to the grid.Model.QueryCellInfo event, and there set e.StyleRadOnly = false if e.RowIndex == 1.

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.

;