Saturday, September 11, 2010

Bind dropdownlist default value

On RowDataBound
ddlCountry.SelectedValue = Ds.Tables[0].Rows[e.Row.RowIndex]["CountryId"].ToString();

On SelectedIndexChanged
ddlRGroup.SelectedValue = Ds.Tables[0].Rows[0]["RatingId"].ToString();

if (!Page.IsPostBack)
SqlDataReader dr = SqlHelper.ExecuteReader(connectionString, "tblFormula_Select", Convert.ToInt32(ViewState["CKFId"]), "S");
ddlTemp.SelectedValue = dr["TemplateId"].ToString();

10 comments:

  1. Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.

    rpa training in bangalore
    best rpa training in bangalore
    RPA training in bangalore
    rpa courses in bangalore

    ReplyDelete
  2. Thanks a lot for sharing us about this update. Hope you will not get tired on making posts as informative as this. 
    Devops Training courses
    python Training in chennai
    Devops Training in Bangalore

    ReplyDelete
  3. This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.
    I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.
    Java training in Chennai
    Java training in Bangalore
    Java online training
    Java training in Pune






    ReplyDelete
  4. Nice post. By reading your blog, i get inspired and this provides some useful information. Thank you for posting this exclusive post for our vision. 
    AWS Training in Bangalore

    ReplyDelete
  5. After reading this web site I am very satisfied simply because this site is providing comprehensive knowledge for you to audience.
    Thank you to the perform as well as discuss anything incredibly important in my opinion. We loose time waiting for your next article writing in addition to I beg one to get back to pay a visit to our website in



    selenium training in Bangalore
    selenium training in Marathahalli
    selenium training in Btm layout
    selenium training in Jaya nagar
    selenium training in Electronic city
    selenium training in Kalyan nagar

    ReplyDelete
  6. After reading your post I understood that last week was with full of surprises and happiness for you. Congratz! Even though the website is work related, you can update small events in your life and share your happiness with us too.
    python Training institute in Chennai
    python Training institute in Bangalore
    python Training in Pune

    ReplyDelete
  7. This comment has been removed by the author.

    ReplyDelete