bojjamkishore
June 11th, 2008, 02:02 AM
Hi
i have a drop down list with list of items,
i want to know how can we set the TOOL TIP for each item when i do mouse over.
can u help me please below is the code which i have written in C# ans Asp.net
<asp:DropDownList runat="server" id="cboAttachedDoc" Width="250px" CssClass="input">
<asp:ListItem Selected="True" Value="" Text="<%$ Resources:Resource, cboSelectText %>" />
</asp:DropDownList>
FillDocumentAttachedList-----filling the list by calling this method
for (int i = 0; i < oValuation.DD.RC.Count; i++)
{
DataRow dr = dt.NewRow();
if (oValuation.DD.RC[i].UID != null && (oValuation.DD.RC[i].UIDSpecified))
dr["UID"] = oValuation.DD.RC[i].UID;
else
dr["UID"] = 0;
if (oValuation.DD.RC[i].FN != null)
dr["FileName"] = oValuation.DD.RC[i].FN;
else
dr["FileName"] = string.Empty;
if (!dt.Rows.Contains(oValuation.DD.RC[i].UID))
dt.Rows.Add(dr);
cboAttachedDoc.Items(i).Attributes.Add("title", cboAttachedDoc.Items(i).Text);
}
foreach (DataRowView drv in dt.DefaultView)
{
ListItem item = new ListItem();
item.Value = drv["UID"].ToString();
item.Text = drv["FileName"].ToString();
if (!cboList.Items.Contains(item))
cboList.Items.Add(item);
}
i have a drop down list with list of items,
i want to know how can we set the TOOL TIP for each item when i do mouse over.
can u help me please below is the code which i have written in C# ans Asp.net
<asp:DropDownList runat="server" id="cboAttachedDoc" Width="250px" CssClass="input">
<asp:ListItem Selected="True" Value="" Text="<%$ Resources:Resource, cboSelectText %>" />
</asp:DropDownList>
FillDocumentAttachedList-----filling the list by calling this method
for (int i = 0; i < oValuation.DD.RC.Count; i++)
{
DataRow dr = dt.NewRow();
if (oValuation.DD.RC[i].UID != null && (oValuation.DD.RC[i].UIDSpecified))
dr["UID"] = oValuation.DD.RC[i].UID;
else
dr["UID"] = 0;
if (oValuation.DD.RC[i].FN != null)
dr["FileName"] = oValuation.DD.RC[i].FN;
else
dr["FileName"] = string.Empty;
if (!dt.Rows.Contains(oValuation.DD.RC[i].UID))
dt.Rows.Add(dr);
cboAttachedDoc.Items(i).Attributes.Add("title", cboAttachedDoc.Items(i).Text);
}
foreach (DataRowView drv in dt.DefaultView)
{
ListItem item = new ListItem();
item.Value = drv["UID"].ToString();
item.Text = drv["FileName"].ToString();
if (!cboList.Items.Contains(item))
cboList.Items.Add(item);
}