Hello friends,
i have table name called branch which has branchid,brachname columns. i want to retrieve branchname value to the datarow class using sqldatareader.and then this value is need to bind with combobox text . please help me.
How to bind row value to datarow class from sql server database using sqldatareader
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Atul KumarRank #1,527 · 1K reputationPosted Jul 27, 2012, 12:52 AM EDT
List
if (reader.HasRows)
{
while(reader.Read())
{
branchNames.Add(reader["branchName"].ToString());
}
}
dataGrid.DataSource = branchNames;
Atul KumarRank #1,527 · 1K reputationPosted Jul 27, 2012, 1:07 AM EDT