misc Posted February 12, 2014 Share Posted February 12, 2014 Please allow to dynamically create grid editors at runtime and attach them to a dynamically populated uniGrid. See thread;: http://forums.unigui.com/index.php?/topic/3836-can-grid-editors-be-dynamically-assigned/ This is needed, when I dynamically create an sql statement at runtime, and thus cannot predefine the grid columns in design time. Example: if Columns[ix].Field.DataType in [ftDate, ftDateTime] then begin uniDate:= TUniDateTimePicker.Create(Application); with uniDate do begin DateFormat:= 'dd/MM/yyyy'; TimeFormat:= 'HH:mm:ss'; ParentColor:= False; Color:= clWhite; end; Columns[ix].Editor:= uniDate; //don't work, or like this: ? UniSession.AddJS(Format(JSName + '.columnManager.columns[%d].setEditor(' + uniDate.JSName + ');', [ix])) end; Link to comment Share on other sites More sharing options...
Recommended Posts