Groups | Blog | Home
all groups > dotnet framework > july 2006 >

dotnet framework : DataGridView Help


Carl Daniel [VC++ MVP]
7/29/2006 7:22:43 AM
[quoted text, click to view]

Change the cell value programatically by doing what, exactly? (show some
code).

The value cannot save back to XML, how exactly? Is an exception being
thrown? (show some code)

-cd

Carl Daniel [VC++ MVP]
7/29/2006 10:46:50 AM
[quoted text, click to view]

I think you may need to call DataSet.AcceptChanges before WriteXml to make
the edited valus "stick".

-cd

Taoge
7/29/2006 10:16:27 PM
DataGridView bind to DataSet which read data from a XML file, when I edit
the cell value and save back, it's ok; but when change the cell value
programmaticlly, the value can not save back to XML file.

Help , please!

Taoge
7/30/2006 12:00:00 AM
Hi Daniel,

I found that I can't write back XML everytime after I use OpenFileDialog to
find a file, otherwise it's OK.

Thanks!

"Carl Daniel [VC++ MVP]" <cpdaniel_remove_this_and_nospam@mvps.org.nospam>
[quoted text, click to view]

Taoge
7/30/2006 12:28:38 AM
1. dgTrack.Rows[Row].Cells["Picture"].Value = Picture;
dgTrack.Rows[Row].Cells["Longitude"].Value = Longitude;
dgTrack.Rows[Row].Cells["Latitude"].Value = Latitude;
dgTrack.Rows[Row].Cells["Radius"].Value = Radius;
dgTrack.Rows[Row].Cells["Audio1"].Value = objAudio.C1;
dgTrack.Rows[Row].Cells["Audio2"].Value = objAudio.C2;

dataSet.WriteXml("setting.xml");
No exception is thrown.

Thanks.

"Carl Daniel [VC++ MVP]" <cpdaniel_remove_this_and_nospam@mvps.org.nospam>
[quoted text, click to view]

Taoge
7/30/2006 6:04:38 PM
Hi Carl,

It's because OpenFileDialog changed the current directory.

Thanks!

"Carl Daniel [VC++ MVP]" <cpdaniel_remove_this_and_nospam@mvps.org.nospam>
[quoted text, click to view]

AddThis Social Bookmark Button