jQWidgets Forums
Forum Replies Created
-
Author
-
Hi Dimitar,
Thanks for your reply and its working perfect.
Thanks a lot.
June 5, 2014 at 10:53 am in reply to: Issue with add combobox in toolbar of grid Issue with add combobox in toolbar of grid #55410Hello Peter,
I apologize for my spelling mistake.
I am using following code and its not working for me :
———-$(“#jqxgridS”).bind(‘bindingcomplete’, function (event) {
var sourceOptions = [{ label: ‘Aircraft Type, Model’, value: ‘aircraft_type’ },
{ label: ‘Region Current Operator’, value: ‘current_operator_region’ },
{ label: ‘Region (lessor/owner)’, value: ‘lessor_owner_region’ },
{ label: ‘Current Operator’, value: ‘current_operator’ },
{ label: ‘Lessor/Owner’, value: ‘lessor_owner’ }];$(“#columnchooser”).jqxDropDownList({source:sourceOptions, autoDropDownHeight: true, selectedIndex: 0, width: 200, height: 25});
$(“#columnchooser”).on(‘select’, function (event){ /*** some code ***/ });});
And in grid i m using following code for toolbar.
————————————————–
showtoolbar: true,
rendertoolbar: function (toolbar) {var me = this;
var container = $(“<div style=’margin:3px 10px; height:25px;’></div>”);
toolbar.append(container);
container.append(‘<div style=”float:left; padding-top:5px; font-weight:bold;”>Summary Report: </div>’);
container.append(‘<div id=”columnchooser” style=”float:left; margin-left:5px;”></div>’);}
Please suggest!!!!
June 5, 2014 at 10:23 am in reply to: Issue with add combobox in toolbar of grid Issue with add combobox in toolbar of grid #55401Hello Peter,
I have done changes suggested by you, but no luck!!!
$(“#columnchooser”).jqxDropDownList({source:sourceOptions, autoDropDownHeight: true, selectedIndex: 0, width: 200, height: 25});
$(“#columnchooser”).on(‘select’, function (event){ /*** some code ***/ });I have added above mentioned lines in grid’s ready function, but not working and than added on bindcompleted callback function, again not working.
Can you please do let me know how to implement above mentioned code.
My goal is : Add combobox in grid’s toolbar and on value selection of combo , grid will be reload with new data from DB.
Please suggest!!!!!!!!
June 4, 2014 at 1:57 pm in reply to: Issue with add combobox in toolbar of grid Issue with add combobox in toolbar of grid #55338Thanks Peter, You give me the right direction to achieve my task goal.
June 4, 2014 at 1:05 pm in reply to: Issue with add combobox in toolbar of grid Issue with add combobox in toolbar of grid #55327Hi Peter,
Here is my sample code.
When I select option of combobox, error showing in console——————————–
$(“#jqxgridS”).jqxGrid(
{
width: ‘99.9%’,
autoheight:true,
source: dataadapterS,
theme: ‘energyblue’,
pageable: true,
sortable: false,
pagesize:10,
altrows: true,
groupable: false,
enablemousewheel: false,
virtualmode: true,
pagermode: ‘simple’,
rendergridrows: function () {
return dataadapterS.records;
},rowdetails: true,
initrowdetails: initrowdetails,showtoolbar: true,
rendertoolbar: function (toolbar) {
var me = this;
var container = $(“<div style=’margin:3px 10px; height:25px;’></div>”);
toolbar.append(container);
container.append(‘<div style=”float:left; padding-top:5px; font-weight:bold;”>Summary Report: </div>’);
container.append(‘<div id=”columnchooser” style=”float:left; margin-left:5px;”></div>’);var sourceOptions = [{ label: ‘Aircraft Type, Model’, value: ‘aircraft_type’ },
{ label: ‘Region Current Operator’, value: ‘current_operator_region’ },
{ label: ‘Region (lessor/owner)’, value: ‘lessor_owner_region’ },
{ label: ‘Current Operator’, value: ‘current_operator’ },
{ label: ‘Lessor/Owner’, value: ‘lessor_owner’ }];$(“#columnchooser”).jqxDropDownList({source:sourceOptions, autoDropDownHeight: true, selectedIndex: 0, width: 200, height: 25});
$(“#columnchooser”).on(‘select’, function (event){
sumGroupMode = $(this).val();
sourceS =
{
datatype: “json”,
url: ‘<?php echo $this->Html->url(array(“controller” => “fleets”, “action” => “get_summary_list”, “admin”=>”true”));?>’,
data: { getGroupMode:sumGroupMode
},
root: ‘Rows’,
cache: false,
id: sumGroupMode,
beforeprocessing: function(data)
{
sourceS.totalrecords = data[0].TotalRows;
}
};
dataadapterS = new $.jqx.dataAdapter(sourceS);$(“#jqxgridS”).jqxGrid({source: dataadapterS});
});},
columns: [{ text: ‘Aircraft Type’, datafield: ‘aircraft_type’, width: ‘16%’ },
{ text: ‘Aircraft Model’, datafield: ‘aircraft_model’, width: ‘15%’ },
{ text: ‘Count’, datafield: ‘countData’, width: ‘11%’ },
{ text: ‘Count with values’, datafield: ‘countValues’, width: ‘14%’ },
{ text: ‘∑ CMV’, datafield: ‘sumCMValues’, width: ‘11%’ },
{ text: ‘Avg. CMV’, datafield: ‘avgCMValues’, width: ‘11%’ },
{ text: ‘∑ BV’, datafield: ‘sumBValue’, width: ‘11%’ },
{ text: ‘Avg. BV’, datafield: ‘avgBValue’, width: ‘11%’ }]
});——————-
-
AuthorPosts