Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1560
UltraGrid question
posted

 Is it possible without binding, to create columns directly in the grid? Like in the .NET Framework DataGridView, you can add a column to the DataGridView Columns collection ..... 

 And later on do something like DataGridView.Rows.Add("a","b","c","d");

 Can we do the same with the ultragrid without using the UltraDataSource? Or I have no choice to use the UltraDataSource?

 If I have no choice to use the UltraDataSource, how can I later on change the header name of the column?

  • 469350
    Verified Answer
    Offline posted

    The grid must have some kind of DataSource in order to work at all. There are many different data source you can use, like a DataTable, DataSet, UltraDataSource, or even a generic List<T> or BindingList<T>. It does not have to be an UltraDataSource, but the UDS is convenient for setting up a multi-column hierarchical set of data quickly and easily. 

    Changing the header caption on a column is the same no matter what data source you use. You simply set the column.Header.Caption property.  The InitializeLayout event of the grid is usually a good place to do this. Or, you could do is at design-time.