This is a migrated thread and some comments may be shown as answers.

grid batch client change value cell event

3 Answers 169 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ali
Top achievements
Rank 1
Ali asked on 06 Apr 2014, 03:47 AM
hi
first i sorry for my poor English

i have grid in batch mode whit row EditType . i have radtextbox and RadNumericTextBox in edititemtamplate . i want when the value/text of these change a client event fire.
when i use textchanged of radtextbox when i click on another row with cell have different value the event fire too and i don't want this.in keypress i cant get tab button because when i press tab focus changed and focus  another cell and don't fire event.

when i use these event:
OnBatchEditGetEditorValue
OnBatchEditSetEditorValue
OnBatchEditSetCellValue
OnBatchEditGetCellValue
OnBatchEditCellValueChanged
OnBatchEditCellValueChanging

all of them fire after selected row change

now what witch event i can use?

3 Answers, 1 is accepted

Sort by
0
Ali
Top achievements
Rank 1
answered on 09 Apr 2014, 05:05 AM
hi
i solve my problem with keyDown event .
but now how can get new value of cell in keyDown ?
getCellValue in get_batchEditingManager() return the old value how can get new value?

please help me!
0
Ali
Top achievements
Rank 1
answered on 09 Apr 2014, 05:18 AM
hi
i solve my problem with keyDown event .
but now how can get new value of cell in keyDown ?
getCellValue in get_batchEditingManager() return the old value how can get new value?

please help me!
0
Kostadin
Telerik team
answered on 09 Apr 2014, 12:54 PM
Hi Ali,

in case you are attaching an KeyPress of the RadTextBox then you could simply get the value from the RadTextBox object. Please check out the following code snippet.
JavaScript:
<script type="text/javascript">
    function keyPress(sender, args) {
        var value = sender.get_value();
    }
</script>
C#:
<EditItemTemplate>
    <span>
        <telerik:RadTextBox Width="55px" runat="server" ID="tbUnitPrice" ClientEvents-OnKeyPress="keyPress">
        </telerik:RadTextBox>
        <span style="color: Red">
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1"
                ControlToValidate="tbUnitPrice" ErrorMessage="*Required" runat="server" Display="Dynamic">
            </asp:RequiredFieldValidator>
        </span>
    </span>
</EditItemTemplate>


Regards,
Kostadin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Ali
Top achievements
Rank 1
Answers by
Ali
Top achievements
Rank 1
Kostadin
Telerik team
Share this question
or