?
Solved

RadDatePicker Cast

Posted on 2010-11-23
3
Medium Priority
?
1,033 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 2000 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

741 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