Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Binding suffix from properties on GridViewColumns #469

Open
djanosik opened this issue Oct 3, 2017 · 4 comments
Open

Remove Binding suffix from properties on GridViewColumns #469

djanosik opened this issue Oct 3, 2017 · 4 comments

Comments

@djanosik
Copy link
Contributor

djanosik commented Oct 3, 2017

There are several properties on GridViewColumns ending with Binding suffix. I can take ValueBinding on GridViewTextColumn as an example. Why do we use the Binding suffix here? I understand why it is used on properties like ItemKeyBinding. But the reason does not apply in case of ValueBinding property.

We have followed this pattern in BP GridView. The more I think about it, the less it makes sense. Let's take a look at GridViewComboBoxColumn. It has properties like DataSourceBinding, ItemKeyBinding, ValueBinding, etc. As you can see these are different kinds of properties. With ValueBinding we set the value being passed to another control. With ItemKeyBinding we set the binding (not the value).

What do you think about this? When to use the Binding suffix a when not to?

@tomasherceg @exyi @martindybal

@djanosik djanosik added this to the Version 2.0 milestone Oct 3, 2017
@exyi exyi modified the milestones: Version 2.0, Future Oct 10, 2017
@exyi
Copy link
Member

exyi commented Oct 10, 2017

It's called ... Binding because you are not specifying exact value but an expression that computes it for each row. Maybe you right, but I don't think it's a big deal and we certainly cannot do that now, as it would be a breaking change in dothtml markup.

@djanosik
Copy link
Contributor Author

It's not a big deal. Just thinking about where to use this suffix and where not to. I can't find a rule that fits all cases. Is it ok from you point of view that all bindable properties on Columns and similar objects have the binding suffix?

I wonder what happens if Column is a control that can also be used outside of GridView. Suddenly you can specify the exact value because you are not in context of a row.

@exyi
Copy link
Member

exyi commented Oct 10, 2017 via email

@djanosik
Copy link
Contributor Author

Well, I don't. I thought about designing FilterEditor in BP in a way it can be used as a separate control or as part of a FilterBuilder control. Maybe I am thinking to much about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants