validate input in datagrid

G

Guest

Hell

My problem is that I do not know how to validate input that I let the user type into my datagrid
In one grid I let the user to type in a value into a template column - how do I make sure that this input is an integer on the client sid
In a diffrent grid I have an edit command column and the same problem - how do I make sure that this is an integer on the client sid

Any suggestion
 
A

avnrao

you access the table created by the datagrid. loop thru the elements and
access it.
write a javascript like follows..

// to access the rows in the table
var iRows = document.all("tablename").rows;
var oCell;
var columnNumber = 0; // your column number in which the control to validate
exists.
for(var iIndex=1; iIndex < iRows.length; iIndex++)
{
oCell = iRows[iIndex].cells[columnNumber];
alert(oCell.all[indextoyourcontrol]); // check and get the index for
your control to validate.
}

hth,
Av.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top