how to disable some fields from dropdownchecklist in jquery
I have a listbox with some datasouce attached to it, and i have made it as a dropdowncheklist using jquery. now i want to disable some of the checkboxes in list according to my dataset return through my select query. could you plz help me out.. I am binding data to listbox by following code:
Lb_MultiClient.Items.Clear();
Lb_MultiClient.Items.Add("All");
Lb_MultiClient.DataSourceID = "SqlDS_ClientProj";
Lb_MultiClient.DataTextField = "ClientProj_idname";
Lb_MultiClient.DataValueField = "Client_Project_Id";
Lb_MultiClient.DataBind();
my aspx code for hat listbox is as follows:
<as开发者_如何学运维p:ListBox ID="Lb_MultiClient" runat="server" Height="22px" SelectionMode="Multiple"
Width="210px" AppendDataBoundItems="True">
</asp:ListBox>
My jquery code for this is:
$(document).ready(function() {
$("#Lb_MultiClient").dropdownchecklist( { onItemClick: function(checkbox) {
},firstItemChecksAll: true, explicitClose: '...close' , emptyText: str , width: 200 } );
});
Try to use the .Enabled
property of ListItem
class.
精彩评论