To modify how columns appear

  1. After you have created a new typed DataSet, drop a DataGrid component onto your form.
  2. Set the DataSource property to point to the typed DataSet and the DataMember property to point to the target table.
  3. Click the (Collection) entry next to the TableStyles property. This displays the DataGridTableStyle Collection Editor.
  4. Click Add to add a new member to the members list.
  5. Click the drop down list next to the MappingName property.
  6. Click the (Collection) entry next to the GridColumnStyles property. This displays the DataGridColumnStyle Collection Editor.
  7. Click Add to add a new item to the members list.

Note: By default the item is created as a Text Box Column. You can also expand the Add button and select the BoolColumn if you want a boolean.

  1. Click the MappingName property, select the column you want to display in your grid, then change any additional properties you want, including the header name that will appear as the column header in the runtime grid.
  2. Click OK twice.

Note: When you build and run the application, only the columns that you explicitly defined by following the steps in this procedure appear.

Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook

Post a comment