Jump to content

alesf76

uniGUI Subscriber
  • Posts

    38
  • Joined

  • Last visited

Posts posted by alesf76

  1. I tried to find an answer in the forum, but I wasn't lucky.

    The question is simple: how can I change the color of a single button ? I don't see a "Color" or similar property like on standard delphi buttons.

    Thanks in advance

  2. On 1/20/2016 at 6:19 PM, mhmda said:

    Hi,

     

    As default behavior of dbgrid is performing sorting in server side, but sometimes you fetch all data into grid (no paging) and the data is already in client, so why return to server to sort data !!

     

    Do the sort in client side:

     

    1. Disable remoteSort (store):

     

    s1.png

     

     

     

    2. Set 'click' event on column header and do sorting:

     

    s2.png

     

     

    Hope this will help you :-)

     

    It works, but it doesn't handle toggling between ascending/descending. How can it be done ?

  3. I've mapped on a checkbox unidbgrid column an integer field with 0/1 values, that could also have a null value to be evaluted as a unchecked.

    How can I configure it ? Actually I get a "can't convert (null) to Olestr" when the row is posted.

  4. I've tried to find something in the forum and in the documentation, but I didn't found the answer: how can I make work the sorting of the columns ? If I click on one sortable column I get the grid refreshed but the sorting is not applied.

  5. Hi,

     

    Then try:

    function reconfigure(sender, store, columns, oldStore, the, eOpts) {
        var grid = sender;
        for (var i = 0; i < columns.length; i++) {
            if (columns[i].getEditor()) {
                columns[i].getEditor().on('specialkey', function(field, e) {
                    if (e.getKey() == 13) {
                        var store = grid.getStore();
                        var selModel = grid.getSelectionModel();
                        var selectedRecord = selModel.getLastSelected();
                        var recordIndex = store.indexOf(selectedRecord);
                        var nextRecord = store.getAt(recordIndex + 1);
                        if (nextRecord) {
                            selModel.select(nextRecord);
                        }
                    }
                })
            }
        }
    }

    Best regards.

     

     

    Where this javascript have to be put ?

  6. I was not able to found an example for a very common case like this:

    - DataSet1 is an invoice list with a CUSTOMER_ID field

    - DataSet2 is the curstomer list with an ID field and a DESCRIPTION field

     

    I would like to have a dbgrid to edit DataSet1, where the CUSTOMER_ID column is displayed with the DESCRIPTION field looked up from dataset2, and the editor is a dblookupcombobox  showing the descriptions from DataSet2 but saving the ID in the CUSTOMER_ID field.

     

    Could anyone point me to the right direction ?

×
×
  • Create New...