1
Answer

fill tooltip from database for radiobuttonlist?

Hardik Patel

Hardik Patel

11y
1.6k
1
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)