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, 05:31 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 Checkboxlist

i'm using vs 2005 and vb.net to development a window application. i have a checkboxlist that contains few items. i need to disable some of the items, meaning the checked could not be modified after being saved into the database.
the purpose of doing this because i want to show user the item they redeemed.
please tell me how to do that.
thanks for any help. coading 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);



                        }
                        //string b=dt.Rows[0][a].ToString();

                         // SelectedItems[a].ToString() =dt.Rows[0][a].ToString();
                    }
}}}











Similar Threads
Thread Thread Starter Forum Replies Last Post
CheckboxList and SQLDataSource keithroby ASP.NET 3.5 Basics 5 December 3rd, 2008 03:19 PM
CheckBoxList Headers Ric_H C# 0 June 26th, 2006 10:29 AM
Get Values from Checkboxlist derekl ASP.NET 1.0 and 1.1 Basics 3 May 26th, 2006 09:46 AM
CheckBoxList stu9820 ASP.NET 1.0 and 1.1 Basics 10 May 25th, 2006 08:15 PM
CheckBoxList eddiema VS.NET 2002/2003 1 April 9th, 2004 09:49 AM





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