According to the provided information I can suppose that you want to bind the RadGridView
. In RadGridView
there are two ways to generate columns: automatically, according to the columns in the data source and manually with columns added by the user. The two modes can be switched using the AutoGenerateColumns
property. You can find more information about this here: https://docs.telerik.com/devtools/winforms/controls/gridview/columns/generating-columns#manual-column-generation
If you set AutoGenerateColumns
property to true
, it means that separate columns will be automatically generated and populated with data according to information you have in your DataTable
. This is the default behavior and it does not require any additional efforts from your side.
However, if you need to control which columns to be shown in the grid, you can set AutoGenerateColumns
property to false
and add the columns manually. In this case it is necessary to specify the FieldName
property of the column which corresponds to the column in the DataTable
. A sample example is available here: https://docs.telerik.com/devtools/winforms/controls/gridview/columns/column-types/gridviewtextboxcolumn
Please, feel free to use the approach which fits your requirements best.
I hope this information helps. Should you have any other questions do not hesitate to ask.
Get quickly onboarded and successful
with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.