Hardik Patel

Hardik Patel

  • NA
  • 378
  • 467.3k

fill tooltip from database for radiobuttonlist?

Sep 5 2013 4:28 AM
i am using below code to fill radio list from database. i want tooltip for all radio buttion. but it outtonnly display tooltip for first radiobutton. and remain same for all radiobuttons.

 private void FillCHKFacility()
    {
        try
        {
            sq = new SQLDataAccessHelper();
            SqlParameter[] param = new SqlParameter[1];
            param[0] = new SqlParameter("@facilityid", SqlDbType.Int);
            param[0].Value = DBNull.Value;
            ds = new DataSet();
            ds = sq.ExecuteDataSet("usp_FillFacility", param);
            if ((ds != null) && (ds.Tables.Count != 0) && (ds.Tables[0].Rows.Count != 0))
            {

                rblFacility.Items.Clear();
                rblFacility.DataSource = ds;
                rblFacility.DataTextField = "FacilityName";
                rblFacility.DataValueField = "FacilityId";
               // rblFacility.ToolTip = "NoOfSeats";
                rblFacility.DataBind();
                rblFacility.Items.Insert(0, "All");
                rblFacility.SelectedIndex = 0;
                rblFacility.ToolTip = ds.Tables[0].Rows[0]["NoOfSeats"].ToString();

            }

Answers (1)