I have a slight problem with my database software. The thing is I have written code for a function to add a new "Tab" with a "plane" and a "DataGrid" grid for viewing database info.
This is how some of the function code looks,
Expand|Select|Wrap|Line Numbers
- public void AddNewDefaultDataGridTab( DataSet dynamicDataSet, string dynamicTable, string TabTitle, string columnFileToLoad)
- {
- //<code for making all look as it should.>
- }
It works perfectly for getting and fill all the data to all these crated dynamic tabs, but I need to be able to control and modify the data inside after all these dynamic tabs have been created.
maDynamicDataGrid , is the name of the DataGrid inside this function that needs to be controlled.
So I need to address all these maDynamicDataGrid some how.
The simplest solution for this is to create many of these and add a column for the DataGrid name to the function it self, like this.
Expand|Select|Wrap|Line Numbers
- SourceGrid.DataGrid maDynamicDataGrid1 = new SourceGrid.DataGrid();
- SourceGrid.DataGrid maDynamicDataGrid2= new SourceGrid.DataGrid();
- SourceGrid.DataGrid maDynamicDataGrid3 = new SourceGrid.DataGrid();
- SourceGrid.DataGrid maDynamicDataGrid4 = new SourceGrid.DataGrid();
- SourceGrid.DataGrid maDynamicDataGrid5 = new SourceGrid.DataGrid();
- public void AddNewDefaultDataGridTab( SourceGrid.DataGrid dynGridName, DataSet dynamicDataSet, string dynamicTable, string TabTitle, string columnFileToLoad)
- {
- //<code for making all look as it should.>
- }