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

GridFilterBar and ReadOnly tables

Thread ID:





12426 Mar 30,2004 08:05 AM UTC Apr 5,2004 08:17 AM UTC WinForms 3
Tags: GridControl
Samuel Jack
Asked On March 30, 2004 08:05 AM UTC

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 12:29 PM UTC

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 07:41 AM UTC

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 08:17 AM UTC

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.


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