issue using cloumnFilter on JQuery datatable -
i'm trying implement jquery datatables plug-in columnfilter (http://jquery-datatables-column-filter.googlecode.com/svn/trunk/index.html). working fine when using type="text"
or type="date-range"
. when using type="select"
without specifiyng values function break. if specify values works fine. values text.
this html:
<table id="datatable50-2"> <thead> <tr> <th>#</th> <th>@resources.leadtype</th> <th>@resources.provider</th> <th>@resources.campaigns_campaignname</th> <th>@resources.firstname</th> <th>@resources.lastname</th> <th>@resources.phone</th> <th>@resources.email</th> <th>@resources.insertiondate</th> <th>@resources.insertiontime</th> @if (viewbag.department != null) { <th>@resources.leadattachedtouser</th> } </tr> </thead> <tfoot> <tr> <th></th> <th>@resources.leadtype</th> <th>@resources.provider</th> <th id="campaigncol">@resources.campaigns_campaignname</th> <th>@resources.firstname</th> <th>@resources.lastname</th> <th>@resources.phone</th> <th>@resources.email</th> <th>@resources.insertiondate</th> <th></th> <th></th> </tr> </tfoot> <tbody> @foreach (var lead in model) { counter++; <tr> <td></td> <td>@lead.leadtype.typedescription</td> <td>@lead.campaign.provider.providername</td> <td>@lead.campaign.campaignname</td> <td>@lead.firstname</td> <td>@lead.lastname</td> <td>@lead.mobilephone</td> <td>@lead.email</td> <td>@(((datetime)lead.insertiondatetime).toshortdatestring())</td> <td>@(((datetime)lead.insertiondatetime).toshorttimestring())</td> @if (viewbag.department != null) { <td> @html.dropdownlistfor(modelitem => lead.user.userid, new selectlist(viewbag.users, "value", "text"), resources.chooserepresentative, new { @class = "lead_user_userid" }) </td> } </tr> } </tbody> </table>
and js:
$(document).ready(function () { $('#datatable50-2').datatable({ aasorting: [], "idisplaylength": 50, bjqueryui: true }) .columnfilter({ aocolumns: [ null, { type: "text"}, { type: "text"}, { type: "text" }, { type: "text"}, { type: "text"}, { type: "text"}, { type: "select"}, { type: "date-range" }, null, null ] }); });
can think of reasone why don't select work?
thanks!
Comments
Post a Comment