Thread Rating:
  • 298 Vote(s) - 2.83 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RecordGridのフィルター機能について
04-17-2014, 03:05 PM,
#1
RecordGridのフィルター機能について
こんにちは。

Recordgrid上でフィルタをかけた場合

フィルタを取り除く方法はありますでしょうか?

現在は右クリックをして「フィルタを取り除く」を選択していますが

何かボタンを押下時に「フィルタを取り除く」機能があればいいなと思い質問します!

04-17-2014, 03:21 PM,
#2
RE: RecordGridのフィルター機能について
下記の感じで「set test_grid.filter ={RecordData.default}」をすれば
フィルターを外すことが出来ました。

フィルタの制御を各ボタンでするにはどうすればいいでしょうか?
Code:
{let test_set:RecordSet=
    {RecordSet
        {RecordFields
            {RecordField "A"}
            ,{RecordField "B"}
        }
        ,{RecordData A = "1" , B = "100"}
        ,{RecordData A = "2" , B = "200"}
        ,{RecordData A = "3" , B = "300"}
        ,{RecordData A = "4" , B = "400"}
        ,{RecordData A = "5" , B = "500"}
        ,{RecordData A = "6" , B = "600"}
        ,{RecordData A = "7" , B = "700"}
        ,{RecordData A = "8" , B = "800"}
        ,{RecordData A = "9" , B = "900"}
    }
}

{let test_grid:RecordGrid=
    {RecordGrid
         record-source = test_set
        ,width  = {make-elastic minimum-size = 200 }
        ,height = {make-elastic minimum-size = 150 }
        ,{RecordGridColumn "A" ,width=80}
        ,{RecordGridColumn "B" ,width=80}
    }
}

{let btn:CommandButton=
    {CommandButton
        label="取り除く"
        ,{on Action do
             ||フィルタを取り除く
             set test_grid.filter ={RecordData.default}
         }
    }
}

{value
    {VBox
        test_grid
        ,btn
    }
}
04-17-2014, 03:35 PM,
#3
RE: RecordGridのフィルター機能について
set test_grid.filter ={RecordData A = "3"}
カラム名=フィールド名を指定して
フィルターを掛けたい値やらをいれれば出来るのですね。。。


Code:
{let test_set:RecordSet=
    {RecordSet
        {RecordFields
            {RecordField "A"}
            ,{RecordField "B"}
        }
        ,{RecordData A = "1" , B = "100"}
        ,{RecordData A = "2" , B = "200"}
        ,{RecordData A = "3" , B = "300"}
        ,{RecordData A = "4" , B = "400"}
        ,{RecordData A = "5" , B = "500"}
        ,{RecordData A = "6" , B = "600"}
        ,{RecordData A = "7" , B = "700"}
        ,{RecordData A = "8" , B = "800"}
        ,{RecordData A = "9" , B = "900"}
    }
}

{let test_grid:RecordGrid=
    {RecordGrid
         record-source = test_set
        ,width  = {make-elastic minimum-size = 200 }
        ,height = {make-elastic minimum-size = 150 }
        ,{RecordGridColumn "A" ,width=80}
        ,{RecordGridColumn "B" ,width=80}
    }
}


{let remove-filter:CommandButton=
    {CommandButton
        label="取り除く"
        ,{on Action do
             ||フィルタを取り除く
             set test_grid.filter ={RecordData.default}
         }
    }
}

{let set-filter:CommandButton=
    {CommandButton
        label="フィルタ"
        ,{on Action do
             ||フィルタを設定
             set test_grid.filter ={RecordData A = "3"}
         }
    }
}

{value
    {VBox
        test_grid
        ,{HBox
             set-filter
            ,remove-filter
         }
    }
}

Forum Jump:


Users browsing this thread:
2 Guest(s)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: 'mybb_threadviews' (errno: 2)
Query:
INSERT INTO mybb_threadviews (tid) VALUES('1070')