Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > validate input in datagrid

Reply
Thread Tools

validate input in datagrid

 
 
=?Utf-8?B?bWF0cw==?=
Guest
Posts: n/a
 
      05-13-2004
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

 
Reply With Quote
 
 
 
 
avnrao
Guest
Posts: n/a
 
      05-13-2004
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.

"mats" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello
>
> 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 side
> 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 side
>
> Any suggestions
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
validate Date input using Custom Validator Grey ASP .Net 3 10-09-2012 06:11 AM
How to validate input in gridview edit mode ibiza ASP .Net 7 01-11-2011 10:30 PM
Validate csv input =?Utf-8?B?bnR1c2VyX21hbkBtc2RuLmNvbQ==?= ASP .Net 1 10-19-2009 10:38 PM
How to validate input characters encoding Peter Afonin ASP .Net 4 02-02-2004 09:36 PM
Validate date input Grey ASP .Net 2 01-21-2004 10:16 PM



Advertisments