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)
How to Create Events Using Microsoft Graph API with Delegated Permissions and MSAL.js
Microsoft Graph API provides powerful capabilities to interact with Microsoft 365 services. In this guide, we’ll explore how to create calen...
-
I spent plenty of time for delving into this problem' depths. I can summarize the solution as follows: 1. Create The Entity Class (e.g...
-
Image upload with CKEditor. My latest issue was how to integrate CKFinder for image upload in CKEditor. Here the solution. 1. Download C...
-
I installed MVC4 latest version, but my app is using MVC3.0. The problem was on MVC version. Check MVC version of your app. Thanks Learn...