You should write something like this:
private void btnSave_OnClick (object sender, EventArgs e)
{
foreach(DataGri dItem item in grdUsers.Items)
{
if(item.ItemTyp e == ListItemType.It em ||
item.ItemType == ListItemType.Al ternatingItem)
{
TextBox txtFirstName, txtLastName;
txtFirstName = item.FindContro l
("txtFirstName" ) as TextBox;
txtLastName = item.FindContro l
("txtLastNam e") as TextBox;
}
}
}
[color=blue]
>-----Original Message-----
>I have a DataGrid, which I created two template columns,[/color]
and I added[color=blue]
>TextBoxes to their Footers to allow the user add a new[/color]
record to the[color=blue]
>database. I cannot access TextBoxs' values in the code.[/color]
What can I do?[color=blue]
>
>Thanks
>Serdar KALAYCI
>
>--
>
>
>
>.
>[/color]
private void btnSave_OnClick (object sender, EventArgs e)
{
foreach(DataGri dItem item in grdUsers.Items)
{
if(item.ItemTyp e == ListItemType.It em ||
item.ItemType == ListItemType.Al ternatingItem)
{
TextBox txtFirstName, txtLastName;
txtFirstName = item.FindContro l
("txtFirstName" ) as TextBox;
txtLastName = item.FindContro l
("txtLastNam e") as TextBox;
}
}
}
[color=blue]
>-----Original Message-----
>I have a DataGrid, which I created two template columns,[/color]
and I added[color=blue]
>TextBoxes to their Footers to allow the user add a new[/color]
record to the[color=blue]
>database. I cannot access TextBoxs' values in the code.[/color]
What can I do?[color=blue]
>
>Thanks
>Serdar KALAYCI
>
>--
>
>
>
>.
>[/color]