1
News / Re: Roadmap of ParamQuery
« on: October 10, 2024, 02:12:34 pm »
Hello, is there a roadmap for Paramquery Grid for 2024 and 2025?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
var filterModel = state.filterModel || {};
this.option('filterModel.header', filterModel.header);
this.option('filterModel.on', filterModel.on);
this.option('filterModel.menuIcon', filterModel.menuIcon);
this.option('filterModel.gridOptions', filterModel.gridOptions);
this.option('filterModel.timeout', filterModel.timeout);
this.option('filterModel.type', filterModel.type);
var pageModel = state.pageModel || {};
this.option('pageModel.rPP', pageModel.rPP);
this.option('menuIcon', state.menuIcon);
this.option('columnBorders', state.columnBorders);
this.option('rowBorders', state.rowBorders);
this.option('numberCell', state.numberCell);
this.loadState({state:state,refresh: true });
<select name='acCode' id='acCode' class='form-select select2ara ' multiple data-tag='true' data-po='accuntList' data-selected='a,b,c'></select>
<select name="hid" id="hid" class="form-select select2">
<option value=""></option>
<option value="31">Ahmet</option>
<option value="30">Ă–mer</option>
</select>
// select2 remote data
function initSelect2Ara(element) {
let selectedValue = String(element.data('selected') || '');
let selectedValues = selectedValue ? selectedValue.split(',') : [];
let po = element.data('po');
let rtip = element.data('rtip');
element.select2({
theme: "bootstrap-5",
cache: true,
data: selectedValues.map(function (value) {
return { id: value.trim(), text: value.trim(), selected: true };
}),
minimumInputLength: 1,
ajax: {
url: "/search.asp?p=s2",
dataType: 'json',
delay: 25,
data: function (params) {
return {
po: po,
rtip: rtip,
q: params.term,
page: params.page
};
},
processResults: function (data, params) {
params.page = params.page || 1;
return {
results: data.items,
pagination: {
more: (params.page * 50) < data.total_count
}
};
}
}
});
}
// select2 local data
function initSelect2Multi(element) {
let selectedValue = String(element.data('selected') || '');
let selectedValues = selectedValue ? selectedValue.split(',') : [];
element.select2({
theme: "bootstrap-5",
cache: true,
data: selectedValues.map(function (value) {
return { id: value.trim(), text: value.trim(), selected: true };
}),
allowClear: true
});
}
$(document).ready(function () {
$(".select2").each(function () {
initSelect2Multi($(this));
});
$(".select2ara").each(function () {
initSelect2Ara($(this));
});
});
text: itemlist.find( item => item.value==ui.cellData)?.label || ''
render: function (ui) {
if (ui.rowData['bc']) {
return { style: 'background-color:' + ui.rowData['bc'] + ';' };
}
},
,{title:'Tarih',dataIndx:'Tarih',dataType:'date',minWidth:24,width:85,cls:'',clsHead:'',align:'',halign:'center',hidden:false,editable:false
,editor:{attr:'type="date" autofocus'},format:'dd/mm/yy',formatRaw:'yy-mm-dd',formatSel:'yy-mm-dd'
,filter:{crules: [{ condition:'between'}],menuIcon:false}
,render:function (ui) {return {attr:'title="'+ui.cellData+'"', style :"background-color:"+ui.rowData['ColorCode']+";" } }
}
{
name: 'Save AS',
icon: 'ui-icon ui-icon-extlink',
subItems: [{
name: 'Print',
action: function () {
console.log(this);
var exportHtml = this.exportData({ title: 'Print', format: 'htm', render: true }),
newWin = window.open('', '', 'width=1200, height=700'),
doc = newWin.document.open();
doc.write(exportHtml);
doc.close();
newWin.print();
}
},
{
name: 'Excel',
action: function(){
exportData.call(this, 'xlsx');
}
},
{
name: 'Csv',
action: function(){
exportData.call(this, 'csv');
}
},
{
name: 'Html',
action: function(){
exportData.call(this, 'html');
}
},
{
name: 'Json',
action: function(){
exportData.call(this, 'json');
}
}
]
},
function exportData(format){
var blob = this.exportData({
format: format
})
if(typeof blob === "string"){
blob = new Blob([blob]);
}
saveAs(blob, "Portal."+ format );
}
,{title:'Reg.Date',dataIndx:'reqDate',dataType:'date',minWidth:24,width:85,cls:'',clsHead:'',align:'',halign:'center',hidden:false,editable:false
,editor:{attr:'type="date" autofocus'},format:'dd/mm/yy',formatRaw:'yy-mm-dd',formatSel:'yy-mm-dd'
,filter:{crules: [{ condition:'between'}],menuIcon:false}
,render:function (ui) {return {attr:'title="'+ui.cellData+'"',cls:ui.rowData['reqDateClass']} }
}