This is a migrated thread and some comments may be shown as answers.

GridDropDownColumn how binding with datakeyvalues

1 Answer 39 Views
Grid
This is a migrated thread and some comments may be shown as answers.
shanker bangari
Top achievements
Rank 1
shanker bangari asked on 07 Apr 2010, 10:13 PM
Hi,

this is shanker ,I am doing one application .My requirement is GridDropDownColumn  binding and filter with datakeys values How to solve this problem am using this code .But it's not working .I am getting this error object reference.

thisn is my  code   

if (e.ColumnEditor is GridDropDownColumnEditor)
            {
               int? session_id = TeacherBysessiongrid.MasterTableView.DataKeyValues[e.Column.EditFormColumnIndex]["session_id"].ToString().GetInteger();
                int? facilty_id = LogonDetails.Instance.sys_lclvar_default_facility_id;
                (e.ColumnEditor as GridDropDownColumnEditor).DataSource = teacherattendancemanager.sch_view_teacher_absence_session_substitute_teacher_lookup(facilty_id, RadsessionAttendancedate.SelectedDate.Value);
            }

how to solve this problem

thanks and regards
shanker.B

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 08 Apr 2010, 04:28 PM
Hello shanker,

Programmatically binding the dropdown editor of the GridDropDownColumn is not a supported scenario, mainly because with no datasource assigned to the column itself, the column cannot bind its cells in view mode. Consider using a GridTemplateColumn instead.

Best wishes,
Veli
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
shanker bangari
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or