0
我有一個資源文件,我讀取數據並將其加載到網格視圖。現在我希望用戶能夠從網格編輯並單擊保存按鈕,將其保存爲resx的新文件?我怎麼做?這是讀取文件的代碼。如何從datagridview編輯並保存新的更改
oDataSet = new DataSet();
//now am reading the files from the path that is selected
XmlReadMode omode = oDataSet.ReadXml(PathSelection);
for (int i = 0; i < oDataSet.Tables[2].Rows.Count; i++)
{
string comment = oDataSet.Tables["data"].Rows[i][2].ToString();
string font = Between(comment, "[Font]","[/Font]");
string datestamp = Between(comment, "[DateStamp]", "[/DateStamp]");
string commentVal = Between(comment, "[Comment]", "[/Comment]");
string[] row = new string[]
{
oDataSet.Tables["data"].Rows[i][0].ToString(),
oDataSet.Tables["data"].Rows[i][1].ToString(),
font,
datestamp,
commentVal
};
Gridview_Input.Rows.Add(row);
cboLanguage.Enabled = true;
btnNewfile.Enabled = true;
}
我編輯並嘗試保存,我的resx文件沒有發生變化。 – 2015-02-09 12:27:06