tony

Forum Replies Created

Viewing 15 replies - 481 through 495 (of 7,981 total)
  • Author
    Replies
  • in reply to: JQGrid textarea column with Rich Text editing #102169
    tony
    Keymaster

    Hello,

     

    Your problem is here:

    editoptions:{custom_element:function( value , options) {
    var elm = $(‘‘);
    elm.val( value );
    // give the editor time to initialize
    setTimeout( function() {
    tinymce.init({selector: “textarea#CommentsRestrictions”});
    }, 100);

     

    Please look all my code carfully.

    Change this to

    editoptions:{custom_element:function( value , options) {
    var elm = $(‘‘);
    elm.val( value );
    // give the editor time to initialize
    setTimeout( function() {
    tinymce.init({selector: “textarea#” + options.id});
    }, 100);

     

    Regards

    in reply to: Dynamic Column #102162
    tony
    Keymaster

    Hello,

     

    Once created the colModel of the grid can not be changed after this.

     

    You can construct the columsn af the grid if you use ajax like this

     

    $.ajax({

    url : “yourjsonurl”,

    dataType: “json”,

    success : function(data, status, xhr) {

    // get the colmodel form the dat lsomething like this:

    var myColModel = data.colModel;

    ….

     

    $(“#grid”).jqGrid({

    ….

    colModel : myColModel,

    });

     

    Kind Regards

    in reply to: Search bug #102161
    tony
    Keymaster

    Hello,

     

    I do not think that this is a bug, as described in the title of the topic, but rather this is a expected behaviour.

    Which search module is used – toolbar search or dialog search.

    If you use toolbar search you can disable searchonEnter and do the desired behaviour.

    For form search this instead is not available.

     

    Please look at the options in toolbar searching in the docs here.

     

    Regards

    in reply to: Loading jqGrid data only when search is entered #102160
    tony
    Keymaster

    Hello,

     

    You already have the answer in another post.

     

    Regards

    in reply to: Load Grid only on Demand #102159
    tony
    Keymaster

    Hello,

     

    It depends which serch you use. See the events in the appropriate search module in the docs.

    You will find a event before serching and event after serching which is maybe your solution – i.e befre search set the data type to json and after search set it again to local.

     

    Regards

    in reply to: JQGrid textarea column with Rich Text editing #102158
    tony
    Keymaster

    Hello,

     

    I see where is the problem. – the id of editable cell is not the same as in form edit.

    Below is the modified code, which works for me:

     

    { “name”:”ShipAddress”,
      “index”:”ShipAddress”,
      “edittype”:”custom”,
      “editoptions”:{
          “custom_element”:function( value  }, options) {
            var elm = $(‘‘);
            elm.val( value );
            // give the editor time to initialize
            setTimeout( function() {
                tinymce.init({selector: “textarea#” + options.id});
            }, 100);
            return elm;
          },
          “custom_value”:function( element, oper, gridval) {

                var id = element[0].id;
                if(oper === ‘get’) {
                    return tinymce.get( id ).getContent({format: ‘row’});
                } else if( oper === ‘set’) {
                    if(tinymce.get( id )) {
                        tinymce.get( id ).setContent( gridval );
                    }
                }
          }

    Regards

    in reply to: JQGrid textarea column with Rich Text editing #102157
    tony
    Keymaster

    Hello,

    Did you have included the tinymce javascrip files. I’m going to test this.

     

    Regards

    in reply to: UI Dialog and search:true #102156
    tony
    Keymaster

    Hello,

     

    In which browser is this? Is this available in all popular browsers – IE, FF, Chrome?

    Can you please not use modal option and see if this happen.

    You can experiment with z-index – es.

     

    Regards

    in reply to: jQGrid keyboard navigation on grid with subgrids #102155
    tony
    Keymaster

    Hello,

     

    Thanks for the investigation.

    You are right – we should made  checking in order to have movement only in the current grid (and not in the subgrid or row that  is custom created in grid)

     

    I will see if I can fix this for the next release – if so I will let you know.

     

    Kind Regards

    Tony

    in reply to: JQGrid textarea column with Rich Text editing #102148
    tony
    Keymaster

    Hello,

     

    We have successfully use tinymce with custom element and custom value function.

     

    Here is a fragment which work fine in form edit. Just try it in inline edit:

     

    { “name”:”ShipAddress”,
      “index”:”ShipAddress”,
      “edittype”:”custom”,
      “editoptions”:{
          “custom_element”:function( value  }, options) {
            var elm = $(‘‘);
            elm.val( value );
            // give the editor time to initialize
            setTimeout( function() {
                tinymce.init({selector: “textarea#ShipAddress”});
            }, 100);
            return elm;
          },
          “custom_value”:function( element, oper, gridval) {
                if(oper === ‘get’) {
                    return tinymce.get(‘ShipAddress’).getContent({format: ‘row’});
                } else if( oper === ‘set’) {
                    if(tinymce.get(‘ShipAddress’)) {
                        tinymce.get(‘ShipAddress’).setContent( gridval );
                    }
                }
          }

     

    Try it and let me know if this work in inline edit.

     

    Regards

         

    in reply to: UI Dialog and search:true #102147
    tony
    Keymaster

    Hello,

     

    I’m not sure that I understand the problem.

     

    Regards

    in reply to: query builder for jqgrid #102146
    tony
    Keymaster

    Hello,

     

    I’m not sure that this is practical. When you search on different table then they will have different column names whch will cause that data not to be filed.

    Just to note that you can use the jqFilter on a diffrent form (not modal only) and in this different form you can add your tables,  but you will need to write additional logic to post the table name when search.

     

    Kind Regards

    in reply to: Handling pagination event for JQGrid Pivot #102145
    tony
    Keymaster

    Hello,

     

    Unfortunately no. The pivot gets all the data – convert it to the appropriate way and put it on the grid at once.

     

    Regards

    in reply to: Virtual Scrolling issue due to uneven row heights #102144
    tony
    Keymaster

    Hello,

     

    Thank you for the investigation and the code posted.

    I do not think that this fix is fine, since in a relative big data set (rows) this will slow the processes too much.

     

    Kind Regards

    in reply to: jqGrid Edit Popup #102143
    tony
    Keymaster

    Hello,

     

    You may find the answer here

     

    Regards

Viewing 15 replies - 481 through 495 (of 7,981 total)

Stay connected with us in your favorite flavor!