... cannot be set on a data-bound DataGridView control

Hello,

I am begginer and i Have application that is displaying querries in datagridview. But in some part of application i want to display more custom data (SUMS, SUM of certain column where only negative numbers are summed etc.). I am displaying more simple data with :

grdDataAll.AutoGenerateColumns = True

grdDataAll.DataSource = objDataSet

grdDataAll.DataMember = "my table"

and more custom data with manually filling same dataGgridView from scratch..

I got error: cannot be set on a data-bound DataGridView control.

is there any vay to change that property or i will have to use two dataGridViews on same place, one for data-bind use, another for manually adding rowsets, changing their visibility..

Thank you, and sorry for language etc...



Answer this question

... cannot be set on a data-bound DataGridView control

  • zoso

    sorry, i found out - it was to easy.. probably

    grdDataAll.columns.clear()
    grdDataAll.DataSource=Nothing
    grdDataAll.DataMember=Nothing


  • ... cannot be set on a data-bound DataGridView control