Solved

Data Binding to the Visible property on a drop down

Posted on 2009-07-15
2
191 Views
Last Modified: 2013-12-17
I can successfully databind to the Checked property of a checkbox:

            cboxRampEnabled.DataBindings.Clear();
            cboxRampEnabled.DataBindings.Add("Checked", _devicePresenter.Prescription, "RampEnabled");

but I can not databind to the Visible property of a drop down:

            ddlHidden.DataBindings.Clear();
            ddlHidden.DataBindings.Add("Visible", _devicePresenter.Prescription, "IsHiddenFieldVisible");

IsHiddenFieldVisible is a public boolean property of the object specified by _devicePresenter.Prescription.

Does anyone have any ideas? Does anyone know this is not possible?

Please let me know.

Thanks,
newbieweb
0
Comment
Question by:newbieweb
2 Comments
 
LVL 8

Assisted Solution

by:RyanAndres
RyanAndres earned 150 total points
ID: 24864330
Looks right to me, whats the error details/message?
0
 
LVL 15

Accepted Solution

by:
jinal earned 350 total points
ID: 24865721
Hello ,

I attached sample.  It works in my case.

IsHiddenFieldVisible property is boolean or anotehr data type.

 public class Test
    {
        public bool Visible
        {
            get;
            set;
        }
    }
   
    public partial class Form1 : Form
    {
        public Form1()
        {
           InitializeComponent();          
            Test t = new Test();
            t.Visible  = false;
            comboBox1.DataBindings.Add("Visible", t, "Visible");
        }
        
    }

Open in new window

0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question