On a certain sign-in screen, I have a GridView
with some blank lines, so the user would have to enter the information on those lines, and then when clicking the save button, make the INSERT
in the bank. p>
How would you do when the cell loses focus by adding the value to a DataTable
? I know there is LostFocus
event but this event is activated when GridView
loses focus? Or when the cell loses focus?
To create the columns of GridView
I'm doing this:
if (id_crm == 0)
{
DataTable dat_itens = new DataTable();
dat_itens.Columns.Add("ITEM", typeof(int));
dat_itens.Columns.Add("DESCRIÇÃO", typeof(string));
dat_itens.Columns.Add("DESCRIÇÃO NF", typeof(string));
dat_itens.Columns.Add("QUANTIDADE", typeof(int));
for (int i = 1; i < 10; i++)
{
DataRow tablerow = dat_itens.NewRow();
tablerow["ITEM"] = i;
dat_itens.Rows.Add(tablerow);
}
gridControl1.DataSource = dat_itens;
}
Example: