views:

20

answers:

1

I have a Bindingsource that am setting as a datasource to a DataGridView control. In its dataset query i have a calculated column(Column1). When i go to the Bindingsource's tasks and click Preview Data i can, for my Column1 other rows have data values returned and for other rows NULL is returned which is ok and expected.

The problem is that when i set this same bindingSource as a datasource to a Datagridview control, all the expected rows are returned but for all the rows, Column1 is NULL yet like i said, when i go the BindingSource Tasks and click Preview Data, i can see that not all rows have NULL for column1.

some thing strange is happening to the data during the process of binding the results to the Datagridview control and am abit confused? Any Ideas.

A: 

Have looked your Column1' Sort Expression? Second Look the Columns's type. If it's TemplateBound you must arrange bind on itemdatabound event

Megawolt
Current SortMode = Automatic and Columns's type = DataGridViewTextBoxColumn
Name.IsNullOrEmpty
Could you put a breakpoint and look for expecting data column? If datacolumn comes blank, yep there is a trouble with dataflow...
Megawolt