21 Answers, 1 is accepted
This will leave only the Clear Value option for you.
hope that helps
Its really Helps me..
I have two GridviewdecimalColumn in a Radgridview which are 'Debit' & 'Credit'...
I want following case---
When user Insert Debit value then Credit value of that row should Be 0
or When user Insert Credit value then Debit value of that row should Be 0
For that I have written Following Code------
But its not work Properly.....
Let me know any Solution on this Case....
From what I understand you wish to change the value of one cell based on the input of another. Is that correct?
If so, do you wish this to happen for inserting and updating, or one of these only?
yes,I wish to change the value of one cell based on the input of another
And I wish this to happen for both inserting and updating.....
Waiting for your reply
i believe that this should do what you want
Let me know if there are any issues
It works for me...
I have another issue as follows---
I have a Gridview Having two ComboBoxcolumns 'Name' and 'Detail', both the columns have diffrent Binding Source
When user change the 'Name' value as soon as the 'Detail' value of the same row Should be null and text will be empty..
waiting for your reply
Before I look at this for you, please can I confirm that I understand your requirement.
You have a radGridView with 2 GridViewComboBox Columns which are called name and detail
Each one of these is bound to a different data source
When you change the value in the Name drop down, you want the value of the Detail cell on the same row to be null, and no value selected.
Is that correct?
When User change the value in the Name drop down, he want the value of the Detail cell on the same row to be null, no value selected AND TEXT SHOULD BE EMPTY.
You just need to handle the CellValueChangedEvent. For exmaple
hope that helps
I already used this code but its not working properly....
I want when user change 'Name' dropdown item then 'Detail' text of the same row immediately become Empty (none)....
Hope you get exact issue
I can look at that for you if you wish, but my advice would be to stick with the method I proposed. The reason for this is that if the user changes the name in the drop down, and then changes it back again whilst still in edit mode, then you have already lost the value in the detail column before the name value has actually changed.
In other words, once you have picked a different name from the drop down before the value is commited, then the value in the detail field has already been changed and commited.
Its Correct ,what you write here...
But my requirement is different from what you understand.....
So,Please provide me solution as per I said earlier....
This should do what you need,
Hope that helps
Thank for your reply
It closer to my requirement but text of Detail field of the row still apper...
I'm not sure I understand. Either that or we are seeing different results. I have added this link to a video so you can see it working on my PC here.
When the name is changed, the detail cell is cleared and the value is set to null. Once you have changed the name, you have to re-pick the detail.
With few changes ,the code provided by You Works Fine for me
Thanks a lot
Have a nice day....
Please remember to mark as answer and if you have a moment, I'd be interested to know what you needed to change to complete your requirement.