Click here to Skip to main content
16,013,322 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have a radGridView with filter for each column .
Now my problem is at the time of binding the gridview i want to add a value to the specified column and the gridview has to be displayed by filtering based on the value given.

XML
List<SpGetAllExamTypes_Result> lstExamTypes = objMdlClass.GetAllExamTypes(null).FindAll(F=>F.ExamName == ExamName);
foreach (SpGetAllExamTypes_Result objExam in lstExamTypes)
{
    ExamId = objExam.ExamTypeId;
}
List<SpGetConsolidatedExamReport_Result> lstexamMarks = objManage.GetExamAnalysisReport(
    Convert.ToInt32(CourseId), ExamId,
    ddlMasterAcademicYear.SelectedValue).FindAll(F=>F.SubjectId==Convert.ToInt32(SubjectId));

gvAnalysisView.DataSource = lstexamMarks;
gvAnalysisView.DataBind();



this my code
here i am finding in the list based on subjectId but i do not want to find in the list i want to add the subjectId to the filter and the gridview have to be filtered.
can anyone help me?
Posted
Updated 31-Dec-14 23:08pm
v2

1 solution

Have a look at the demo Grid - Basic Filtering[^].
Quote:
The example demonstrates the filtering capabilities of Telerik RadGrid. Filtering can be enabled/disabled using RadGrid.AllowFilteringByColumn or GridTableView.AllowFilteringByColumn properties. Then each column that supports filtering (GridBoundColumn, GridCheckBoxColumn, etc) shows a filter box beneath the corresponding header.
User can set a filter expression based on the rules specified in the corresponding column properties: FilterFormatString, CurrentFilterFunction, CurrentFilterValue . After pressing the filter button (next to the filter box) the grid displays only the records matching the filter criteria (regarding the settings of all filter boxes).
 
Share this answer
 
Comments
Member 11099119 1-Jan-15 5:33am    
i have a value with me i want to pass that value into the filter dynamically?
Then set the CurrentFilterValue from code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900