|
-
January 6th, 2011, 07:37 PM
#6
Re: DataGridView WriteXml() not saving
Okay, I narrowed down the problem and fixed it - with a weird side effect.
Calling bindingsource1.EndEdit() before calling WriteXml() will make sure the rows are saved and they dont disappear as many coders have faced using this. Search in Google - Microsoft gives a vague explanation for it in Social MSDN site but that doesnt work anyway.
The weird sideffect is once the code is executed like this:
dsTodo.WriteXml(m_sTodoXmlPath); //Dataset for ToDo table writes to the XML path
bndSrcCategories.EndEdit();
In the gridview, when I try to type in the new row , it acts like the "INSERT" key has been pressed - meaning the chars flip - whatever I type replaces the characters in there - so it lets me type only 1 character anytime as that gets replaced when I type the next!!
Any help would be nice - thanks.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|