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

Radgrid textbon onblur event

2 Answers 60 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nithya Rani
Top achievements
Rank 1
Nithya Rani asked on 05 Apr 2013, 09:02 AM
Hi,

Inside my grid CommandItemTemplate i am using radtextbox.

In my radtextbox OnBlur even i am checking whether my textbox value is null or not if null i am assign the hidden field value as null using jquery but checking null value is not working. below is my code can anyone he me on this.


 function validateprodno(sender, args) {
            var grid = $find("<%=grdInbound.ClientID %>");
            var txt = $telerik.findControl(grid.get_element(), "txtOrdNumGrid");
            if (txt.get_value() == "") {
                document.getElementById("<%= hidd_prodcode.ClientID %>").value = "";       
            }
        }


Regards,
Nithya

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 05 Apr 2013, 09:46 AM
Hi,

Unfortunately I cannot replicate the issue at my end. Here is the sample code that I tried which worked as expected.
JS:
var grid = $get("RadGrid1");
var txt= $telerik.findControl(grid, "txtOrdNumGrid"");
alert(txt.get_value());

Thanks,
Shinu
0
Nithya Rani
Top achievements
Rank 1
answered on 05 Apr 2013, 09:54 AM
Hi Shinu,

My problem is in if condition, if the value is null its not going inside the if block.

function validateprodno(sender, args) {
            var grid = $find("<%=grdInbound.ClientID %>");
            var txt = $telerik.findControl(grid.get_element(), "txtOrdNumGrid");
            if (txt.get_value() == "") {
                document.getElementById("<%= hidd_prodcode.ClientID %>").value = "";       
            }
        }


Regards,
Nithya
Tags
Grid
Asked by
Nithya Rani
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Nithya Rani
Top achievements
Rank 1
Share this question
or