-
Notifications
You must be signed in to change notification settings - Fork 97
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
Comments
It's called |
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. |
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 like to use Binding suffix for properties of type `IBinding` where
you can't assign a value and may be executed in a different data
context. But I'm not very sure about it.
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.
Do you have some example? I'm afraid that it's impossible to inherit
both GridViewColumn and DotvvmControl.
|
Well, I don't. I thought about designing |
There are several properties on GridViewColumns ending with Binding suffix. I can take
ValueBinding
onGridViewTextColumn
as an example. Why do we use the Binding suffix here? I understand why it is used on properties likeItemKeyBinding
. But the reason does not apply in case ofValueBinding
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 likeDataSourceBinding
,ItemKeyBinding
,ValueBinding
, etc. As you can see these are different kinds of properties. WithValueBinding
we set the value being passed to another control. WithItemKeyBinding
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
The text was updated successfully, but these errors were encountered: