Wrox Programmer Forums
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 14th, 2007, 03:50 AM
Friend of Wrox
Join Date: Aug 2006
Posts: 231
Thanks: 0
Thanked 1 Time in 1 Post
Default grid view

Hello to All
please solve my problen soon
i am using following code to get the checked value of text box.
but always it fires false:
1) gvcallerlist is name of grid
2) chkGridSelect is name of check box

protected void btnNext_Click(object sender, EventArgs e)
           CheckBox chkSelected;
           foreach (GridViewRow gv in gvCallerList.Rows)
                chkSelected = (CheckBox)gv.FindControl("chkGridSelect");

                if (chkSelected.Checked)
                    //stNameGrid = ((Label) gv.FindControl("lblListNames").text;
            if (ListNameGrid == "")
                string Message = "<script language='javascript'>alert('Please Select one Calling Plan from the List.');</script>";
                Page.RegisterStartupScript("SelectRecord", Message);
                //ClientScript.RegisterStartupScript( "Message",Message);

Munish bhatia

Old May 25th, 2007, 07:26 AM
Registered User
Join Date: May 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to pavank

you use...

bool ischecked=((CheckBox)gv.FindControl("chkGridSelect ")).Checked;

in place of chkSelected = (CheckBox)gv.FindControl("chkGridSelect");

  n write like



try it ...



Similar Threads
Thread Thread Starter Forum Replies Last Post
Grid view roopeshmkatlive.in ASP.NET 1.0 and 1.1 Professional 1 August 1st, 2008 01:03 PM
Help Grid View Drop Down List, view all jskinner123 ASP.NET 2.0 Basics 0 November 25th, 2007 06:25 PM
grid view komalpriya .NET Framework 2.0 3 November 7th, 2007 10:34 AM
grid view MunishBhatia ASP.NET 2.0 Professional 2 June 5th, 2007 12:15 AM
calender with grid view chandrasekhar ASP.NET 2.0 Professional 1 April 13th, 2006 01:20 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.