Display mulicolumn in dropdown list control at a time - asp.net

Is there any way that i can display 2 columns value horizontally partitioned in dropdown list control at a time.

Not out-of-the-box. There are some third party controls such as Telerik ComboBox which allow you to achieve this functionality.

Related

Drag & Drop between two listbox without add or Remove Button in ASP.net

I have created one web page. In that i have used two listboxes. Now i want to drag an item from one listbox and drop the same item in another listbox. And also want to rearange the items without any help of buttons or any other controls.
can anyone help me in this problem.
You can use jquery to make this happen. Just use JQuery UI and implement the sortable function on the two containers. This will allow for drag&drop and sorting within the containers:
JQuery Sortable

How to use item templates for dropdown lists in asp.net

I need to customize dropdownlist in asp.net and add checkboxes to make it a multi selection list. Can I do it using item templates. If so, how? Also wanted to know if I can have tri state checkboxes?
Any help is greatly appreciated!
Drop down lists are rendered as "select" type inputs in HTML. So, you can't format them to contain checkboxes. However, you can make use of a checkboxlist control, placing it in a div to present the desired control.
This site seems to have a solution: http://www.dotnet247.com/247reference/msgs/42/211693.aspx
Or you can try looking up a jQuery UI control for this.

Displaying web user controls in a grid with paging

I have written a user control and I want to display its instances in a grid (like a NxM cells table) and with paging. Which control should I use and how to use it?
A GridView or ListView should be able to meet your requirements.

How do I populate one listbox from another listbox using JavaScript?

Can anyone tell me how to populate one listbox from another listbox item using JavaScript or ASP.NET 2.0?
Duplicate
How would I move one list box items to another listbox items in JavaScript?
For ex--My 1st listbox is Region then accourding to region selection the second listbox country will be display and accourding to country seletion state listbox will display all will come from database depends on Region Id or Country id n all
You may be interested in the 'Cascading Dropdown' control from the ASP.net AJAX Control Toolkit. http://www.asp.net/AJAX/AjaxControlToolkit/Samples/CascadingDropDown/CascadingDropDown.aspx
You could also probably do this without the toolkit, using the standard UpdatePanel from ASP.net AJAX and specifing the "onChange" event of the first dropdown as a "trigger" for that UpdatePanel to be updated. Be sure you set AutoPostback="true" on the dropdown so it is fired properly is you go this route also.
Your question leaves out a lot of detail, but basically you would wire a function to the onchange event of the first listbox, that would populate the second listbox. If the contents would need to be dynamically loaded, you would then need to use AJAX (or similar) to pull them from the server and push them into the second box; alternatively if your contents are statically defined and not too weighty, it would be more responsive to serve them with the original document (perhaps as an associative array keyed on the values of the first listbox) and then update the second listbox based on an array lookup.

Persisting Checkbox State Across Postbacks

I have a web form that binds a DataGrid to a, normally, different data source on each postback. I have a static CheckBox column that is always present to the left of the autogenerated columns. I achieve a TabControl effect with a horizontal Menu control above the grid, with each menu item being a tab that contains a different grid.
Now I would like to persist the state of these checkboxes for a particular 'tab', when another tab is selected. I would welcome any imaginative solution for doing this without using session variables.
I think the best bet for this is to have a different gridview for each of your "tabs". Use the MultiView control with a View control for each tab, and a gridview in each View. In the click event of your menu change to the correct view. Only bind each gridview once, and then your checkboxes will persist.

Resources