<asp:CheckBoxList ID="ckl_EditRole" DataValueField="RoleName" runat="server">
</asp:CheckBoxList>
public void BindListBoxPermission(int field)
{
MySqlCommand command = new MySqlCommand();
DataSet ds = new DataSet();
int newOrgID = field;
string MysqlStatement = "SELECT RoleName from tbl_Role Where RoleID >1 order by RoleID desc";
MySqlParameter[] param = new MySqlParameter[0];
ds = server.ExecuteQuery(CommandType.Text, MysqlStatement, param);
ckl_EditRole.DataSource = ds;
ckl_EditRole.DataBind();
}
For each item tooltip is different, for admin tooltip is creates user and for users tooltip is creates message. How can I add tooltip for each item inside the check box
protected void Page_PreRender(object sender, EventArgs e)
{
foreach (ListItem item in ckl_EditRole.Items)
{
item.Attributes["title"] = GetRoleTooltip(item.Value);
}
}
private static string GetRoleTooltip(string p)
{
// here is your code to get appropriate tooltip message depending on role
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With