Set filter search in cgridview with multirelation table

i have multilevel relation , schoolprofile has a relation with schoolstage , and schoolstage has a relation with workingtime table , i show time_name from workingtime table in schoolprofile view correctly , but i don’t know how to set the filter search with multilevel relation ?