ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: jomeihua on February 13, 2014, 07:01:38 am

Title: grid cell image
Post by: jomeihua on February 13, 2014, 07:01:38 am

I have image and data in one cell.
        render: function(ui){
        var rowData = ui.rowData;
         return "<button type='button' class='search_btn'></button>"+rowData['division'];
   },
question1) I should see the image in edit mode
question2) Modify existing data, the image is not visible and cell data is readonly
Title: Re: grid cell image
Post by: paramvir on February 13, 2014, 09:31:37 am
If you want to view image while editing, use editor: { type: 'contenteditable' } or a custom rich text editor like TinyMCE. You would have to implement callback function in editor to integrate rich text editor.

API: http://paramquery.com/pro/api#option-column-editor

Example of image in contenteditable:

http://paramquery.com/pro/demos/grid_xml


2) You can hide the image from view either by using render callback or by not keeping <img> tag in the cellData.

3) Cell can be make readonly by use of API
http://paramquery.com/pro/api#option-column-editable