Changing Dialog Templates - class not working

3 posts, 1 answers
  1. GlenB
    GlenB avatar
    37 posts
    Member since:
    Apr 2010

    Posted 30 Jun 2010 Link to this post

    I am trying to convert my declarative RadConfirm template over to a class and have followed the steps outlined here (twice):
    but it's not working.

    When putting the code into the page_load event I get an error on this line:
    Me.RadWindowManager1.ConfirmTemplate = New ConfirmTemplate(Me.Page)
    The error is:
    Error   5   Type 'ConfirmTemplate' is not defined. 

    My class file is (ascx):
    <%@ Control Language="VB" ClassName="ConfirmTemplate" %> 
    <div class="rw_Confirm_Wrapper"
        <div class="rw_ConfirmText"
        <div class="rw_ConfirmButtonsWrapper"
            <div class="rw_ConfirmButtons" style="float: left;" onclick="$find('{0}').close(false);"
            <div class="rw_ConfirmButtons" style="float: right;" onclick="$find('{0}').close(true);"

    and (ascx.vb):
    Class ConfirmTemplate 
        Implements ITemplate 
        Private _page As Page 
        Public Sub New(ByVal page As Page) 
            Me._page = page 
        End Sub 
        Sub InstantiateIn(ByVal owner As Control) Implements ITemplate.InstantiateIn 
            Dim ctrl As Control = _page.LoadControl("ConfirmTemplate.ascx") 
        End Sub 
    End Class 

    I have followed the example exactly also (using c#) with an AlertTemplate and got the same error.

    I would welcome any assistance with this - thanks.

  2. Answer
    Georgi Tunev
    Georgi Tunev avatar
    7207 posts

    Posted 01 Jul 2010 Link to this post

    Hi GlenB,

    Please find attached a small sample that implements the approach described in the help article.

    Georgi Tunev
    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
  3. GlenB
    GlenB avatar
    37 posts
    Member since:
    Apr 2010

    Posted 02 Jul 2010 Link to this post

    That's great, thanks. 

    I was putting my Class ConfirmTemplate section in the wrong file.
Back to Top