<telerik:GridTemplateColumn
UniqueName="TemplateColumnDateDebutEmploi"
HeaderText="Date de d‚but de l'emploi"
DataField="DATE_DEBUT_EMPLOI">
<ItemTemplate>
<asp:Label ID="LbDATE_DEBUT_EMPLOI" runat="server" Text='<%#Eval("DATE_DEBUT_EMPLOI") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadDatePicker ID="DPicker_DATE_DEBUT_EMPLOI" selecteddate='<%#Eval("DATE_DEBUT_EMPLOI") %>' Runat="server">
<Calendar ID="Calendar_DATE_DEBUT_EMPLOI" UseColumnHeadersAsSelectors="False" runat="server" UseRowHeadersAsSelectors="False" ViewSelectorText="x"></Calendar>
</telerik:RadDatePicker>
</EditItemTemplate>
</telerik:GridTemplateColumn>
My problem is when I click on add new record for my detailTableView, I get the errror
"not a valid cast" (rapid traduction french to english by myself)
on the line
<
telerik:RadDatePicker ID="DPicker_DATE_DEBUT_EMPLOI" selecteddate='<%#Eval("DATE_DEBUT_EMPLOI") %>' Runat="server">
What can I do to have the value of my field in that control when I edit but not having an erreur when I try to create a new record in my detailtableview
Thanks again in advance!
(I LOOOOVVVEEEE this forum!)
| -- ============================================= |
| -- Author: Chase |
| -- Create date: 11/10/2008 |
| -- Update date: 11/10/2008 |
| -- Description: Get Admin Data |
| -- ============================================= |
| ALTER PROCEDURE dbo.bt_BizBoth_AdminAdChart |
| AS |
| SET NOCOUNT ON |
| SET ANSI_NULLS ON |
| /* SET NOCOUNT ON */ |
| Select |
| (Select Count([ID]) |
| As TotalBizForSale |
| From bt_BizForSale |
| ) AS TotalForSale, |
| (Select Count([ID]) |
| As TotalBizWanted |
| From bt_BizWanted |
| ) As TotalWanted |
| Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load |
| Dim BizBothDC As New DAL.BizBothDataContext |
| Dim results = BizBothDC.bt_BizBoth_AdminAdChart |
| RadChart1.DataBind() |
| End Sub |
| href="javascript:void(0);" onclick="$find('{0}').close(); window.location.href = 'default.aspx';"> |
| ScriptManager.RegisterStartupScript(Me, Me.GetType(), "alert", "<script type='text/javascript'>Sys.Application.add_load(function(){radalert('Message');})</script>", False) |


Dim ddlMyUniqueName As GridDropDownColumn = CType(theRadGrid.FindControl("MyUniqueName"), GridDropDownColumn)
gives the error that type Control cannot be converted to GridDropDownColumn.
I have had no problems dynamically setting the DataSourceId for a RadGrid in a Page_Load event. Why can't I do it for the DataSourceId on a GridDropDownColumn so I can use different sources on different pages for the same RadGrid control in a *.ascx control? What is the correct way to do this?
Also where is the best discussion (most clear yet also complete) that explains how to find and manipulate controls dynamically using the FindControl method? Is it consistent for all Telerik controls throughout the hierarchy of controls? Or does it vary depending on context in control lifecycle event?