TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sreekanth
NA
331
1m
windows froms,combobox,datagridview
Oct 28 2009 11:54 PM
public void Cmbfill(DropDownList Cntrl,string Sql)
{
Cmd=new SqlCommand(Sql,con);
Cmd.CommandTimeout=0;
myReader=Cmd.ExecuteReader();
Cntrl.Items.Clear();
if (myReader.HasRows)
{
while (myReader.Read())
{
ListItem Lst2=new ListItem(myReader[1].ToString(),myReader[0].ToString());
Cntrl.Items.Add(Lst2);
}
myReader.Close();
}
else
{
myReader.Close();
}
}
this our simple code in filling dropdownlist in web forms...
i nedd exact coding in C# for windows application. & and one more datagridview control details in fullstrngth
pls help me?
Reply
Answers (
2
)
object reference not set to an instance of an object
how to use session object