ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: arquehi on April 15, 2015, 11:28:23 am

Title: different cells has different editor
Post by: arquehi on April 15, 2015, 11:28:23 am
hello param,
  i have a problem that want to different cells has different editor.

 my grid have kind of editor in the rows, or not in the columns. my grid have ten rows and 5 columns.
     my grid demand to select editor in the first three lines, but the editor options is different. And demand to text editor in the five lines, the last two lines with datepicker . so what can i do

so what can i do?
thanks
Title: Re: different cells has different editor
Post by: paramvir on April 16, 2015, 09:33:02 am
Different editors in different cells within the same column is a rare scenario

however you could use callback variant of the editor to create a custom editor (textbox, select or any other ) based upon ui.rowIndx inside the callback.

column.editor.type = function(ui){
  //implement different editors based upon ui.rowIndx
}

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