jQWidgets Forums
Forum Replies Created
-
Author
-
January 10, 2014 at 9:47 pm in reply to: ComboBox Question passing ID ComboBox Question passing ID #47727
Here is my working example but I would assume by your documentation that a property of data send to the server on the getting the source.
var Company = new Object();
Company.Company = ‘2429’;var source = {
datatype: “json”,
datafields: [
{ name: ‘ID’ },
{ name: ‘Contact’ }
],
url: “../JSON/ContactJSON.php?Company=”+Company,
async: false
};var dataAdapter = new $.jqx.dataAdapter(source);
// Create a jqxComboBox
$(“#jqxComboBox”).jqxComboBox({source: dataAdapter, displayMember: “Contact”, valueMember: “ID”, multiSelect: true, width: 350, height: 25, theme: theme });
$(“#jqxComboBox”).jqxComboBox(‘selectItem’, ‘United States’);
$(“#jqxComboBox”).jqxComboBox(‘selectItem’, ‘Germany’);
// trigger selection changes.
$(“#jqxComboBox”).on(‘change’, function (event) {
var items = $(“#jqxComboBox”).jqxComboBox(‘getSelectedItems’);
var selectedItems = “Selected Items: “;
$.each(items, function (index) {
selectedItems += this.label;
if (items.length – 1 != index) {
selectedItems += “, “;
}
});
$(“#selectionlog”).text(selectedItems);
});November 1, 2013 at 3:38 pm in reply to: how to iterate through filtersinfo how to iterate through filtersinfo #31791So if I wanted to pass the grid’s current filter object to a url, just like server side filtering would be this object?
example
var filtersinfo = $(jqxgrid).jqxGrid(‘getfilterinformation’);
var Button = $(“
“);
Button.find(‘span’).addClass(‘ui-icon ui-icon-print’);
Button.width(16);
Button.jqxTooltip({ content: ‘Print!’, position: ‘mouse’, name: ‘Tooltip’, theme: theme });
Button.appendTo(tableLeft);Button.click(function (event) {
var filtersinfo = $(jqxgrid).jqxGrid(‘getfilterinformation’);
$.ajax({
type: “POST”,
url: “Print.php”,
data: filtersinfo
}).done(function (msg) {
$(jqxgrid).jqxGrid(‘updatebounddata’);
});
});October 28, 2013 at 2:25 pm in reply to: New Error with jQWidgets v3.0.3 New Error with jQWidgets v3.0.3 #31459Thanks..
October 4, 2013 at 3:38 pm in reply to: Tree local data url data issue Tree local data url data issue #30250Ok here is my change async: false but there is still something wrong.
var source =
{
datatype: “json”,
datafields: [
{name: ‘ID’},
{name: ‘ParentID’},
{name: ‘Name’},
{name: ‘Description’}
],
id: ‘id’,
async: false,
url: ‘../exampleTree/TreeData.php’
};Is there any thing else that might be needed. Running example at http://www.digitalconceptdesigns.com/exampleTree/Tree.php
October 3, 2013 at 5:50 pm in reply to: Tree local data url data issue Tree local data url data issue #30185Here is a working example with view code ability.
October 3, 2013 at 5:21 pm in reply to: Tree local data url data issue Tree local data url data issue #30183So are you saying the results in this example are bad! The data or localdata in this example was copied from ‘../exampleTree/TreeData.php’ output and formatted. Nothing other than that. I can run this example with the localdata and it works. I just copied my example into the forum.
TreeData is the source of my local data just with line returns for readability. The content of the database is just a random data generator….
August 27, 2013 at 1:38 pm in reply to: issue with grid edit v3.0.1 and v3.0.2 issue with grid edit v3.0.1 and v3.0.2 #27799Should the edited column go behind pinned columns?
August 25, 2013 at 5:22 pm in reply to: Possible multiplecellsadvanced Issues with 3.0.1 Possible multiplecellsadvanced Issues with 3.0.1 #27636Is there a method to set focus on the grid->row->cell. When you make the update you know the rowid and the cell index. That would take care of my issue and be great, but i have not found a way to do that.
August 23, 2013 at 11:57 pm in reply to: Possible multiplecellsadvanced Issues with 3.0.1 Possible multiplecellsadvanced Issues with 3.0.1 #27600I have been using JQWidgets for a while now and currently one of my main app are around 120000 one of code. This has been in production over a year. The reason I refresh after updates is due to near 20 AfterCrudEvents or php mysql statements that have to run after a column is updated. I am using preparedstatements and updating one column of the grid at a time. The support columns or calculations are what is being performed by the AfterCrudEvents. The number of AfterCrudEvents as well as the Type depend on the column that is being updated. This is a commodity type industry which detects much of the design.
So for me to not be able to updatebounddata on an update is a KILLER…. I am not sure why you want me to limit the application and design to a simple update of the complete row each time to work with the grid widget.
How about giving us a custom update capability and let us tell the grid to commit based on what we see necessary. I see this as a bug, but maybe I am wrong.
August 21, 2013 at 2:00 pm in reply to: Possible multiplecellsadvanced Issues with 3.0.1 Possible multiplecellsadvanced Issues with 3.0.1 #27293I have to perform a $(jqxgrid).jqxGrid(‘updatebounddata’); after each update because of support columns. Example when the user enters a product number I perform AfterCrudEvents to lookup multiple support columns like Product Description, and Cost which are a part of the same screen same record which forces me to do a $(jqxgrid).jqxGrid(‘updatebounddata’). In all previous versions this method work fine. In the new version 3.0.1 the grid loses focus or something. I can still move the cursor from cell to cell or change rows but to edit again it forces me to click on the cell. This makes no sense.
August 16, 2013 at 5:00 pm in reply to: Grid selectionmode possible issue Grid selectionmode possible issue #27005Is there a way to end selection after a window.open?
$(jqxgrid).on(“celldoubleclick”, function (event) {
var column = event.args.column;
var rowindex = event.args.rowindex;
var columnindex = event.args.columnindex;if (column.text == “ID”) {
var ID = $(jqxgrid).jqxGrid(‘getcellvalue’, rowindex, “ID”);
window.open(“../Lookup/Lookup.php?ID=” + ID );
***********************
End Selection
************************}
});
August 15, 2013 at 6:41 pm in reply to: Grid source question passing prams Grid source question passing prams #26905Ok that works great…
data: {
ID: “12”
}But now I have to do a $(jqxgrid).jqxGrid(‘updatebounddata’); after an update and grid returns with no data found.
If I refresh the page the data is correct with updates as well.Does the updatebounddata not use the data object. If not how can pass the data object within the updatebounddata?
I Have tried the following but does not work.
$(jqxgrid).jqxGrid(‘updatebounddata’, data);
and
$(jqxgrid).jqxGrid(‘updatebounddata’ source.data);
Guess I thought you would address this with how jqWidgets uses cascading styles derived from the base document styles and or best practices for jqWidgets.
July 31, 2013 at 2:19 pm in reply to: Grid selectionmode possible issue Grid selectionmode possible issue #26014Ok, sense I double click on the parent window cell to open the child window the parent window does not receive the mouseup event. Is there a different selectionmode I should use, or a different way of opening the window I could try to prevent this. Or possibly is there a way to cancel this when the parent window gains focus again.
Sorry Forgot to include this class….
title = $title;
}function setPageWidth($pageWidth){
$this->pageWidth = $pageWidth;
}function DataColumns ( $conn, $meta )
{
$preparedStatement = $conn->prepare ( $meta );
if ( $preparedStatement->execute () ) {
$result = $preparedStatement->fetchAll ();
if ( $preparedStatement->rowCount () > 0 ) {
foreach ( $result as $key => $value ) {
$column = Array();
foreach ( $value as $key => $value ) {
$field = Array();
if ( !is_int ( $key ) ) {
array_push ( $field, $key, $value );
array_push ( $column, $field );
}}
array_push ( $this->header, $column );
}
}
}
}function Data ( $conn, $sql )
{
$preparedStatement = $conn->prepare ( $sql );
if ( $preparedStatement->execute () ) {
$result = $preparedStatement->fetchAll ();
if ( $preparedStatement->rowCount () > 0 ) {
foreach ( $result as $key => $value ) {
$row = Array();
foreach ( $value as $key => $value ) {
if ( !is_int ( $key ) ) {
array_push ( $row, $value );
}
}
array_push ( $this->data, $row );
}
}
}
}function DataTable ( )
{
// Color and font restoration
$this->SetFillColor ( 224, 235, 255 );
$this->SetTextColor ( 0 );
//$this->SetFont ( ” );$count = count ( $this->data );
$fill = false;
foreach ( $this->data as $row ) {
$columnCount=0;
foreach ( $row as $column ) {
$this->Cell ( ($this->header[ $columnCount ][ 2 ][ 1 ])+10, 5, $column, 1, 0, ‘L’, $fill );
$columnCount++;
}
$this->Ln ();
$fill = !$fill;
}
//$this->Cell ( array_sum ( $w ), 0, ”, ‘T’ );
}function Header()
{
$this->SetFont(”,’B’,10);
$this->Cell($this->pageWidth,10,$this->title,1,0,’C’);
$this->Ln(20);$this->SetFillColor ( 125, 175, 251 );
$this->SetTextColor ( 255 );
$this->SetDrawColor ( 128, 0, 0 );
$this->SetLineWidth ( .3 );
$this->SetFont(”,’B’,8);
// Header
$w = array( 20, 20, 20, 20 );
for ( $i = 0; $i header ); $i++ ) {
$this->Cell ( ($this->header[ $i ][ 2 ][ 1 ])+10, 6, $this->header[ $i ][ 0 ][ 1 ], 1, 0, ‘C’, true );
}
$this->Ln ();
}function Footer()
{
$this->SetY(-15);
$this->SetFont(‘Arial’,’I’,7);
$this->Cell(0,10,’Page ‘.$this->PageNo().’ of {nb}’,0,0,’C’);
}}
?>
-
AuthorPosts