Hello i am using Datagrid in my silverlight 4 application
In the DataGrid I have a template column with a TextBox.
Runtime i have added this to the grid row.
Now I want to read that newly added textbox and save it to the database on save button click.
This save button is outside the grid.
My class is as
public class Employee
{
public int EmpID{get;set;}
public string EmpName{get;set;}
public string EmpAddress{get;set;}
}
I am using a datagrid with a templatecolumn like below with ItemSource set as List<employee>
<data:datagridtemplatecolumn width="100" xmlns:data="#unknown">
<data:datagridtemplatecolumn.celltemplate>
<datatemplate>
<textbox name="txt_EmpName" acceptsreturn="True" text="{Binding EmpName}"></textbox>
</datatemplate>
</data:datagridtemplatecolumn.celltemplate>
</data:datagridtemplatecolumn>
and the button click event handler is
private void btn_save_Click(object sender, System.Windows.RoutedEventArgs e)
{}
Please please please guide me..
Ho i access this textbox and achieve my target.
Thanks in advance