I don't think the ValueField and TextField properties exist for the BoundDataField element, but I want to do something like this:
I have a WDG with a DropDownProvider. I've defined that ValueField and TextField properties on the DDP so it shows text to the UI, but has numeric values that the text represent.
My problem occurs when I bind my WDG. The row's value defaults to the text representation of the data. It's causing the RowUpdating event to fire even if I don't change the drop down value because in the background the rows value is being changed to the numeric.
Am I making sence?
Hello ssd ,
Thank you for posting in our forums.
Can you please describe in more details what do you mean by :
The row's value defaults to the text representation of the data. It's causing the RowUpdating event to fire even if I don't change the drop down value because in the background the rows value is being changed to the numeric.
Is it possible to provide us with an isolated sample reproducing the issue?
Another option is to give steps to reproduce in order to replicate the issue on my side?
Hope hearing from you.
have you had a chance to look into this issue?
Hello Walter,
Yes, I had the chance to look into the sample and was able to reproduce the issue.
It happens because the Provider formats the value and it accepts the int like a new one.
I will investigate it further and will update you.
Thank you for your patience while I was working on this.
As you have DataFieldName="ColorName" in the WebDataGrid and the provider value is ColorId, so the value of the cell does switch even when not changing, it is correct that the event fires. This is the behavior by design.
The issue comes if the DataFieldName is ColorId, its value is 0 initially and displaying Red, but the event still fires.I will log this behavior as development issue and will keep you updated through the support ticket (CAS-66522-10QXL6) .