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

clear templete column text box values in grid using java script

1 Answer 30 Views
Grid
This is a migrated thread and some comments may be shown as answers.
krishna kishore
Top achievements
Rank 1
krishna kishore asked on 05 Sep 2008, 02:59 PM
i am using radgrid. this grid displaying data using temple textbox so i want to clear templete text box values at client side.i am using following code

function test()

{

var txtBundlePrice = document.getElementById("tbxdefaultprice");

var gridPrice = $find("<%= grdSFPrice.ClientID %>");

if(document.getElementById("rbtnDefault").checked==true)

{

txtBundlePrice.disabled =

false;

var inputs = gridPrice.get_element().getElementsByTagName("input");

for(var i = 0; i < inputs.length; i++)

{

switch(inputs[i].type)

{

case "text":

inputs[i].value =

'';

break;

default:

break;

}

}

 

}

else

{

txtBundlePrice.value=

'';

txtBundlePrice.disabled =

true;

}

}


above code is working in Inter net explorer but it is not working in mozilla browser. i neeed solution. please give me a solution.


Thanks,
kishore

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 08 Sep 2008, 05:50 AM
Hi Ray,

Go through the Code library "Accessing server controls in a grid template on the client " for getting more information about how to find the control present in the RadGrid template column from client side.

Thanks,
Princy
Tags
Grid
Asked by
krishna kishore
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or