Comments (7)
Hello, are you talking about this behaviour? #116
from advanceddatagridview.
Hello, are you talking about this behaviour? #116
Nope. I would expect setting the AdvancedDataGridView.FilterAndSortEnabled
property to false to disable filtering and sorting for the whole data grid, but when changing the values of a filtered column when this is set to false will still cause the rows to be removed from the grid view.
from advanceddatagridview.
I still don't fully understaind. Can you share a sample project?
from advanceddatagridview.
I still don't fully understand. Can you share a sample project?
Have a look at this fork: https://github.com/will-scc/advanceddatagridview/tree/master
I've added lines 418 onwards to FormMain.cs
to hopefully demo the issue I'm having. Let me know if that helps, or if I can provide any further detail.
First, set the filter on the boolean
column to be either true or false:
Then, select a number of cells in the boolean
column:
Then, right click -> Toggle Boolean:
Note that every time the cell value changes, the row is removed from the grid view (causing the CellEnter event to be triggered for the next cell). I would expect the rows to remain in view until AdvancedDataGridView.FilterAndSortEnabled
is set back to true.
I hope that makes sense?
Also note, I had to update references to net40 to net48 to get it to build. If that causes you issues you should be able to change them back.
from advanceddatagridview.
I'm still not sure about the behaviour you are searching for.
Could it be SetFilterAndSortEnabled on the column instead, like below?
private void toggleBooleanToolStripMenuItem_Click(object sender, EventArgs e)
{
//after this, i would not expect see any filtering behaviour happening (i.e. rows removed from view)
//advancedDataGridView_main.FilterAndSortEnabled = false;
advancedDataGridView_main.SetFilterAndSortEnabled(advancedDataGridView_main.Columns["boolean"], false);
foreach (DataGridViewCell cell in advancedDataGridView_main.SelectedCells)
{
if (cell.ColumnIndex == 6)
{
//Swap cell value for demo
cell.Value = !(bool)cell.Value;
}
}
//once this is set, filtering can happen again and now rows should disappear from view
//advancedDataGridView_main.FilterAndSortEnabled = false;
advancedDataGridView_main.SetFilterAndSortEnabled(advancedDataGridView_main.Columns["boolean"], true);
}
from advanceddatagridview.
Setting AdvancedDataGridView.FilterAndSortEnabled = false
does not disable filtering and sorting on the data grid view... I'm not sure how else to say that. 😅
I tried advancedDataGridView_main.SetFilterAndSortEnabled(advancedDataGridView_main.Columns["boolean"], false);
but doing so changes the SelectedCells property to a random cell (it seems), so it kinda breaks everything else.
from advanceddatagridview.
The FilterAndSortEnabled field is supposed to work on component initialization, taking the AdvancedDataGridViewSample project as example, you can add this line at the end of the FormMain costructor
advancedDataGridView_main.FilterAndSortEnabled = false;
The SetFilterAndSortEnabled method works after the columns has been added too. Of course it change the underlying datasource Filter, so the selected cell changes, you have to record the selected cell, and set it back again.
from advanceddatagridview.
Related Issues (20)
- When filtered is all the data still there HOT 5
- .NetCore WinForm App Crashes
- Filter records based over the whole records when I use select top x HOT 3
- Workaround or fix for column names containing square brackets HOT 1
- Filtering only shows selected values in the filter dialog HOT 4
- Set filter programmatically HOT 7
- how to disable checkbox cell after filter data? HOT 2
- how to speed up filter menu in adgv? HOT 1
- AdvancedDatagridView - 1.2.28405.11 - Problem when clicking on filter / search drop down HOT 2
- Filter/Sort doesn't work on DataGridViewComboBoxColumn HOT 2
- How to use Advanced DataGridView Search Tool Bar HOT 1
- High DPI screens have tiny icon for filtering HOT 11
- filter button_click events HOT 4
- Verticle Scroll Bars Disappear HOT 2
- Filter Support On Toolbar HOT 4
- create progressbar in advancedatagridview
- Filtering columns with fonts like wingdings HOT 11
- how to paginating data in advanced data grid view? HOT 1
- Column Header Size Issue with ADGV created in previous version. HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from advanceddatagridview.