This is a migrated thread and some comments may be shown as answers.

Binding column to checkBox with bindingSource

4 Answers 141 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Yael
Top achievements
Rank 1
Yael asked on 26 Jun 2008, 09:16 AM
Hi
I have a Hierarchy GridView.
I bound the dataset to bindingSource, and the Grid to the bindingSource.
The bound works well.
I update the data in the grid through textbox that is bounded to the bindingSource.
I have a column name 'Active' that is 0 or 1. This column is bounded to a checkbox and also works OK.
The problem is when a add new row through the bindingSource:
bindingSource.AddNew();
The new added row is acting strange.  A new empty row is added to the grid.
But in the bounded textbox it is showing the former current row with it's values.
When i remove the bind from 'Active' column to the checkbox, the AddNew works fine. The textbox show the new empty row.
When i bind the 'Active' column to a textbox the AddNew works OK.

Can you help me figure out what is wrong?


4 Answers, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 27 Jun 2008, 03:58 PM
Hello Yael,

Sorry for the inconvenience and thank you for the reporting this issue.

We have found issues related to the CheckBox column and its synchronization with the new and the current row in RadGridView. Its behavior will be corrected for the Q2 2008 release planned for the end of July.

Your Telerik points have been updated.

Best wishes,
Julian Benkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Yael
Top achievements
Rank 1
answered on 29 Jun 2008, 04:18 AM
Hi
Thank you for the reply.
I just want to make sure:
My problem was binding a (0,1) column (of type: textbox column or checkbox column) to a checkbox control (I checked the microsoft and the radCheckbox).
Some more information: The bindingSource is bounded to a DataSet of tables from an Oracle database. The Active column is of data type: char(1).

I am waiting for the Q2 2008 release in the end of July hopping it will resolve my problem.

Thanks Yael.


0
Yael
Top achievements
Rank 1
answered on 30 Jun 2008, 01:30 PM
Hi
I found the solution.
When binding a checkbox to bindingSource, you have to set the DefaultValue of the field in the datatable before binding the checkbox to the BindingSource.
Like:
dataSet1.Tables["Table1"].Columns["Active"].DefaultValue = true;
0
Julian Benkov
Telerik team
answered on 01 Jul 2008, 12:08 PM
Hello Yael,

Thank you for sharing your ideas and solutions with us. We will take them into consideration for the checkbox column and its binding.

Your Telerik points have been updated.
 

All the best,
Julian Benkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
GridView
Asked by
Yael
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Yael
Top achievements
Rank 1
Share this question
or