Search code examples
c#gridviewdevexpressdatasourcedatamember

gridview.Datasource and gridview.Datamember which I should set first?


If I want to set both gridview.datasource and gridview.datamember, which one I should set first? Is there any standard order about this? Thank you!


Solution

  • I would prefer to set gridview.datasource first and then only gridview.datamember because you do not need to set gridview.datamember property when binding to a data source that contains a single list or table.