Visual Studio .NET - checked list box in c#.net

Asked By Abinaya on 29-Apr-10 12:34 AM
Hi,

Is it possible to add 3 columns in a checked list box.. Like i want to add 2 check boxes and a label per row...
samjayander thiagarajan replied to Abinaya on 29-Apr-10 12:43 AM
Hi,

Since CheckedListbox is based on a single CheckBox and a value, and also allows a single value to be checked, It may be  not the proper control for your implementation..

So, I hope, you should use DataGrid control to achieve two checkboxes in a row.

Regards,
Sam.
Anoop S replied to Abinaya on 29-Apr-10 12:46 AM
You can add many columns in checked listbox, put the Multicolumn property to True

checkedListBox1.MultiColumn = true;
Web Star replied to Abinaya on 29-Apr-10 12:46 AM
What do u mean by adding 3 columns with checkbox list, if u want to add checkbox list on page or datagrid , u will be able to add any no of column checkboxlist or any other control.
what is your problem?
Abinaya replied to Web Star on 29-Apr-10 12:49 AM
Usually in a checkedlistbox only a checkbox n a label can be added.. i just want to know if its possible to add one more checkbox in a row...
Web Star replied to Abinaya on 29-Apr-10 12:56 AM
why not, offcourse u can add more checkbox in row of datagrid or on page but that checkbox treaded as sperate ,
if u wnat only only text label value for both checkbox that is differnet thing
for that u can put another checkbox without text value and use check event refer to same mothod in code
hope u understand my point
Abinaya replied to Web Star on 29-Apr-10 12:59 AM
I know that in a datagrid we can add.. but i want to know if we can add 2 checkboxed in a row in a checkedlistbox control.. Hope u understand my point...I have a checkedlist box control now with a checkbox and a label... i want to add one more checkbox to each row in it... i guess im clearer now..
Santhosh N replied to Abinaya on 29-Apr-10 01:01 AM
I suppose you are trying to have something where there can be two options to be sleected for the column value and hence I would suggest to have a gridview with a column (label) and two columns with checkboxes to accomplish this task if I understand your requirement correctly
can check here for adding a checkbox inside the gridview
http://www.asp.net/(S(ywiyuluxr3qb2dfva1z5lgeg))/learn/data-access/tutorial-52-cs.aspx
Abinaya replied to samjayander thiagarajan on 29-Apr-10 01:05 AM
thanks a lot...