开发者

issue in jquery checkbox dropdown control

开发者 https://www.devze.com 2022-12-13 23:21 出处:网络
strong text i need to generate checkbox for2 different data Tablein asingle drop down control like alt text http://jdm8jq.bay.livefilestore.com/y1pBAyKOMS7Y7YbA6Q2kl5JA6RGHr3WCNh9aA1ttFzShAas36RQxTov

strong text i need to generate checkbox for 2 different data Table in a single drop down control

like alt text http://jdm8jq.bay.livefilestore.com/y1pBAyKOMS7Y7YbA6Q2kl5JA6RGHr3WCNh9aA1ttFzShAas36RQxTovGxkCqeMYfygADc5W8nmnPyONOCy9cOMGzAt3mR1ADyck/untitled.JPG

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>

    <script src="../Scripts/jquery-1.3.2.js" type="text/javascript"></script>

    <script src="../Scripts/ui.core.js" type="text/javascript"></script>

    <script src="../Scripts/ui.dropdownchecklist.js" type="text/javascript"></script>

    <link href="../Scripts/ui.dropdownchecklist.css" rel="stylesheet" type="text/css" />
    <link href="../Scripts/demo.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
$(funct开发者_StackOverflowion() {
$('.listBox').dropdownchecklist({maxDropHeight:200});
//$('.listBox').dropdownchecklist({ maxDropHeight: 200 }); 
});
</script>
</head>
<body>    <form id="form1" runat="server">    <div>   
     <asp:ListBox ID="listBox" runat="server" SelectionMode="Multiple" CssClass ="listBox" />  
      <asp:LinkButton ID="btn" runat="server" Text="Click me" OnClick="BtnClick" />    
          <asp:Label ID="result" runat="server" />  
            </div>  
              </form>
              </body>
</html>

 **in .cs**  

i have 2 datatable in.cs page

            DataTable dt1 = new DataTable(); 
            ad.Fill(dt1);
            listBox.DataSource = dt1;
            listBox.DataBind();

DataTable dt2 = new DataTable(); 
            ad.Fill(dt2);
            listBox.DataSource = dt2;
            listBox.DataBind();

the site i am refering is [http://dropdown-check-list.googlecode.com/svn/trunk/src/demo.html][2]

how to Bind 2 different tables under one control that is list box control. so that i can get two different data table groups under one control one table would be an items table, and another table could be itemsDetails table. so that i have show 2 differnet datatable details under one control what is the syntax that i should follow to get it achived

hope my Question is clear

any help would be great

thank you


I am not too sure yet how to do it with 2 different binding sources but can't you just like loop through the datasets and add them manually?

Also your link does not work but I think this is the plugin your using right?

http://aleris.wordpress.com/2009/04/11/new-version-of-jquery-dropdown-checkbox-list-plugin/

If this is the right one they use "optgroup" what asp.net dropdown list does not seem to support. So that might be another problem your going to be facing and from what I saw from other people solving it you might have to override the drop down list control to add that.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号