Jump to content

andyhill

uniGUI Subscriber
  • Posts

    1257
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by andyhill

  1. HtmlLib from delphihtmlcomponents.com
  2. I build my PDF files at runtime, firstly as HTML Files, then finally converting to PDF so I believe it would be relatively easy to CONCATINATE multiple HTML files before conversion into one PDF.
  3. TUniPDFFrame UrlStr:= 'images/invoice/'+UniMainModule.PdfFileName; DateTimeToString(s, 'yyyymmddhhmmss', Now()); PdfFrame.PdfURL:= UrlStr+'?'+s+'#toolbar=0'; PdfFrame.PdfURL:= UrlStr+'?'+s+'&pagemode=none'; // (none, thumbs, bookmarks, attachments)
  4. '#toolbar=0' No longer works, also tried '&pagemode=none'. C:\Program Files (x86)\FMSoft\Framework\uniGUI\uni-1.95.0.1577\pdf.js\web\viewer.js has "disablePageMode" set to 'false' in two locations, I changed this to 'true' but it made no difference ? Please provide a way to NOT SHOW THUMBNAILS OF FIRST SHOWING
  5. PDFViewer On First Show Has ThumbNails shown I do not want to show ThumbNails on the PDFViewer's First Showing How do I set PDFViewer not to be toggled into ThumbNail View on First Showing ?
  6. TUniPDFFrame First Show: ThumbNails Visible - How To Hide ThumbNails before First Showing ?
  7. Using Grid.Ext.Events 'validateedit' 'validateedit' Event checks to see if the CurrCol is using a ComboBox editor, if so the Event processes the ComboBox's before and after values A Logic decision is made in code, if required then automatically populating other Grid Cells (on the same row) with new data relating to the new ComboBox value ComboBox Editing is closed <------- this is what your 'reconfigure' Event does now Grid moves on to next cell ALL THIS WORKS USING THE 'reconfigure' Event you gave me earlier. As A Teaching Lesson My additional question was why can't I just use the code below inside the Grid's 'validateedit' Event:- UniSession.AddJS('Ext.defer(function(){'+GridJSName+'.editingPlugin.completeEdit()}, 10);'); instead of relying on the ComboBox's 'reconfigure' Event to close the editor ? Is it a timing issue ?
  8. As I said before, the reconfigure above works great. I asked why can't I do this inside the Grid's "validateedit' Event instead ? UniSession.AddJS('Ext.defer(function(){'+MyJSName+'.editingPlugin.completeEdit()}, 10);');
  9. Can we do this UniSession.AddJS('Ext.defer(function(){'+MyJSName+'.editingPlugin.completeEdit()}, 10);');
  10. Fantastic - Thank You Sherzod. Is it possible to do this in the Grid's 'validateevent' after verifying it was the CombBox that triggered the 'validateedit' Event:- MyJSName:= MainForm.grdWorkSheet.JSName; UniSession.AddJS('Ext.defer(function(){'+MyJSName+'.editingPlugin.completeEdit()}, 10);'); I tried this but it had no effect ?
  11. Sherzod, please show me how to change focus in grid (setting CurrCol is ignored).
  12. Editor closes and remains focused - no amount of code can shift focus to next cell (thus painting new values) - Trying all sorts of tricks - not working grdWorkSheet.Columns[2].Editor.Perform(CM_DialogKey, VK_TAB, 0); After Field values adjusted in code I need to move focus to next column.
  13. I have a need where the user can select from a grid's editor combobox an item of interest and then using the 'validateedit' event I fetch and populate the other specific row cell data relating to the selection = live update of SellPrice. The reason why it is not a DBComboBox is the fact that the user is also allowed to type in an item manually even if it does not exist in the combobox list. So if it exists, then SellPrice etc. is automatically updated in the grid, if not exist then user can type in the SellPrice manually. My code works to a point, but fails to advance to the next cell forcing a repaint, only by mouse clicking the next cell (or TAB Key) does the SellPrice display - our focus is stuck within the editors combobox no matter what we do in code - please advise. procedure TMainForm.grdWorkSheetAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); ... col:= grdWorkSheet.CurrCol; // 1=Quantity, 2=Description, 3=SellPrice if col = 2 then begin UniMainModule.PreItemDescription:= Trim(Params.Values['old']); UniMainModule.PostItemDescription:= Trim(Params.Values['new']); if ( (UpperCase(UniMainModule.PreItemDescription) <> UpperCase(UniMainModule.PostItemDescription)) and (UniMainModule.PostItemDescription <> '') ) then begin if UniMainModule.tblLkUpItems.Locate('Description', VarArrayOf([Trim(UniMainModule.PostItemDescription)]), [loCaseInsensitive]) = True then begin grdWorkSheet.Columns[2].Field.AsString:= UniMainModule.PostItemDescription; grdWorkSheet.Columns[3].Field.AsFloat:= UniMainModule.tblLkUpItems.FieldByName('SellPrice').AsFloat; grdWorkSheet.Columns[4].Field.AsString:= UniMainModule.tblLkUpItems.FieldByName('BASType').AsString; grdWorkSheet.CurrCol:= grdWorkSheet.CurrCol + 1; grdWorkSheet.Repaint; ValidateBusyFlag:= False; ...
  14. Not quite what I am after. This is my JS code to read the Old Data and the Newly Typed Data OR the Newly Selected Combo Data. MyScript:= 'validateedit=function validateedit(editor, context, eOpts) '#10+ '{'#10+ ' n = context.value; '+ ' o = context.record.data[context.field]; '+ ' ajaxRequest(MainForm.grdWorkSheet, ''_ValidateEdit_'', ["new="+n, "old="+o]); '+ '} '; grdWorkSheet.ClientEvents.ExtEvents.Add(MyScript); In my grdWorkSheet _ValidateEdit_ event how can I replace the focused row's store data with the newly typed data and any other computed changes that I may have generated (a lot of logic has taken place inside the _ValidateEdit_ event, now I want the store's data to reflect my approved changes for that row).
  15. I need to send back via ajax the focused row, focused colX ([1] or by field name) the cell value - please advise how - thanks. MyScript:= 'validateedit=function validateedit(editor, context, eOpts) '#10+ '{'#10+ ' txt = this.columnManager.columns[1].getEditor().getValue(); '#10+ ' ajaxRequest(MainForm.grdWorkSheet, ''_ValidateEdit_'', ["t="+txt]); '+ '} '; grdWorkSheet.ClientEvents.ExtEvents.Add(MyScript);
  16. YES, I only fell for that once. cbLookUpItems: TUniComboBox; ... ////////////////////////////////////////////////////////////////////////////// cbLookUpItems:= TUniComboBox.Create(HiddenPanel); cbLookUpItems.Name:= 'cbLookUpItems'; cbLookUpItems.OnAjaxEvent:= cbLookUpItemsAjaxEvent; // cbLookUpItems.BeginUpdate; cbLookUpItems.Items.Clear; cbLookUpItems.Items.Add(''); if UniMainModule.MyQuery1.Active then UniMainModule.MyQuery1.Close; UniMainModule.MyQuery1.SQL.Clear; UniMainModule.MyQuery1.Params.Clear; UniMainModule.MyQuery1.SQL.Add('SELECT Description '+ 'FROM Items '+ 'WHERE HideFromView <> TRUE '+ 'ORDER BY Description ;'); UniMainModule.MyQuery1.Open; while not UniMainModule.MyQuery1.Eof do begin cbLookUpItems.Items.Add(Trim(UniMainModule.MyQuery1.FieldByName('Description').AsString)); UniMainModule.MyQuery1.Next; end; UniMainModule.MyQuery1.Close; // 209 items added cbLookUpItems.EndUpdate; // cbLookUpItems.OnCloseUp:= cbLookUpItemsCloseUp; cbLookUpItems.OnChange:= cbLookUpItemsChange; cbLookUpItems.OnChangeValue:= cbLookUpItemsChangeValue; //cbLookUpItems.OnSelect:= cbLookUpItemsSelect; // cbLookUpItems.ClientEvents.ExtEvents.Clear; MyScript:= 'beforeselect=function beforeselect(combo, record, index, eOpts)'#13#10 + '{'#13#10 + ' ajaxRequest(MainForm.cbLookUpItems, '#39'_beforeSelect_'#39', []); '#13#10 + '} '; cbLookUpItems.ClientEvents.ExtEvents.Add(MyScript); // MyScript:= 'select=function select(combo, record, eOpts)'#13#10 + '{'#13#10 + ' ajaxRequest(MainForm.cbLookUpItems, '#39'_Select_'#39', ["r="+record]); '#13#10 + '} '; cbLookUpItems.ClientEvents.ExtEvents.Add(MyScript); ALL EVENTS SHOW TEXT '' ITEMINDEX 0
  17. IDE fine, runtime creation ISSUE (even though events all fire) so need to pass TEXT SELECTION back in Params below MyScript:= 'select=function select(combo, record, eOpts)'#13#10 + '{'#13#10 + ' ajaxRequest(MainForm.cbLookUpItems, '#39'_Select_'#39', ["r="+record]); '#13#10 + PLEASE SHOW HOW TO SET CHOSEN DATA IN PARAM '} '; cbLookUpItems.ClientEvents.ExtEvents.Add(MyScript);
  18. I want to return a param with the value of the selected text
  19. I am creating cbLookUpItems (as a grid editor) complete with data (showing when dropdown) and all events are firing. cbLookUpItems.OnChange:= cbLookUpItemsChange; (cbLookUpItems.Text always shows '' in events) cbLookUpItems.OnSelect:= cbLookUpItemsSelect; (cbLookUpItems.ItemIndex always 0) So added my own event MyScript:= 'select=function select(combo, record, eOpts)'#13#10 + '{'#13#10 + ' ajaxRequest(MainForm.cbLookUpItems, '#39'_Select_'#39', ["r="+record]); '#13#10 + PLEASE SHOW HOW TO SET CHOSEN DATA IN PARAM '} '; cbLookUpItems.ClientEvents.ExtEvents.Add(MyScript); SAME cbLookUpItems.Text always shows '' in events cbLookUpItems.ItemIndex always 0 Even added defer between change and select. Please advise - thanks
×
×
  • Create New...