Just have a variable which denotes the column name to be searched upon and in the header click event set it to appropriate value and when searching use the variable to your advantage.