Rank: Newbie
Groups: Registered
Joined: 1/12/2024(UTC) Posts: 2 Thanks: 1 times
|
Hey all, I'm having issues with data table views/params and could use some help from an experienced eye (this is my first SEAL adventure). We're using V6.1 for now as we're unable to use .Net core just yet. The first issue is that not all of my view parameters are being passed to the template when using the default Data Table template. I'm trying to enable scrolling on the datatable and have a value set for Vertical Scrolling, Pagination, Scroll Collapse, and Scroller but they don't make it to the actual dom upon rendering. Screenshot of View Parameters for this Data TableCode:
$(document).ready(function () {
var dt = $('#dt_22594073-30fb-4852-8d58-40bb523f6fdd8efd4f17c7924f0ea8f897d305f6322c');
try {
if (dt != null && true && !false)
{
var dto = dt.dataTable({
responsive: true,
ordering: true,
paging: true,
lengthMenu: [[10, 25, 50, 100, 500], [10, 25, 50, 100, 500]],
pageLength: -1,
info: true,
searching: true,
processing: true,
order: [],
serverSide: true,
ajax: function(data, callback, settings) {
getTableData($(this), "c0a0c013245942ef87c4694206677b06", $(this).attr("viewid"), $(this).attr("pageid"), data, callback, settings);
}
});
}
$('.dataTables_filter input[type="search"]').css(
{ 'width': '90px', 'display': 'inline-block' }
);
}
catch (e) { };
});
I thought perhaps I could get it working using params via a custom template, but as soon as any modification is made to the custom template I get javascript errors due to what appear to be faulty parameters checks. A few of the issues I see are..
- ScrollY value not being rendered
- scrollCollapse rendering false
- The: @if (view.GetValue("data_tables_fixcolleft") != "0" || view.GetValue("data_tables_fixcolright") != "0") is somehow evaluating to true when both are set to 0 (which causes invalid javascript resulting in no render at all)
Code:
var dt = $('#dt_99521dcb84324a86ba90f93403789ae8'); //test
try {
if (dt != null && true && !false)
{
var dto = dt.DataTable({
dom: "",
responsive: true,
ordering: true,
paging: true,
lengthMenu: [[5,10,25,50,100,500, -1], [5,10,25,50,100,500, "All"]],
pageLength: -1,
info: true,
searching: true,
processing: true,
order: [],
serverSide: true,
scrollX: false,
scrollCollapse: false,
fixedColumns: {
leftColumns: ,
rightColumns:
},
ajax: function(data, callback, settings) {
getTableData($(this), '8aaa03621a314d0fb0c1f5f454e4a6b4', '4dfa12a0-02a4-4871-9863-ca5837e359b2', 'e7ae4d87f96f4fad849d355ff9f19c25', data, callback, settings);
}
});
initNavCells('8aaa03621a314d0fb0c1f5f454e4a6b4', '[viewid="4dfa12a0-02a4-4871-9863-ca5837e359b2"]');
}
Here's the full default custom template I've been using: Data Table View TemplateThings I've tried....
- Grabbing a fresh data table template from the V6.1.0.0 github (I diff'd the one I was working with and it was identical)
- Confirming that I am running report designer V6.1.0.0
If need be, I may end up creating a custom free view template from scratch (I may have to to enable multi-column sorting.. need to do some more research) and duplicating/modifying for each data table we need, but it sure would be nice to be able to use the provided parameters. Thank you for your time and assistance :) Edited by user Friday, January 12, 2024 9:31:25 PM(UTC)
| Reason: duplicate text
|