protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
TextBox t1= (TextBox)e.Row.FindControl("t1");
CompareValidator cv = (CompareValidator)e.Row.FindControl("cv");
Button btn = (Button)e.Row.FindControl("btn");
if (t1 != null)
{
t1.ValidationGroup = e.Row.RowIndex.ToString();
cv.ValidationGroup = e.Row.RowIndex.ToString();
btn.ValidationGroup = e.Row.RowIndex.ToString();
}
}
}
Wednesday, June 22, 2011
RequireField Validator in gridview template feild(fire all validators when i click button in each row)
Name start with D came first, although i used ascending order
There was a space character in the name feild in the database. That was the reason for D came first :)
Subscribe to:
Posts (Atom)
I Built a New Kind of Number Puzzle Game (And You Can Play It Free)
For a long time, I wanted to play a mobile puzzle game that felt genuinely strategic—something that required real brainpower, skipped the a...
-
Microsoft Graph API provides powerful capabilities to interact with Microsoft 365 services. In this guide, we’ll explore how to create calen...
-
I have tried data-gramm="false" and hiding it through CSS, but neither of these solutions has worked. If anyone can resolve this i...
-
Introduction: In my MonoGame Android project, I wanted to provide users with the option to rate my app when they clicked a button within the...