Solved

RadDatePicker Cast

Posted on 2010-11-23
3
1,030 Views
Last Modified: 2012-05-10
What type should a RadDatePicker be cast? I used the following code -

TextBox txtID = (TextBox)Grid1.Rows[e.RowIndex].FindControl("txtID");
DropDownList ddlRec = (DropDownList)Grid1.Rows[e.RowIndex].FindControl("ddlRec");
DropDownList ddlDate = (DropDownList)Grid1.Rows[e.RowIndex].FindControl("RadDate");

I got the following casting error for the third line -
Unable to cast object of type 'Telerik.Web.UI.RadDatePicker' to type 'System.Web.UI.WebControls.DropDownList'.

I appreciste any of your help.
0
Comment
Question by:minglelinch
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
gemailj earned 500 total points
ID: 34196632
use this code instead of the last line
Telerik.Web.UI.RadDatePicker ddlDate = (Telerik.Web.UI.RadDatePicker)Grid1.Rows[e.RowIndex].FindControl("RadDate");

Open in new window

0
 
LVL 1

Author Comment

by:minglelinch
ID: 34197340
Thank you. It works.
0
 
LVL 5

Expert Comment

by:gemailj
ID: 34332703
could you please close this question if this helps you?
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question