Search
11455 results 1941-1950
Forum
- 14th Feb 2018Filter table from HTML option elsewhere on page.I've given up this approach and resorted to a different approach. Showing the Razor code too in case someone shares my scenario (i.e., using .NET MVC 5 and trying to do something similar). It's not an elegant approach and requires more page loads depending on how the user uses the View, but it works. Declare Reconciled as a variable in my C# ViewModel and submit the form to (re)load the View with the intended parameters. @using (Html.BeginForm("Index", "ReconcileSummaryStudentsStillAbsents", FormMethod.Get)) { <p style="display: inline-block">Campus: @Html.DropDownListFor(m => m.Campus, Model.CampusList)</p> <p style="display: inline-block">Reconciled: @Html.DropDownListFor(m => m.Reconciled, Model.ReconciledList)</p> <input type="submit" value="submit" id="SubmitButton" /> } When the View loads after form submit, the editor is called with the intended parameters. var dataTableConfig = { dom: "Blftipr", ajax: { url: "@Url.Action("EditorTable")", data: { campus: "@Model.Campus", reconciled: $("#Reconciled").val() }, type: "POST" }, serverSide: true, And now I'm able to see the desired records after changing a dropdown value.
- 2nd Feb 2018Column filter sizeActually, @allan, upon further investigation I think the widths of the inputs are already at 100% by default. The <th> width is somehow being set to a specific pixels width for the first row (the actual header row), not the input row. That's where I was getting hung up before.
- 15th Dec 2017Datatables select inputs columns filter shows only 10 results when using server side processingHi, My server side script came from your generator https://editor.datatables.net/generator/index Do you have any example or give me the guidelines to do it? Best regards
- 30th Oct 2017How do I use $_SESSION['userId'] to filter the rows that the loggen in user can view / edit?Hi Allan, Thanks for pointing me in the right direction Your ->where( 'vendors.id', $_SESSION['userId'] ) only needed to be changed to ->where( 'vendors.id', $_SESSION['vendor'] ) Problem solved - couldn't have done it without you! Thanks and best wishes Ian
- 20th Oct 2017Filter Search very slowI found the problem. I uses a plugin ColumnFilterWidgets.js, but it was not updated for this Datatable version. thank you
- 10th Oct 2017page size control and filter disappear after postbackfor someone running into this issue and not getting any response! Keep your data table inside update panel and add the following javascript code: $(function () { bindDataTable(); // bind data table on first page load // bind data table on every UpdatePanel refresh Sys.WebForms.PageRequestManager.getInstance().add_endRequest(bindDataTable); }); function bindDataTable() { var myDT = $('#fcTable').DataTable({ whatever your setting are }); }
- 14th Sep 2017can I filter a datatable according to an SQL query?Please don't post duplicate questions. I provided one option for you in this thread: https://datatables.net/forums/discussion/44679/filtering-specific-value-of-specific-column#latest Kevin
- 5th Sep 2017I have a custom built input search field. How can I filter the table from this search field?Thanks Kevin! That helped.
- 3rd Sep 2017Checkbox FilterEven though this example shows how to use regex searching the fundamentals would be the same: https://datatables.net/examples/api/regex.html You could have an event for your checkbox and call a function to perform the column search for > 500 or whatever is desired. Kevin
- 24th Aug 2017Filter by column issueThat worked.Thank you both for your help!