I have use a filter template for one column that uses several controls. I thought the right way to get values out of a custom filter template would be to derive from GridBoundColumn and override the methods SetCurrentFilterValueToControl and GetCurrentFilterValueFromControl. Unfortunately when setting a filter with the UI and initiate a postback with the JavaScript function tableView.filter the first thing that gets called is SetCurrentFilterValueToControl. I expected a Get call but not a Set one. In the set method I set the filter controls to values that are saved in the session. This way I lose the settings made by the user. After having lost the user's filter wish the ItemCommand of RadGrid fires and after that the GetCurrentFilterValueFromControl of the column.
I tried to find out what the right way is by removing the filter template and watch the event calling order with RadGrids default text filter. When filtering now the first method called is also SetCurrentFilterValueToControl. But when looking at the CurrentFilterValue property of the column I could see that some magic already set it to the correct value. This has happened without a call to GetCurrentFilterValueFromControl.
My understanding was to override GetCurrentFilterValueFromControl to read values of the controls inside a custom filter template and to override SetCurrentFilterValueToControl to set values of the controls. What is the right way to interact between CurrentFilterValue and a custom filter template?
I tried to find out what the right way is by removing the filter template and watch the event calling order with RadGrids default text filter. When filtering now the first method called is also SetCurrentFilterValueToControl. But when looking at the CurrentFilterValue property of the column I could see that some magic already set it to the correct value. This has happened without a call to GetCurrentFilterValueFromControl.
My understanding was to override GetCurrentFilterValueFromControl to read values of the controls inside a custom filter template and to override SetCurrentFilterValueToControl to set values of the controls. What is the right way to interact between CurrentFilterValue and a custom filter template?