Hi ,
i need to add values in my Grid-View at Run time and save it to the database.i am displaying a particular folder filenames in gridview now after displaying need to add two columns and insert values at runtime in it and then save it to the database.i tried various things like by creating a function and calling and inserting values but at run-time this Does not work. i am novice in this field and Don't know much about this ..please help.
code for displaying folder filenames :
FolderBrowserDialog folderDlg = new FolderBrowserDialog();
folderDlg.ShowNewFolderButton = true;
// Show the FolderBrowserDialog.
DialogResult result = folderDlg.ShowDialog();
String[] files = Directory.GetFiles(@"C:\Users\LENOVO\Desktop\RemotePlay");
DataTable table = new DataTable();
table.Columns.Add("File Name");
table.Columns.Add("Sequence");
table.Columns.Add("Delay");
for (int i = 0; i < files.Length; i++)
{
FileInfo file = new FileInfo(files[i]);
table.Rows.Add(file.Name);
}
dataGridView1.DataSource = table;