Hi how i check for null in gridview.
GridViewRow row = gv_supg.Rows[e.NewSelectedIndex];
ddlstate.SelectedValue = row.Cells[9].Text;
ddlCountry.SelectedValue = row.Cells[10].Text;
how i can check for null for ddlstate value.Beacouse when there is null in DB the next attribute values does not assign to dropdownlist which is ddlCountry and 5 more attributes.
Pls any 1 can help me.Thanks in advance.

I do not understand clearly your question but, to answer how do you check if the gridview has any rows this is what I usually do.

if(yourgridview.Rows.Count > 0)
{
    //Has some rows
}
else
{
    //No rows
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.