Visual Studio 2008 does not add control to designer file when adding it into a Telerik RadGrid EditFormTemplate
Question
I am using a RadGrid to display data gathered from various xml files. I have defined an EditFormTemplate where additional data can be seen/edited. Now whenever I add controls into this template, the designer doesn't add the necessary control to the designer.cs codebehind file. Why?
Edit: Most specifically, I have a asp:DropDownList that I want to initialize with a preselected value. I've tried doing this in the PageLoad of the CodeBehind, and even in a separate EventHandler that I bound to onInit and onLoad of the control. Both of these get called, but the control "doesn't seem to exist" for the codebehind.
I used FindControl, and cast the result to a DropDownList object, but this seems to return null.
Solution 2
Preselecting a value for a DropDownList is done like this:
<asp:DropDownList SelectedValue='<%# Bind("codeBehindVariable") %>' runat="server" ID="id" />
I just wonder why I missed this property of asp:dropdownlist when i was looking for a solution.
OTHER TIPS
Is this a web site (created with File->New Web Site) or a Web Application Project (created with File->New Project)? In a web site, there is nothing added to the partial class file. It's all built by magic at runtime.
Does the grid not display when you open the page in a browser?