R
rustyryan
Hey all, I have a question about using DataRows (and ultimately, its
interplay with a DataGrid)
So I create my DataSet, create a DataTable, configure it with columns
and then add rows like so:
(C++ .NET)
DataTable* table; //assume setup
DataRow* row = table->NewRow();
//columns 0,1, and 2 are all setup in the table
row->set_Item(0,fi->get_Name()); //assume fi->GetName() returns
some string*
row->set_Item(1,S"Queued");
row->set_Item(2, S"---");
table->get_Rows()->Add(row);
After I have added the row to the table, can I still use the DataRow
object to change data in the row, or is this a no-no ? Do I need to
wrap the changes with calls to DataRow::BeginEdit and DataRow::EndEdit?
After I have added the DataTable to the DataSet and, set a DataGrid to
refer to the DataSet and display the DataTable I setup, can I still
change stuff then?
If I do, what is the proper way to update things? Should I call
DataGrid::Update()?
I'm dealing with some nasty problems where I get the "No original data"
error from my datagrid while I'm updating literally all the rows in the
table by just directly referring to the DataRow object I got from
DataTable::NewRow() in the beginning.
tia,
rj ryan
interplay with a DataGrid)
So I create my DataSet, create a DataTable, configure it with columns
and then add rows like so:
(C++ .NET)
DataTable* table; //assume setup
DataRow* row = table->NewRow();
//columns 0,1, and 2 are all setup in the table
row->set_Item(0,fi->get_Name()); //assume fi->GetName() returns
some string*
row->set_Item(1,S"Queued");
row->set_Item(2, S"---");
table->get_Rows()->Add(row);
After I have added the row to the table, can I still use the DataRow
object to change data in the row, or is this a no-no ? Do I need to
wrap the changes with calls to DataRow::BeginEdit and DataRow::EndEdit?
After I have added the DataTable to the DataSet and, set a DataGrid to
refer to the DataSet and display the DataTable I setup, can I still
change stuff then?
If I do, what is the proper way to update things? Should I call
DataGrid::Update()?
I'm dealing with some nasty problems where I get the "No original data"
error from my datagrid while I'm updating literally all the rows in the
table by just directly referring to the DataRow object I got from
DataTable::NewRow() in the beginning.
tia,
rj ryan