Wrox Programmer Forums
|
Visual Studio 2005 For discussing Visual Studio 2005. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Studio 2005 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 March 11th, 2008, 04:17 AM
Registered User
 
Join Date: Mar 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to epkgupta
Default CheckListBox

Hello Friends,

                 i am using checklistbox to select month in a window application.when retrieve the data particular information which are saved by checklistbox and set checked them . but i want to them the particular item of checklistbox which have value bacame disable how it possible . my coding is-
 public void monthDetail()
        {
            if (txtRagis.Text != "")
            {
                sql = "SELECT * from FeeMonthDetail WHERE RagisterNo='" + txtRagis.Text + "'";
                DataSet ds = new DataSet();
                cmd.CommandText = sql;
                cmd.Connection = con;
                adpt.SelectCommand = cmd;
                adpt.Fill(ds);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    DataTable dt = (DataTable)ds.Tables[0];
                    for (int a = 1; a < dt.Columns.Count; a++)
                    {
                        if (dt.Rows[0][a].ToString() == "True")
                        {

                            checkedListBox1.SetItemChecked(a-1, true);



                        }
}
}}}






Similar Threads
Thread Thread Starter Forum Replies Last Post
Page_Load on recreate CheckListBox pjirelan ASP.NET 1.0 and 1.1 Basics 4 February 24th, 2004 05:14 PM





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