110
Grid shows all columns even when not selected
posted

I have binded the Grid to the Datasource using the Designer , there i selected the number of columns to be displayed but on giving the adapter.fill method , it returns all the columns

Parents
No Data
Reply
  • 5900
    Offline posted


    Hello Linija,

    When binding a DataSource to a Grid through designer, if you have selected specific columns then the DataAdapter.Fill method will only render those columns in the Grid. I have tested this behavior and it is working like I described. In order to resolve this issue, try calling the below line of code to clear the DataAdapter before filling it:

      this.categoriesTableAdapter.ClearBeforeFill = true;

    Please try the above suggestion and let me know if I may be of further assistance.

    Sincerely,
    Sahaja Kokkalagadda
    Associate Software Developer

Children