dcsimg
Page 1 of 4 123 ... LastLast
Results 1 to 15 of 51

Thread: Tornado-Need two ways Update records

  1. #1
    Join Date
    Dec 2002
    Location
    Albany, NY
    Posts
    115

    Tornado-Need two ways Update records

    Is it possible, using Tornado, to update records in two ways?
    1. by using dbEditGridUpdate=true.
    2. by using the standard update.

    Currently, when dbEditGridUpdate=true the update button automatically presents the full screen edit mode. what I need are two buttons, one for full screen edit, another for single record edit. Ideally, the update button on every row should enable single record update and the update button (stand alone) should call the full screen.

    How do I accomplish this?

  2. #2
    Join Date
    Oct 2002
    Posts
    933
    Make two custom buttons one for grid and one for single Edit. When one of them is clicked, detected that in the URL via Request.Querystring. Modify the properties (disable or enable gridedit property).


    Frank

  3. #3
    Join Date
    Dec 2002
    Location
    Albany, NY
    Posts
    115
    Frank,

    Thanks for the direction on this. The custom button has been programmed, however how do I position the new button within the other navigation button set. In other words, I need to place the custom button next to the Update Button, it seems to default to the first position....

  4. #4
    Join Date
    Oct 2002
    Posts
    933
    I'll look into the positioning of the custom buttons an dalso the row edit approach.

    The rwoedit and gridedit mix is complicated. I think allowing a button insert next to the update button is easier.



    Frank

  5. #5
    Join Date
    Dec 2002
    Location
    Albany, NY
    Posts
    115
    Frank,

    I'm unsure how to proceed using the request.querystring function. What string do I test for if the update button is pressed and the custom button as well?

  6. #6
    Join Date
    Oct 2002
    Posts
    933
    As for custom buttons, you can put anyting like MyBut=Grid or MyBut=Single. Inspectt he querystring and you can extract them using resquest.querystring("MyBut")

    But let me look at using an insert tag next to the update button. Itis a lot easier


    Frank

  7. #7
    Join Date
    Oct 2002
    Posts
    933
    I got a good solution w/o any code penalty on my part. I'll allow a new "gridupdate" or "gridadd" button in addition to the regular ones. once that is clicked, the gridedit switch will be set to true. No need to specify dbEditGridUpdate = true. So when yo specify ni=b5,update,gridupdate... both will appear. I'll wait for my web programmer to make the new buttons and then do the final test.

    Looks like this one is a pretty cool feature.. hope it works out.

    Frank

  8. #8
    Join Date
    Oct 2002
    Posts
    933
    Looks like it is working. Email me when you are ready to test that.

    Frank

  9. #9
    Join Date
    Dec 2002
    Location
    Albany, NY
    Posts
    115
    Frank,

    Your solution sounds excellent and it is a very nice addition to an already excellent product.

    Paul

  10. #10
    Join Date
    Dec 2002
    Location
    Albany, NY
    Posts
    115
    Frank,

    My agencys email is currently down so I'll post my findings here. The new dll does work. It included the gridupdate button which called the full screen edit mode. The normal update button is as usual, single record update. This is good.

    I did note a problem, the update and gridupdate modes did not allow dropdowns, calendars etc. but the add mode did.

    To take this to the final level, it would be nice if the data elements could be selected individually between the two edit modes.

    I'll wait to hear from you...

    Paul

  11. #11
    Join Date
    Oct 2002
    Posts
    933
    >>...the data elements could be selected individually between the two edit modes.

    explain more about this.

    I'll look into the dropdown problem.


    FK

  12. #12
    Join Date
    Oct 2002
    Posts
    933
    I use the following code and drodown works for both normal and grid update. Only "gridUpdate and Normal Update is implemented at this time. Explain more about the problem ->

    Dim Mydb As New tornado.z()
    With Mydb
    .dbQP = "U=1|M=Grid!sysindex=true|S=plain|D=Nwind|Q=Orders |TH=Tit=2 Update Styles| gdf=0,1,2,3| ni=b5,update,gridupdate| bm=Orders;0"
    .dbCommonTables = "index=First,FullName|sql=Select Firstname,Firstname & ' ' & Lastname from employees; index=EID|sql=Select Employeeid from employees"
    .dbEditUpdateFlds = "1,fi=2|ty=SB|val=EID|Tex=FullName"
    .ASPdbNET()
    End With

    FK

  13. #13
    Join Date
    Dec 2002
    Location
    Albany, NY
    Posts
    115
    Frank,

    I'm still working to get the dropdown fields working. Can you explain the following syntax:

    .dbEditUpdateFlds = "1,fi=2|ty=SB|val=EID|Tex=FullName"

    I can't find where the 1 in 1,fi=2 is documented.

    I'm sure I'll figure this out, however let me explain further my idea of user selected data elements based on gridupdate or update mode.

    It would be a nice Tornado feature for the programmer to be able to select independently which fields are to be in gridupdate vs. update. In my case I'd like to only allow certain fields to be updateable if the gridupdate mode is called. Likewise for the update mode.

    I see a new function called .dbGridUpdateFlds = fi=2|ty-SB|val=EID|tex=FullName
    and
    .dbEditUpdateFlds = fi=4|ty=textarea|val=memo|tag=col=20

    this would allow greater flexability in reducing the screens real estate during full screen edit mode (GridUpdate) as well.

    What do ya think?

  14. #14
    Join Date
    Oct 2002
    Posts
    933
    OH.. You mean you would like to have a different set of Update flds for normal and grid update !!

    Frank

  15. #15
    Join Date
    Dec 2002
    Location
    Albany, NY
    Posts
    115
    Yes!!!!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •