Textbox
i have linked datagrid with database,it has 3 columns that is id,name, age. id is primary key i have added textbox whereby when i type id in textbox it display other columns in datagrid,kindly help on how to do so
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Nirmal HotaRank #1,004 · 2K reputationPosted Mar 4, 2015, 12:43 AM EST
May be this trick would help you.
foreach(DataGridItem item in gridname.Items )
{
TextBox txt = item.Cells[0].FindControl("txtId") as TextBox;
Label lblgridName = item.Cells[0].FindControl("lblName") as Label;
Label lblgridAge = item.Cells[0].FindControl("lblAge") as Label;
//add txt.TextChanged event and assign values to the lables.
}
Hope this helps.
Carlos kambuiRank #2,642 · 528 reputationPosted Mar 4, 2015, 1:20 AM EST