Enos

Enos

  • NA
  • 140
  • 26.2k

How to add new line to a resource file on the gridview

Feb 4 2015 5:15 AM
Hello Everyone,
 
Can you please help me add new row on resource file, here is the code i have used to read my resource file.
I have no idea on how to add new line... Please help 
 
 
private void btnBrowse1_Click(object sender, EventArgs e)
{
 
BrowseFile();
//versionIncrement();
if (txtInputfile.Text.Length > 0)
{
PathSelection = txtInputfile.Text;
}
oDataSet = new DataSet();
//now am reading the files fro 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();
//the elements array contain all the columns filled
string[] elements = comment.Split('-'); //when it reaches the comma, it will jump to the next line
string font = elements[0]; //Font
string datestamp = elements[1]; //DateStamp
string commentVal = elements[2]; //Comment
string[] row = new string[] { oDataSet.Tables["data"].Rows[i][0].ToString(), oDataSet.Tables["data"].Rows[i][1].ToString(), font, datestamp = DateTime.Now.ToString(), commentVal };
Gridview_Input.Rows.Add(row);
 

Answers (1)