Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataGridTableStyle: Object Reference not set to an instance of an obj

Status
Not open for further replies.

whloo

Programmer
Apr 14, 2003
168
SG
public void test(DataGrid _dataGrid, string _mappingName)
{
DataGridTableStyle oldTS = _dataGrid.TableStyles[_mappingName];
...

}

DataTable xDT = getDataFromDB();
ResultGrid.DataSource = xDT;
test(ResultGrid, "Table");

Hi,

the code above gave me some funny problem.
I able to get all data from db and put it into xDT and bind it to the ResultGrid.
then i try to do some grid manipulation using the test function, but seems like i encounter some problem when i call:

DataGridTableStyle oldTS = _dataGrid.TableStyles[_mappingName];

anyone know what's wrong with this? have been trying to find the root of the problem for few days :(
Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top