Subscribe to Subscribers
Talk to Webmaster Tony John

Online Members

Migbar
More...


Forums » .NET » ASP.NET »

This function will work at gried view item template check box Checked change


Posted Date: 11 Sep 2009      Posted By:: Shreeeee     Member Level: Gold    Member Rank: 232     Points: 1   Responses: 0



Below process will run at clien side, How can approach this



protected void grdRestype_PreRender(object sender, EventArgs e)
{
foreach (GridViewRow r in grdRestype.Rows)
{
System.Web.UI.WebControls.CheckBox cbx = ((System.Web.UI.WebControls.CheckBox)r.FindControl("chkpassword"));
System.Web.UI.WebControls.TextBox tbx = ((System.Web.UI.WebControls.TextBox)r.FindControl("txtPwd"));
System.Web.UI.WebControls.RequiredFieldValidator reqfldval = ((System.Web.UI.WebControls.RequiredFieldValidator)r.FindControl("reqfldvalpwd"));
cbx.Attributes.Add("onclick", "ClickMe(this,'" + tbx.ClientID + "');");
if (cbx.Checked)
{
tbx.Enabled = true;

lbltext = (((System.Web.UI.WebControls.Label)r.FindControl("lblresname")).Text);
reqfldval.Enabled = true;
reqfldval.ErrorMessage = "Enter Password for " + lbltext.ToString() + " reservation type "; ;

}
else
{
tbx.Enabled = false;
reqfldval.Enabled = false;

}
}
}




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

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 : Hw i create foreign key in access
Previous : Can any1 tel me what this error is??
Return to Discussion Forum
Post New Message
Category:

Related Messages



Follow us on Twitter: https://twitter.com/dotnetspider

Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
2005 - 2012 All Rights Reserved.
.NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
Articles, tutorials and all other content offered here is for educational purpose only.
We are not associated with Microsoft or its partners.