Monday, July 27, 2009

Everything Combo Box

Hi Everyone,
This post is exclusively for Combo Box Control, that we use a lot either in our web or window based applications. We all know the purpose of this control, what and how we can use the control depending on our requirement. But there are always a few very basic things that we are important and simple at the same time.

Combo Box control is almost like a list control that shows list of options or data that you can view or can select from , but the main advantage over list control is, Combo Box will show only one selected value and holds the list that is shown on a button click. A very helpful tool to provide various options to the user and also can save lot of work space and also hold rich features that server our purpose.
It wont be hard to find a solution but i just thought why not keep everything in one post from the basic usage to data binding.

This post will be updated constantly with new tips or tricks that we can get from this Combo Box control. Every Tip or Trick will be in a form of FAQ. you have a question and an answer for that question.
I guess this approach will be a straight forward and very helpful way for many Developers.
Lets start basic and then go deep into the usuage.
NOTE: The code shown in this post will be in C#.

1. How to Use a Combo Box Control in C# (Web/Windows Application)
Combo Box Control comes with the default controls for every ASP.NET or C# or VB.NET or Silverlight or WPF etc.. Projects.
When ever you create a new project in VS, this control is present in the ToolBox Window of the application. You can always drag drop the control to the Application Window (Work Area), which will be the easiest way to do. But you can also do the same using code, like below:
In ASP.NET:

No comments:

Post a Comment