jQWidgets Forums
Forum Replies Created
-
Author
-
May 10, 2016 at 10:26 am in reply to: Listbox not getting displayed Listbox not getting displayed #84231
Hi Peter ,
The jqwidgets folder is placed in the root dierctotry so the path is correct , then what will be the problem here.
apologies for such a silly problem but seriously dont know wheres the problem is exactly.
Thanks.
May 10, 2016 at 10:04 am in reply to: Listbox not getting displayed Listbox not getting displayed #84227Hi Peter , i have mentioned the scripts files as well. I am using all those scripts files that are mentioned in the tutorial for listbox. i dont think so that i have missed out any javascrip file. Pleas help.
May 10, 2016 at 10:01 am in reply to: Uncaught TypeError: Cannot read property 'dataAdapter' of undefined Uncaught TypeError: Cannot read property 'dataAdapter' of undefined #84226Hi Nadzhda ,
i am also getting the same error. I am using the latest version of the jqxwidgets , the scripts paths are referred correctly but still facing the same error. can you please help.
Regards,
NishchalMay 10, 2016 at 6:13 am in reply to: Add Data to Listbox from DB with ID and VALUES Add Data to Listbox from DB with ID and VALUES #84211Hi Peter , Thanks for a quick response.
I am using all the javascript files mention in the listbox tutorial.Below are the javascripts files that are on my page :
<link href=”~/jqwidgets/styles/jqx.base.css” rel=”stylesheet” />
<link href=”~/Content/bootstrap.min.css” rel=”stylesheet” />
<link href=”~/Content/toastr.css” rel=”stylesheet” /><link rel=”stylesheet” href=”//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css”>
<script src=”//code.jquery.com/jquery-1.10.2.js”></script>
<script src=”~/Scripts/toastr.js”></script>
<script src=”~/Scripts/jquery.validate.min.js”></script>
<script src=”~/Scripts/jquery.validate.unobtrusive.min.js”></script>
<script src=”~/jqwidgets/jqxcore.js”></script>
<script src=”~/jqwidgets/jqxdata.js”></script>
<script src=”~/jqwidgets/jqxbuttons.js”></script>
<script src=”~/jqwidgets/jqxscrollbar.js”></script>
<script src=”~/jqwidgets/jqxlistbox.js”></script>Please let me know if i am still missing any.
May 10, 2016 at 5:01 am in reply to: Add Data to Listbox from DB with ID and VALUES Add Data to Listbox from DB with ID and VALUES #84207Hi , i am trying to bind json data to my list box but getting error. Below is my code :
var channelGrpTypeKey = $(‘#ddlChannelGroupType’).val();
var url = “/MappingChannelGroup/GetChannelsByGrpTypeKeyAndGrpNameKey”;var source =
{
datatype: “json”,
datafields: [
{ name: ‘ChannelName’ },
{ name: ‘ChannelKey’ }
],
ChannelGrpTypeKey: channelGrpTypeKey,
srcFuncAreaKey: funcareakey,
url: url
};
var dataAdapter = new $.jqx.dataAdapter(source);$(“#listBoxA”).jqxListBox({ source: dataAdapter, displayMember: “ChannelName”, valueMember: “ChannelKey”, width: 200, height: 250 });
I am getting error on binding the source to the dataAdaptor , the error says – Uncaught TypeError: Cannot read property ‘dataAdapter’ of undefined
Although it is not hitting my action method. I dont know where i am doing wrong. And sorry as i was not getting the right place to post a new question.October 26, 2015 at 7:48 am in reply to: Populate date in dropdownlist in dd/mm/yyyy format Populate date in dropdownlist in dd/mm/yyyy format #77306Hi Vladimir,
Thanks for all your help. The problem is solved now. I called the Function “beforeLoadComplete” in the dataAdapter after binding the modulesource and it starts working.
This is how i did :
var rmodulesAdapter = new $.jqx.dataAdapter(rmodulesSource, {
autoBind: true,beforeLoadComplete: function (records) {
for (var i = 0; i < records.length; i++) {
records[i].date = (“0” + records[i].START_DATE.getDate()).slice(-2) + ‘/’ + (“0” + (records[i].START_DATE.getMonth() + 1)).slice(-2) + ‘/’ + records[i].START_DATE.getFullYear();
}
}
});Thank you so much.
October 21, 2015 at 6:55 am in reply to: Populate date in dropdownlist in dd/mm/yyyy format Populate date in dropdownlist in dd/mm/yyyy format #77167Hi Vladimir ,
Thanks for your response. Below is the json sample data :
[
{
DP_CHANNEL_KEY: 1951,
CHANNEL_GROUP_KEY: 2883,
SC_KEY: 143,
SLOT_START_KEY: 1,
SLOT_END_KEY: 14,
START_DATE: “/Date(1442592557000)/”,
END_DATE: null,
ACTIVE: “Y”,
SOURCE: “CUST_SALES”
},
{
DP_CHANNEL_KEY: 1952,
CHANNEL_GROUP_KEY: 2884,
SC_KEY: 143,
SLOT_START_KEY: 1,
SLOT_END_KEY: 14,
START_DATE: “/Date(1442592557000)/”,
END_DATE: null,
ACTIVE: “Y”,
SOURCE: “CUST_SALES”
},
{
DP_CHANNEL_KEY: 1953,
CHANNEL_GROUP_KEY: 2908,
SC_KEY: 143,
SLOT_START_KEY: 1,
SLOT_END_KEY: 14,
START_DATE: “/Date(1442592557000)/”,
END_DATE: null,
ACTIVE: “Y”,
SOURCE: “CUST_SALES”
}I simply want to display the date in dd/MM/yyyy format in the jqxdropdownlist thats it.
Thanks.
October 20, 2015 at 11:31 am in reply to: Populate date in dropdownlist in dd/mm/yyyy format Populate date in dropdownlist in dd/mm/yyyy format #77140Hi Vladimir,
Sorry for using the wrong word “Order” , what i was trying to say is , i used your code but still i am getting the dates in same format i.e “Fri Sep 18 2015 21:39::17 GMT+0530 (India Standard Time)”. please find the my below code for more clarification :
$.get(‘/XREFCustDPChannel/GetAllStartDates’, “”, function (data) {
modules = data;
var source =
{
localdata: modules,
datatype: “json”,
datafields: [
{ name: ‘START_DATE’, type: ‘date’, format: ‘ddd MMM dd yyyy hh:mm:ss’ } // START_DATE IS MY COLUMN NAME IN THE DATABASE
],
beforeLoadComplete: function (records) {
for (var i = 0; i < records.length; i++) {
records[i].date = records[i].START_DATE.getDate() + ‘/’ + (records[i].START_DATE.getMonth() + 1) + ‘/’ + records[i].START_DATE.getFullYear();
}
}
};
var dataAdapter = new $.jqx.dataAdapter(source);// Create a jqxDropDownList
$(“#startDate”).jqxDropDownList({ promptText: ‘Please Select Start Date’,
selectedIndex: -1, source: dataAdapter, displayMember: “date”, valueMember: “START_DATE”, width: 200, height: 25
});Thanks.
October 20, 2015 at 6:33 am in reply to: Populate date in dropdownlist in dd/mm/yyyy format Populate date in dropdownlist in dd/mm/yyyy format #77105Hi Vladimir ,
Thanks for the quick response. i tried by doing the same thing but getting the dates in the same order. Don’t know where i am doing wrong , please find the jquery code that i did in the same way you gave me :
$.get(‘/XREFCustDPChannel/GetAllStartDates’, “”, function (data) {
modules = data;
var source =
{
localdata: modules,
datatype: “json”,
datafields: [
{ name: ‘START_DATE’, type: ‘date’, format: ‘ddd MMM dd yyyy hh:mm:ss’ } // START_DATE IS MY COLUMN NAME IN THE DATABASE
],
beforeLoadComplete: function (records) {
for (var i = 0; i < records.length; i++) {
records[i].date = records[i].START_DATE.getDate() + ‘/’ + (records[i].START_DATE.getMonth() + 1) + ‘/’ + records[i].START_DATE.getFullYear();
}
}
};
var dataAdapter = new $.jqx.dataAdapter(source);// Create a jqxDropDownList
$(“#startDate”).jqxDropDownList({ promptText: ‘Please Select Start Date’,
selectedIndex: -1, source: dataAdapter, displayMember: “date”, valueMember: “START_DATE”, width: 200, height: 25
});below is the cs file code from where i am fetching the records from the oracle sql database , the column is of date type :
public static List<XREF_CUST_DP_CHANNEL_RDM> GetAllDPChannels()
{
CustEntities dc = new CustEntities();
List<XREF_CUST_DP_CHANNEL_RDM> obj = dc.XREF_CUST_DP_CHANNEL_RDM.Where(m => m.SOURCE == “CUST_SALES”).ToList();
return obj;
}Thanks for all your help in advance.
NISHCHAL.
-
AuthorPosts