jQWidgets Forums
Forum Replies Created
-
Author
-
October 24, 2014 at 6:36 am in reply to: Datepicker in the same page with grid not working Datepicker in the same page with grid not working #61579
solved the issue same js files where included 2 twice.
Once in the main page and next time in the grid page.October 23, 2014 at 2:06 pm in reply to: Datepicker in the same page with grid not working Datepicker in the same page with grid not working #61532The grid is saved in a seperate page
<link rel=”stylesheet” href=”../../jqwidgets/styles/jqx.base.css” type=”text/css” />
<script type=”text/javascript” src=”../../scripts/jquery-1.11.1.min.js”></script>
<script type=”text/javascript” src=”../../jqwidgets/jqxcore.js”></script>
<script type=”text/javascript” src=”../../jqwidgets/jqxbuttons.js”></script>
<script type=”text/javascript” src=”../../jqwidgets/jqxscrollbar.js”></script>
<script type=”text/javascript” src=”../../jqwidgets/jqxmenu.js”></script>
<script type=”text/javascript” src=”../../jqwidgets/jqxgrid.js”></script>
<script type=”text/javascript” src=”../../jqwidgets/jqxgrid.selection.js”></script>
<script type=”text/javascript” src=”../../jqwidgets/jqxgrid.columnsresize.js”></script>
<script type=”text/javascript” src=”../../jqwidgets/jqxdata.js”></script>
<script type=”text/javascript” src=”../../jqwidgets/jqxgrid.sort.js”></script><script type=”text/javascript” src=”../../jqwidgets/jqxcheckbox.js”></script>
<script type=”text/javascript” src=”../../jqwidgets/jqxdropdownlist.js”></script>
<script type=”text/javascript” src=”../../jqwidgets/jqxgrid.edit.js”></script>
<script type=”text/javascript” src=”../../jqwidgets/jqxgrid.selection.js”></script><script type=”text/javascript” src=”../../jqwidgets/jqxgrid.pager.js”></script>
<script type=”text/javascript” src=”../../jqwidgets/jqxgrid.filter.js”></script>
<script type=”text/javascript” src=”../../jqwidgets/globalization/globalize.js”></script>
<script type=”text/javascript” src=”../../jqwidgets/jqxpanel.js”></script><script type=”text/javascript”>
var data= ‘<%=com.controlcentre.masters.vehiclemaster.brand.ClsBrandAction.searchDetails() %>’;
$(document).ready(function () {var num = 0;
var source =
{
datatype: “json”,
datafields: [
{name : ‘DOC_NO’ , type: ‘int’ },
{name : ‘BRAND_NAME’, type: ‘String’ },
{name : ‘DATE’, type: ‘String’ }],
localdata: data,pager: function (pagenum, pagesize, oldpagenum) {
// callback called when a page or page size is changed.
}
};var dataAdapter = new $.jqx.dataAdapter(source,
{
loadError: function (xhr, status, error) {
alert(error);
}
}
);
$(“#jqxBrandSearch”).jqxGrid(
{
width: ‘75%’,
height: 315,
source: dataAdapter,
columnsresize: true,
pageable: true,
altRows: true,
sortable: true,
selectionmode: ‘singlerow’,
pagermode: ‘default’,//Add row method
columns: [
{ text: ‘DOC_NO’, datafield: ‘DOC_NO’, width: ‘10%’ },
{ text: ‘BRAND_NAME’, datafield: ‘BRAND_NAME’, width: ‘50%’ },
{ text: ‘DATE’, datafield: ‘DATE’, width: ‘40%’ }
]
});
$(‘#jqxBrandSearch’).on(‘rowselect’, function (event) {
var rowindex1=event.args.rowindex;
document.getElementById(“docno”).value= $(‘#jqxBrandSearch’).jqxGrid(‘getcellvalue’, rowindex1, “DOC_NO”);
document.getElementById(“brand”).value = $(“#jqxBrandSearch”).jqxGrid(‘getcellvalue’, rowindex1, “BRAND_NAME”);
document.getElementById(“date_brand”).value = $(“#jqxBrandSearch”).jqxGrid(‘getcellvalue’, rowindex1, “DATE”);
document.close();
});
});
</script>
<div id=”jqxBrandSearch”></div>and this grid page is included in a main page where date picker is also specified in this way
<link rel=”stylesheet” href=”../../jqwidgets/styles/jqx.base.css” type=”text/css”/>
<script type=”text/javascript” src=”../../scripts/jquery-1.11.1.min.js”></script>
<script type=”text/javascript” src=”../../scripts/demos.js”></script>
<script type=”text/javascript” src=”../../jqwidgets/jqxcore.js”></script>
<script type=”text/javascript” src=”../../jqwidgets/jqxdatetimeinput.js”></script>
<script type=”text/javascript” src=”../../jqwidgets/jqxcalendar.js”></script>
<script type=”text/javascript” src=”../../jqwidgets/jqxtooltip.js”></script>
<script type=”text/javascript” src=”../../jqwidgets/globalization/globalize.js”></script>
<script type=”text/javascript”>
$(document).ready(function () {
$(“#jqxDateTimeInput”).jqxDateTimeInput({ min: new Date(2010, 0, 1), max: new Date(2014, 11, 31), width: ‘125px’, height: ’15px’});
});
</script>
<div id=’jqxDateTimeInput’></div>the date picker works when its used without grid.
but when grid page is included the date picker dosenot works.October 15, 2014 at 7:32 am in reply to: Loading data into grid from database Loading data into grid from database #61145Using url im calling a jsp file and setting the response in that file
In the console im getting this
[{“mno”:”100000″,”menu_name”:”General”,”func”:””},{“mno”:”100100″,”menu_name”:”Queries”,”func”:”n”},{“mno”:”100101″,”menu_name”:”Available”,”func”:”n”}]Im setting response using following lines of code
out.println(cellarray);
response.setContentType(“application/json”);
response.getWriter().write(cellarray.toString()); //cellarray is a json arraybut i could not load the grid data by this method.
If i put the console data in txt file and load it directly it works.
I think that the problem is of sending data.October 11, 2014 at 6:54 am in reply to: Loading data into grid from database Loading data into grid from database #60974OK Nadezhda,
I worked on that by calling a jsp file using url,the result is shown in console but im not able to get response. It shows “syntax error unexpected token <” . Can Someone help.October 10, 2014 at 5:00 am in reply to: Loading data into grid from database Loading data into grid from database #60921Thanks Nadezhda
I’m using mysql with jsp in struts2 framework can u help me with it.Thank Nadezhda
-
AuthorPosts