rvenky20001 Posted July 28, 2012 Share Posted July 28, 2012 I Could not find a uniLookupComboBox. There is only a unidbLookupComboBox. Can a UniLookpCombobox be included ? Venkatesh Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 30, 2012 Administrators Share Posted July 30, 2012 What functionality a UniLookpCombobox would offer? Link to comment Share on other sites More sharing options...
rvenky20001 Posted July 30, 2012 Author Share Posted July 30, 2012 The normal UniDBlookupCombobox has two tables connected to it. One from where it looks up the details while the other to which it save the data. The UniLookupCombobox will have only the look up table attached to it while the other table will not be there. This is normally used for selection critera etc like for reports. You need to look up the customer database to select the customer for whom the report has to be generated but the selection does not have to be save to any database. Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 30, 2012 Administrators Share Posted July 30, 2012 OK. You can do the same with DBLookupCombo. Just leave the DataSource and DataField blank. Link to comment Share on other sites More sharing options...
rvenky20001 Posted July 30, 2012 Author Share Posted July 30, 2012 When I have multiple fields in the listfield propery in the LookupCombobox, in the Normal Desktop mode, I am able to pickup the value selected by accessing the keyvalue property. But in webmode , both the fields with a hiphen is picked up when I use the getValue() function. How can I get only the keyvalue in the Webmode when I am calling a ajaxRequest with the current value as one of the parameters in the Onblur event ? Venkatesh Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 31, 2012 Administrators Share Posted July 31, 2012 Show me how you call the ajaxRequest. BTW, why do you use an ajaxRequest to pick ComboBox value? Link to comment Share on other sites More sharing options...
rvenky20001 Posted July 31, 2012 Author Share Posted July 31, 2012 The lookupcombo is the key field. On exit of the field, I normally check the database if the key field exists In case it exists then the data is available for editing else a new record is appended so that the user can add the new record. Client event function OnBlur(sender) { ajaxRequest(sender,'checkuserid',['muserid='+Fmusermas.muserid.getValue()]); } The Ajax Event procedure TFmusermas.museridAjaxEvent(Sender: TComponent; EventName: string; Params: TStrings); var muserid:string ; ps:integer; begin if EventName = 'checkuserid' then begin muserid:= Params.Values['muserid']; ps:= pos('-',muserid); if ps > 0 then muserid := trim(copy(muserid,1,ps-1)); CheckUserID(muserid); end; end; Currently I have resolved the issue by checking for the '-' and extracting the key field. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now