rvenky20001 Posted July 28, 2012 Posted July 28, 2012 I Could not find a uniLookupComboBox. There is only a unidbLookupComboBox. Can a UniLookpCombobox be included ? Venkatesh Quote
Administrators Farshad Mohajeri Posted July 30, 2012 Administrators Posted July 30, 2012 What functionality a UniLookpCombobox would offer? Quote
rvenky20001 Posted July 30, 2012 Author 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. Quote
Administrators Farshad Mohajeri Posted July 30, 2012 Administrators Posted July 30, 2012 OK. You can do the same with DBLookupCombo. Just leave the DataSource and DataField blank. Quote
rvenky20001 Posted July 30, 2012 Author 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 Quote
Administrators Farshad Mohajeri Posted July 31, 2012 Administrators Posted July 31, 2012 Show me how you call the ajaxRequest. BTW, why do you use an ajaxRequest to pick ComboBox value? Quote
rvenky20001 Posted July 31, 2012 Author 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.