How to find InlineInsertTemplate controls in page load

7 posts, 0 answers
  1. Vishnu Vardhan Reddy
    Vishnu Vardhan Reddy avatar
    20 posts
    Member since:
    Oct 2011

    Posted 03 Nov 2011 Link to this post

    Hello,
    I am very new to Rad Controls and I am using Custom Edit Template.In my custom Edit Template i have one grid.I populated data from data base to that grid.Problem is, i have one Link button inside my grid , i placed in my Custom Edit Template.And also one label in My Custom Edit Template.In grid link button click Event, i want to find my label which one i placed in side my Custom Edit Template. I am unable to find that label control with in Link Button click which one i placed in grid.Otherwise can we find Inline Insert Template controls in Page load.hoping response will come asap

    Note:Grid and label i placed in InlineInsertTemplate.
  2. Jayesh Goyani
    Jayesh Goyani avatar
    2733 posts
    Member since:
    May 2010

    Posted 04 Nov 2011 Link to this post

    Hello,

    <telerik:GridTemplateColumn>
                           <ItemTemplate>
                               .....
                           </ItemTemplate>
                           <EditItemTemplate>
                               <asp:Label ID="Label1" runat="server"></asp:Label>
                     <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" />          
                           </EditItemTemplate>
                       </telerik:GridTemplateColumn>

    void Button1_Click(object sender, EventArgs e)
        {
            Button Button1 = sender as Button;
            GridEditableItem item = Button1.NamingContainer as GridEditableItem;
            Label Label1 = item.FindControl("Label1") as Label;
            Label1.Text = DateTime.Now.ToString();
    }

    or

    on_pageload or button click event which was inside grid

    protected void Page_Load(object sender, EventArgs e)
    {
     GridEditableItem item = RadGrid2.MasterTableView.GetInsertItem();
    Label Label1 = item.FindControl("Label1") as Label;
    Button Button1 = item.FindControl("Button1") as Button;
      
    }

    Note : please post grid realated issue in grid's forum so you can get replay fast.

    Thanks,
    Jayesh Goyani
  3. Vishnu Vardhan Reddy
    Vishnu Vardhan Reddy avatar
    20 posts
    Member since:
    Oct 2011

    Posted 07 Nov 2011 Link to this post

    Thx a lot Jayesh. Its helped me lot and saved my time.And i have small dought about Rad Scheduler Control.
    Iam using Rad Shceduler Control for my Diary View.Here am using Custom Edit Template  to Insert an Item.But iam Unable to apply my own Css class to Custom Edit Template.do u Have Any idea about how to Apply our Own Css class to Custom Edit Template in Rad Scheduler.

    Thax & Regards
    N.Vishnu Vardhan Reddy
  4. Jayesh Goyani
    Jayesh Goyani avatar
    2733 posts
    Member since:
    May 2010

    Posted 07 Nov 2011 Link to this post

    Hello,

    Are you used Scheduler / Advanced Templates  or any else?

    Thanks,
    Jayesh Goyani
  5. Vishnu Vardhan Reddy
    Vishnu Vardhan Reddy avatar
    20 posts
    Member since:
    Oct 2011

    Posted 07 Nov 2011 Link to this post

    Hi Jayesh,
    I am using Scheduler Control.In Scheduler Control we have one tag called Inline Insert Template . By using that  Tag that tag i created one Custom template to Insert an Item.When ever i am Clicking on Particular date to insert an Item template not looking good.And unable to find,how to apply my Css own css class to Custom Edit Template.

    i am sending Screen shot of my page

    Thx & Regards
    N.Vishnu Vardhan Reddy
  6. Jayesh Goyani
    Jayesh Goyani avatar
    2733 posts
    Member since:
    May 2010

    Posted 07 Nov 2011 Link to this post

    Hello,

    <style type="text/css">
           .RadScheduler .rsAptEditFormWrapper
           {
               <%--for whole insert template : not forget to give imporatnt --%>
           }
           .RadScheduler .rsTemplateWrapper
           {
               height : 300px !important;
           }
       </style>


    Thanks,
    Jayesh Goyani
  7. Vishnu Vardhan Reddy
    Vishnu Vardhan Reddy avatar
    20 posts
    Member since:
    Oct 2011

    Posted 08 Nov 2011 Link to this post

    Hi Jayesh.Thx for Ur quick reply

    Thx & Regards
    N.Vishnu Vardhan Reddy
Back to Top