Announcement

Collapse
No announcement yet.

grid initial sort

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • grid initial sort

    Hello

    How I can set default search for grid. (like show only open cases, at the begnining)

  • #2
    Append a global variable to your sql like where mykey=[glob_status]

    Set in onscriptinit the key [glob_status]='open';

    I useually put some buttons on the form for showing only open, closed or pending cases. In the buttonevent you set [glob_status] to the required value.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      It's works, but it dont change when I use search form(this global varaible is still set).
      How I can remove those part of sql statement when it use search form?

      Or better how I can set initial values like it was choosed by search form.

      Comment


      • #4
        Originally posted by zlotyx View Post
        It's works, but it dont change when I use search form(this global varaible is still set).
        How I can remove those part of sql statement when it use search form?

        Or better how I can set initial values like it was choosed by search form.
        Hide the search button by scmacro and apply a button 'clear filter'. If hit then clear the where filter and show the search button. SInce you cannot intercept the search click event you have to be a bit creative ;-)
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development
        www.scriptcase.eu / www.scriptcase.nl

        Comment

        Working...
        X