Code Project

Link Unit

Monday, July 26, 2010

Filtering By ListTextField for GridDropDownColumn

We were using Radgrid for displaying/Editing information and to filter rows we were using filter mechanism as given by RadGrid. The issue faced was that we were unable to filter the rows on the GridDropDownColumn , so we tried to follow the suggestion as given at telerik site http://www.telerik.com/help/aspnet-ajax/grdfilteringbylisttextfieldforgriddropdowncolumn.html

We tried the suggestion #1 , everything was fine for display purpose. But as soon as we try to edit or Add a new row we were able to view both Hidden GridBoundColumn and GridDropdownColumn , and the value of both were getting passed to the objectdatasource we had for DML operations.

Now to solve the problem we used "readonly=true" for GridBoundColumn and it simply disappeared from edit form.
Explaination
In case editable column types (column types that implement the IGridEditableColumn interface) have a ReadOnly property that determines whether the column editor is visible in the edit form. When ReadOnly is True, the column editor does not appear in the edit form. ReadOnly does not affect whether the column is visible in browser mode.

I hope it helps
Post a Comment