jQWidgets Forums
Forum Replies Created
-
Author
-
Hello,
I’m wondering if something like a Pivot Grid was on the development plans? I was looking for a way to build a grid similar to the following, using JQWidgets:
Damian.
March 25, 2014 at 2:02 am in reply to: On page load, auto load data based on pre-selected item from DropDownList On page load, auto load data based on pre-selected item from DropDownList #51783Hello,
Thank you for the reply. I did think I had tried this, but obviously something wasn’t right. I’ll re-try based on your example, and see how I go.
Damian.
March 24, 2014 at 9:21 am in reply to: On page load, auto load data based on pre-selected item from DropDownList On page load, auto load data based on pre-selected item from DropDownList #51710Hello,
Thank you for your reply. I did try using the bindingCOmplete before posting my question here, but I’m new to this stuff and I’m not yet smart enough to figure out what I need to do! I’ve spent some time just now trying again but am still unsure what I need to do. Would you be so kind as to provide some sample code to point me in the right direction?
Apologies, and thank you.
Damian.
March 23, 2014 at 10:56 pm in reply to: On page load, auto load data based on pre-selected item from DropDownList On page load, auto load data based on pre-selected item from DropDownList #51671Apologies, I just realised I posed this under “ListBox” rather than “DropDownList”.
March 23, 2014 at 10:48 pm in reply to: On page load, auto load data based on pre-selected item from DropDownList On page load, auto load data based on pre-selected item from DropDownList #51670Here is some code based on a demo:
$(document).ready(function () {
// prepare the data
var progInstSource =
{
datatype: “json”,
datafields: [
{ name: ‘programInstID’, type: ‘int’},
{ name: ‘programInstDate’, type: ‘date’, cellsformat: ‘F’}
],
url: “bodyProgInstData.php”,
async: false
};var programDataAdapter = new $.jqx.dataAdapter(progInstSource);
// create a DropDownList
// The displayMember specifies that the list item’s text will be the Employee’s Name.
// The valueMember specifies that the list item’s value will be the Employee’s ID.
$(“#jqxListBox”).jqxDropDownList(
{
width: 350,
height: 25,
source: programDataAdapter,
promptText: ‘Select a Program:’,
selectedIndex: -1,
displayMember: ‘programInstDate’,
valueMember: ‘programInstID’
});$(“#jqxListBox”).bind(‘select’, function(event)
{
var programInstID = event.args.item.value;
var warmUpSource =
{
datatype: “json”,
datafields: [
{ name: ‘warmUpNo’, type: ‘int’},
{ name: ‘warmUpSet’, type: ‘int’},
{ name: ‘warmUpRep’, type: ‘int’},
{ name: ‘warmUpWeight’, type: ‘int’},
{ name: ‘warmUpActivity’, type: ‘string’}
],
type: ‘POST’,
data: {programInstID:programInstID},
url: “bodyProgWarmUpData.php”,
};var dataAdapter = new $.jqx.dataAdapter(warmUpSource);
$(“#warmUpGrid”).jqxGrid({
source: dataAdapter,
width: ‘100%’,
autoheight: true,
editable: true,
columns:
[
{datafield: “warmUpNo”, text: “#”, width: ’10px’},
{datafield: “warmUpSet”, text: “Sets”, width: ’50px’},
{datafield: “warmUpRep”, text: “Reps”, width: ’50px’},
{datafield: “warmUpWeight”, text: “Weight”, width: ’80px’},
{datafield: “warmUpActivity”, text: “Activity”, width: ‘395px’}
]
});
});
});</script>
</head><body>
<div style=”margin-bottom: 20px;” id=”jqxListBox”></div>
<div id=”warmUpGrid”></div>
</body>March 1, 2014 at 12:56 am in reply to: Select chart via radio button Select chart via radio button #50329Hello Dimitar,
Thank you very much! That seems perfect. I’m comparing the original sample code to what you’ve pasted in your reply so I can understand how they differ and how they work. I’m doing my best to learn, and I appreciate your help.
Thank you again,
Damian. -
AuthorPosts