C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » ASP.NET »

javascript Validation for TextBox in the Datagrid view


Posted Date: 07 Jan 2009      Posted By: Muralikrishna N      Member Level: Bronze     Points: 1   Responses: 1



How to validate the textbox in the Datagrid




Responses

Author: Antony Benadict Amal    07 Jan 2009Member Level: SilverRating: 4 out of 54 out of 54 out of 54 out of 5     Points: 6

try this script

var theGridView = document.getElementById("Grid_Con");

for ( var rowCount = 1; rowCount < theGridView.rows.length; rowCount++ )
{

if ( theGridView.rows(rowCount).cells(9).children(0)!=null)
{

if ( theGridView.rows(rowCount).cells(9).children(0).checked == true)
{
if (theGridView.rows(rowCount).cells(6).children(0).value == "")
{
alert("Please Enter data");
theGridView.rows(rowCount).cells(6).children(0).focus();
return false;
}
}
}
}



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : datepicker - sql server
Previous : diappear square brackets of checkboxes
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use