Page 1 of 1

set JQGrid Sopt on runtime

PostPosted: 10 Jun 2019 13:26
by feland
Hi,

How can I choose a different sopt (not gsoEqual) on form create? Now the grid load always the first operator set on the list
[gsoEqual, gsoLess, gsoGreat, gsoGreatEqual, gsoLessEqual]




Thanks
Feland

Re: set JQGrid Sopt on runtime

PostPosted: 11 Jun 2019 09:19
by Alexander Bulei
Hi feland,
Use the Col.SearchOptions.SearchOperators with any order...the first element is selected by default.

Best Regards.

Re: set JQGrid Sopt on runtime

PostPosted: 11 Jun 2019 14:53
by feland
Hi Alexander,
to set the property Sopt I used the following command
Code: Select all
        gridFatturePass.JQGridColumns.ItemsByName[sColName].SearchOptions.SOpt := [gsoEqual, gsoNotEqual]


The value
[gsoEqual, gsoNotEqual]
is similar to a string variable but I can't set it as string.
Example: gridFatturePass.JQGridColumns.ItemsByName[sColName].SearchOptions.SOpt := '[gsoEqual, gsoNotEqual]'


Is it possible to convert the string into type
jqgrid.tiwcgjqgridColSearchOptions.tiwcgjqGridSearchOpts?


Or how can I set this property with an element? (string, array)

Thanks,
feland

Re: set JQGrid Sopt on runtime

PostPosted: 20 Nov 2019 14:36
by feland
Hi Alexander,
Hi feland,
Use the Col.SearchOptions.SearchOperators with any order...the first element is selected by default.


It seems that not works. I set as first operator csoContains but the default value is csoEqual.
Code: Select all
col.SearchOptions.SOpt := [gsoContains, gsoNotEqual, gsoEqual];


Why?

Thanks,
Feland

Re: set JQGrid Sopt on runtime

PostPosted: 27 Nov 2019 10:34
by Alexander Bulei
Hi feland,
When you set the SOpt?

You must set it on create...

BR