jQWidgets Forums

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 27 total)
  • Author
    Posts

  • williamtourinho
    Participant

    Ok, thank you.


    williamtourinho
    Participant

    Ok, thankt you.


    williamtourinho
    Participant

    Formated code bellow:

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <link rel="stylesheet" href="http://www.jqwidgets.com/jquery-widgets-demo/jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="http://www.jqwidgets.com/jquery-widgets-demo/scripts/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="http://www.jqwidgets.com/jquery-widgets-demo/jqwidgets/globalization/jquery.global.js"></script>
    <script type="text/javascript" src="http://www.jqwidgets.com/jquery-widgets-demo/jqwidgets/jqx-all.js"></script>
    <script type="text/javascript" src="http://www.jqwidgets.com/jquery-widgets-demo/jqwidgets/globalization/jquery.global.js"></script>
    <script type="text/javascript" src="http://www.jqwidgets.com/jquery-widgets-demo/scripts/gettheme.js"></script>
    <script type="text/javascript" src="generatedata.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    var theme = getDemoTheme();
    // prepare the data
    var data = new Array();
    var firstNames = ["Nancy", "Andrew", "Janet", "Margaret", "Steven", "Michael", "Robert", "Laura", "Anne"];
    var lastNames = ["Davolio", "Fuller", "Leverling", "Peacock", "Buchanan", "Suyama", "King", "Callahan", "Dodsworth"];
    var titles = ["Sales Representative", "Vice President, Sales", "Sales Representative", "Sales Representative", "Sales Manager", "Sales Representative", "Sales Representative", "Inside Sales Coordinator", "Sales Representative"];
    var titleofcourtesy = ["Ms.", "Dr.", "Ms.", "Mrs.", "Mr.", "Mr.", "Mr.", "Ms.", "Ms."];
    var birthdate = ["08-Dec-48", "19-Feb-52", "30-Aug-63", "19-Sep-37", "04-Mar-55", "02-Jul-63", "29-May-60", "09-Jan-58", "27-Jan-66"];
    var hiredate = ["01-May-92", "14-Aug-92", "01-Apr-92", "03-May-93", "17-Oct-93", "17-Oct-93", "02-Jan-94", "05-Mar-94", "15-Nov-94"];
    var address = ["507 - 20th Ave. E. Apt. 2A", "908 W. Capital Way", "722 Moss Bay Blvd.", "4110 Old Redmond Rd.", "14 Garrett Hill", "Coventry House", "Miner Rd.", "Edgeham Hollow", "Winchester Way", "4726 - 11th Ave. N.E.", "7 Houndstooth Rd."];
    var city = ["Seattle", "Tacoma", "Kirkland", "Redmond", "London", "London", "London", "Seattle", "London"];
    var postalcode = ["98122", "98401", "98033", "98052", "SW1 8JR", "EC2 7JR", "RG1 9SP", "98105", "WG2 7LT"];
    var country = ["USA", "USA", "USA", "USA", "UK", "UK", "UK", "USA", "UK"];
    var homephone = ["(206) 555-9857", "(206) 555-9482", "(206) 555-3412", "(206) 555-8122", "(71) 555-4848", "(71) 555-7773", "(71) 555-5598", "(206) 555-1189", "(71) 555-4444"];
    var notes = ["Education includes a BA in psychology from Colorado State University in 1970. She also completed 'The Art of the Cold Call.' Nancy is a member of Toastmasters International.",
    "Andrew received his BTS commercial in 1974 and a Ph.D. in international marketing from the University of Dallas in 1981. He is fluent in French and Italian and reads German. He joined the company as a sales representative, was promoted to sales manager in January 1992 and to vice president of sales in March 1993. Andrew is a member of the Sales Management Roundtable, the Seattle Chamber of Commerce, and the Pacific Rim Importers Association.",
    "Janet has a BS degree in chemistry from Boston College (1984). She has also completed a certificate program in food retailing management. Janet was hired as a sales associate in 1991 and promoted to sales representative in February 1992.",
    "Margaret holds a BA in English literature from Concordia College (1958) and an MA from the American Institute of Culinary Arts (1966). She was assigned to the London office temporarily from July through November 1992.",
    "Steven Buchanan graduated from St. Andrews University, Scotland, with a BSC degree in 1976. Upon joining the company as a sales representative in 1992, he spent 6 months in an orientation program at the Seattle office and then returned to his permanent post in London. He was promoted to sales manager in March 1993. Mr. Buchanan has completed the courses 'Successful Telemarketing' and 'International Sales Management.' He is fluent in French.",
    "Michael is a graduate of Sussex University (MA, economics, 1983) and the University of California at Los Angeles (MBA, marketing, 1986). He has also taken the courses 'Multi-Cultural Selling' and 'Time Management for the Sales Professional.' He is fluent in Japanese and can read and write French, Portuguese, and Spanish.",
    "Robert King served in the Peace Corps and traveled extensively before completing his degree in English at the University of Michigan in 1992, the year he joined the company. After completing a course entitled 'Selling in Europe,' he was transferred to the London office in March 1993.",
    "Laura received a BA in psychology from the University of Washington. She has also completed a course in business French. She reads and writes French.",
    "Anne has a BA degree in English from St. Lawrence College. She is fluent in French and German."];
    var k = 0;
    for (var i = 0; i < firstNames.length; i++) {
    var row = {};
    row["firstname"] = firstNames[k];
    row["lastname"] = lastNames[k];
    row["title"] = titles[k];
    row["titleofcourtesy"] = titleofcourtesy[k];
    row["birthdate"] = birthdate[k];
    row["hiredate"] = hiredate[k];
    row["address"] = address[k];
    row["city"] = city[k];
    row["postalcode"] = postalcode[k];
    row["country"] = country[k];
    row["homephone"] = homephone[k];
    row["notes"] = notes[k];
    data[i] = row;
    k++;
    }
    var source =
    {
    localdata: data,
    datatype: "array"
    };
    var initrowdetails = function (index, parentElement, gridElement, datarecord) {
    var tabsdiv = null;
    var information = null;
    var notes = null;
    tabsdiv = $($(parentElement).children()[0]);
    if (tabsdiv != null) {
    information = tabsdiv.find('.information');
    notes = tabsdiv.find('.notes');
    var title = tabsdiv.find('.title');
    title.text(datarecord.firstname);
    var container = $('<div style="margin: 5px;"></div>')
    container.appendTo($(information));
    var photocolumn = $('<div style="float: left; width: 15%;"></div>');
    var leftcolumn = $('<div style="float: left; width: 45%;"></div>');
    var rightcolumn = $('<div style="float: left; width: 40%;"></div>');
    container.append(photocolumn);
    container.append(leftcolumn);
    container.append(rightcolumn);
    var photo = $("<div class='jqx-rc-all' style='margin: 10px;'><b>Photo:</b></div>");
    var image = $("<div style='margin-top: 10px;'></div>");
    var imgurl = '../../images/' + datarecord.firstname.toLowerCase() + '.png';
    var img = $('<img height="60" src="' + imgurl + '"/>');
    image.append(img);
    image.appendTo(photo);
    photocolumn.append(photo);
    var firstname = "<div style='margin: 10px;'><b>First Name:</b> " + datarecord.firstname + "</div>";
    var lastname = "<div style='margin: 10px;'><b>Last Name:</b> " + datarecord.lastname + "</div>";
    var title = "<div style='margin: 10px;'><b>Title:</b> " + datarecord.title + "</div>";
    var address = "<div style='margin: 10px;'><b>Address:</b> " + datarecord.address + "</div>";
    $(leftcolumn).append(firstname);
    $(leftcolumn).append(lastname);
    $(leftcolumn).append(title);
    $(leftcolumn).append(address);
    var postalcode = "<div style='margin: 10px;'><b>Postal Code:</b> " + datarecord.postalcode + "</div>";
    var city = "<div style='margin: 10px;'><b>City:</b> " + datarecord.city + "</div>";
    var phone = "<div style='margin: 10px;'><b>Phone:</b> " + datarecord.homephone + "</div>";
    var hiredate = "<div style='margin: 10px;'><b>Hire Date:</b> " + datarecord.hiredate + "</div>";
    $(rightcolumn).append(postalcode);
    $(rightcolumn).append(city);
    $(rightcolumn).append(phone);
    $(rightcolumn).append(hiredate);
    var notescontainer = $('<div style="white-space: normal; margin: 5px;"><span>' + datarecord.notes + '</span></div>');
    $(notes).append(notescontainer);
    $(tabsdiv).jqxTabs({ width: 600, height: 170, theme: theme });
    }
    }
    var dataAdapter = new $.jqx.dataAdapter(source);
    $("#jqxgrid").jqxGrid(
    {
    width: 670,
    height: 450,
    source: dataAdapter,
    theme: theme,
    rowdetails: true,
    rowdetailstemplate: { rowdetails: "<div style='margin: 10px;'><ul style='margin-left: 30px;'><li class='title'></li><li>Notes</li></ul><div class='information'></div><div class='notes'></div></div>", rowdetailsheight: 200 },
    initrowdetails: initrowdetails,
    columns: [
    { text: 'First Name', datafield: 'firstname', width: 100 },
    { text: 'Last Name', datafield: 'lastname', width: 100 },
    { text: 'Title', datafield: 'title', width: 180 },
    { text: 'City', datafield: 'city', width: 200 },
    { text: 'Country', datafield: 'country' }
    ]
    });
    });
    </script>
    </head>
    <body class='default'>
    <div id='jqxWidget' style="font-size: 13px; font-family: Verdana; float: left;">
    <div id="jqxgrid"></div>
    </div>
    </body>
    </html>
    in reply to: Memory leak issue Memory leak issue #15399

    williamtourinho
    Participant

    Hi, using the ‘destroy’ method all text and checked items in the filterrow will disapear and takes more time to destroy the grid and creating it again than only changing the source. No other way to release the memory?
    Thank you!


    williamtourinho
    Participant

    Hi Peter,
    I am using the method scrollofset(0,0) but the the recordstartindex and recordendindex continues with the same value. I mean, the scroll bar is moving to the top but the recordstartindex and recordendidex values are not changing.
    Thank you!


    williamtourinho
    Participant

    Hi, the total rows is updating, but the scrollbar still not adapting. The scroll bar does not adapt to the total rows of the grid. How can I change that?


    williamtourinho
    Participant

    Hi, is there is a way to change te vertical scrollbar position to the top and with that change the “recordstartindex” and “recordendindex”? I had try the “jqxScroll(‘setPosition, 0’)” method but the “recordstartindex” and “recordendindex” are not changing there value.

    in reply to: Export 2 grids in same time? Export 2 grids in same time? #14741

    williamtourinho
    Participant

    Thanks for the speed!
    This means that it’s impossible to export 2 grids at same time?


    williamtourinho
    Participant

    I have found the soluction. In the next render the id of the element changes.

    in reply to: Scrolling is very slow Scrolling is very slow #13940

    williamtourinho
    Participant

    Hi,
    I can get the filter information with the getfilterinformation method but with the filterrow checkedlist it is possible to now what items are checked?
    Best Regards.

    in reply to: Scrolling is very slow Scrolling is very slow #13873

    williamtourinho
    Participant

    I’m not using the virtual mode (in my case virtual scrolling) because with “filterow: true” when the user applies a filter the filter wont be applied to all the records. I’m correct?
    My grid have also an aggreate function to calculate the total of the cell’s value.
    How can I use the virtual mode and don’t have problems with the filter’s?

    in reply to: Scrolling is very slow Scrolling is very slow #13868

    williamtourinho
    Participant

    Hi here is an example with the behavior. Thank you.

    $(document).ready(function () {
    var theme = getTheme();
    var data = generatedata(50);
    var source =
    {
    localdata: data,
    datatype: “array”
    };
    var dataAdapter = new $.jqx.dataAdapter(source);

    $(“#jqxgrid”).jqxGrid(
    {
    width: 1250,
    height: 600,
    source: dataAdapter,
    showfilterrow: true,
    filterable: true,
    editable: true,
    selectionmode: ‘none’,
    theme: theme,
    columns: [
    { text: ‘Name’, columntype: ‘textbox’, filtertype: ‘textbox’, editable: false, filtercondition: ‘starts_with’, datafield: ‘name’, width: 70 },
    {
    text: ‘Product’, filtertype: ‘checkedlist’, editable: false, datafield: ‘productname’, width: 60
    },
    { text: ‘Name’, columntype: ‘textbox’, filtertype: ‘textbox’, editable: false, filtercondition: ‘starts_with’, datafield: ‘name’, width: 70 },
    {
    text: ‘Product’, filtertype: ‘checkedlist’, editable: false, datafield: ‘productname’, width: 60
    },
    { text: ‘Name’, columntype: ‘textbox’, filtertype: ‘textbox’, editable: false, filtercondition: ‘starts_with’, datafield: ‘name’, width: 70 },
    {
    text: ‘Product’, filtertype: ‘checkedlist’, editable: false, datafield: ‘productname’
    },
    { text: ‘Name’, columntype: ‘textbox’, filtertype: ‘textbox’, editable: false, filtercondition: ‘starts_with’, datafield: ‘name’, width: 70 },
    {
    text: ‘Product’, filtertype: ‘checkedlist’, editable: false, datafield: ‘productname’, width: 70
    },
    { text: ‘Name’, columntype: ‘textbox’, filtertype: ‘textbox’, editable: false, filtercondition: ‘starts_with’, datafield: ‘name’, width: 70 },
    {
    text: ‘Product’, filtertype: ‘checkedlist’, editable: false, datafield: ‘productname’, width: 70
    },
    { text: ‘Name’, columntype: ‘textbox’, filtertype: ‘textbox’, editable: false, filtercondition: ‘starts_with’, datafield: ‘name’, width: 70 },
    {
    text: ‘Product’, filtertype: ‘checkedlist’, editable: false, datafield: ‘productname’, width: 70
    },
    { text: ‘Name’, columntype: ‘textbox’, filtertype: ‘textbox’, editable: false, filtercondition: ‘starts_with’, datafield: ‘name’, width: 70 },
    {
    text: ‘Product’, filtertype: ‘checkedlist’, editable: false, datafield: ‘productname’, width: 70
    },
    { text: ‘Name’, columntype: ‘textbox’, filtertype: ‘textbox’, editable: false, filtercondition: ‘starts_with’, datafield: ‘name’, width: 70 },
    {
    text: ‘Product’, filtertype: ‘checkedlist’, editable: false, datafield: ‘productname’, width: 70
    },
    { text: ‘Name’, columntype: ‘textbox’, filtertype: ‘textbox’, editable: false, filtercondition: ‘starts_with’, datafield: ‘name’, width: 70 },
    {
    text: ‘Product’, filtertype: ‘checkedlist’, editable: false, datafield: ‘productname’, width: 70
    }
    ]
    });
    });


    williamtourinho
    Participant

    Thank you!


    williamtourinho
    Participant

    With the ‘setcellvalue’ I was able to do what I needed. Thank you.


    williamtourinho
    Participant

    Thank you Peter!

Viewing 15 posts - 1 through 15 (of 27 total)