Comments (10)
This situation was found after ABP upgraded Blazorise to 1.5.0, and since ABP allows dynamic configuration of columns, we encountered duplicate columns.
from blazorise.
@stsrki Not wanting to be that "told you so" person, but I will be:
Please advise since originally you asked for it to be magical, instead of opt in.
#3579
@realLiangshiwei As a workaround you can probably set some dummy invisible column to trick the system into not auto generating.
from blazorise.
I still believe we should do the "magic" and assume that if no columns are defined, they should be autogenerated. In the users provided example, they use the TItem, and later, they manually add columns that are already in the IItem model. Maybe in this scenario, it makes more sense to hide or show columns by using the new ColumnChooser feature?
from blazorise.
Well I have to disagree. Because we want the magic, then the user has to do figure out how to work around it. I'm still of the original belief with the explicit opt in. Or at least able to turn it off.
Anyway, now we went this route, and we need to find sound solutions... :)
Maybe in this scenario, it makes more sense to hide or show columns by using the new ColumnChooser feature?
Can you further explain what this entails?
The ColumnChooser is mainly an end user feature (the user that uses the UI).
Are you suggesting that the programmer will hide them programmatically, or is the end user with the UI?
Let's stay, for example, I have 100 properties in the Item (I'm exagerating of course...), should I have to pay the cost for the 100 columns and then hide them?
from blazorise.
I'm still of the original belief with the explicit opt in. Or at least able to turn it off.
Yes, an option to turn it off would be useful.
from blazorise.
I mean to use ColumnChooser programmatically. But we only have that option in the next 1.6 with #5404. And it is done through the state management. So it is not possible at the moment.
We could introduce an opt-out API, but should we use it in the current 1.5?
@realLiangshiwei, did you try the workaround that David suggested?
from blazorise.
did you try the workaround that David suggested?
This is a workaround, and yes, it works. I just think this code is a bit ugly
from blazorise.
We could introduce an opt-out API, but should we use it in the current 1.5?
Well I would say that this is basically the AutoGenerateColumns initially proposed? Just that it's set to true by default. I don't see why not. It's flexibility without any real cost.
If you told me that adding the Parameter
add any big downside... It seems like we are enforcing the "magic" just because we want to. Well we can enforce it by default, but let the user have something like AutoGenerateColumns
so he can just do AutoGenerateColumns=false
.
As usual I prefer to add it in v1.6 since there's indeed a workaround even though it's not super elegant.
But the change is so simple it wouldn't hurt to do it in v1.5, again, I personally just don't like new apis popping up mid release if not absolutely necessary.
So go ahead and let me know if you finally agree with the Parameter, or if you have any other idea, and what version would you prefer to do this on.
from blazorise.
You have convinced me. Do the change in 1.5, and if it is not too big, once I review, then it will be merged in.
The API will be AutoGenerateColumns
and, by default, is enabled.
from blazorise.
@David-Moreira reminder
from blazorise.
Related Issues (20)
- [2.0] Gutter utility
- Dropdownlist Checkbox Selection Filter HOT 2
- TextDecoration utilities
- Migrate GH Support Project HOT 1
- 1.7 changelog
- ObjectFit utility
- [Bug]: Autocomplete issues when Cropper is used HOT 17
- Timeline component HOT 2
- [Bug]: Cannot seem to disable the detail row click on the datagrid multi selection checkbox
- Default video subtitle HOT 4
- Method not found: 'Void Blazorise.Modules.BaseJSModule (DataGrid) HOT 16
- Tooltip delay HOT 3
- [Bug]: Animate Extension Does not work with scrolling content HOT 3
- Optimize the check of Breakpoints in the ClassProvider
- [Bug]: Validator dateTime HOT 3
- [Bug]: Validation on RadioGroup is not red
- [Bug]: "System.InvalidOperationException: The render handle is not yet assigned." when using "ModalRenderMode.LazyReload" HOT 10
- Enterprise Plus pricing
- Make a serialization object for JS interops
- [Bug]: CarouselSlide error HOT 8
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 blazorise.