Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
306 views

Hi,

How to find child controls that are located under the  <FormTemplate> tag of RadControl.

<telerik:RadGrid PageSize="3" AllowPaging="true" ID="RadGrid1" runat="server" GridLines="Horizontal"

        AllowFilteringByColumn="true" Skin="WebBlue" AllowAutomaticDeletes="True" OnNeedDataSource="RadGrid1_NeedDataSource"

        OnDeleteCommand="RadGrid1_DeleteCommand" OnInsertCommand="RadGrid1_InsertCommand"

        OnUpdateCommand="RadGrid1_UpdateCommand"

        onitemcommand="RadGrid1_ItemCommand" onitemcreated="RadGrid1_ItemCreated">

        <PagerStyle Mode="Slider" />

        <MasterTableView AutoGenerateColumns="false" DataKeyNames="TerritoryID" EditMode="EditForms"

            CommandItemDisplay="TopAndBottom">

            <Columns>

                <telerik:GridEditCommandColumn>

                </telerik:GridEditCommandColumn>

                <telerik:GridBoundColumn ReadOnly="true" HeaderText="TerritoryID" DataField="TerritoryID"

                    UniqueName="TerritoryID" />

                <telerik:GridBoundColumn ReadOnly="false" HeaderText="TerritoryDescription" DataField="TerritoryDescription"

                    UniqueName="TerritoryDescription" />

                <telerik:GridBoundColumn ReadOnly="false" HeaderText="RegionID" DataField="RegionID"

                    UniqueName="RegionID" />

                <telerik:GridButtonColumn CommandName="Delete" Text="Delete">

                </telerik:GridButtonColumn>

            </Columns>

            <EditFormSettings EditFormType="Template">

                <EditColumn UniqueName="EditCommandColumn1">

                </EditColumn>

                <FormTemplate>

                    <table id="Table2" cellspacing="2" cellpadding="1" width="250" border="1" rules="none"

                        style="border-collapse: collapse">

                        <tr>

                            <td>

                                <table id="Table3" cellspacing="1" cellpadding="1" width="250" border="0">

                                    <tr>

                                        <td>

                                        </td>

                                        <td>

                                        </td>

                                    </tr>

                                    <tr>

                                        <td>

                                            TerritoryID:

                                        </td>

                                        <td>

                                            <asp:TextBox ID="txtTerritoryID" MaxLength="5" Visible='<% # (Container as GridItem).OwnerTableView.IsItemInserted %>'

                                                runat="server">

                                            </asp:TextBox>

                                        </td>

                                    </tr>

                                    <tr>

                                        <td>

                                            TerritoryDescription:

                                        </td>

                                        <td>

                                                                                     <asp:CheckBox ID="CheckBox1" runat="server"></asp:CheckBox>

                                        </td>

                                    </tr>

                                    <tr>

                                        <td>

                                            RegionID:

                                        </td>

                                        <td>

                                            <asp:TextBox ID="txtRegionID" runat="server" Text='<%# Eval( "RegionID") %>' TabIndex="1">

                                            </asp:TextBox>

                                        </td>

                                    </tr>

                                </table>

                            </td>

                        </tr>

                        <tr>

                            <td colspan="2">

                                <b>Territory Info:</b>

                            </td>

                        </tr>

                        <tr>

                            <td align="right" colspan="2">

                                <asp:Button ID="btnUpdate" Text='<%# (Container as GridItem).OwnerTableView.IsItemInserted ? "Insert" : "Update" %>'

                                    runat="server" CommandName='<%# (Container as GridItem).OwnerTableView.IsItemInserted ? "PerformInsert" : "Update" %>'>

                                </asp:Button>&nbsp;

                                <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"

                                    CommandName="Cancel"></asp:Button>

                            </td>

                        </tr>

                    </table>

                </FormTemplate>

            </EditFormSettings>

        </MasterTableView>

    </telerik:RadGrid>

I want to Find out that Controls which I placed inside the RadGrid , such as txtRegionID, CheckBox1…. From code behind.So that I can bind my required data to the thouse controls.

Princy
Top achievements
Rank 2
 answered on 21 Jul 2008
3 answers
99 views
Hi,

Is it possible to put all rows in edit mode and still have alternating row colors?

thx in advance
Glenn
Princy
Top achievements
Rank 2
 answered on 21 Jul 2008
1 answer
95 views

Hi,

I have struck up with one scenario as follow.

I have taken one RadCombo Box under RadGrid’s <FormTemplate> Tag (You can see following  Code for referral).

I want to bind the Data to the RadCombo at run time. Any one can pls help me in this regards.

At least pls guide with any sample program/code with same scenario.

 

<%@ Page Language="C#" MasterPageFile="~/Matrix_MasterPage.master" AutoEventWireup="true"

    CodeFile="addsubmenus.aspx.cs" Inherits="addsubmenus" Title="Untitled Page" %>

 

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

    </telerik:RadCodeBlock>

    <table width="100%" style="height: Auto" width="80%" class="TableBackGround" cellpadding="0"

        cellspacing="0">

            <td style="height: 21px" colspan="6" class="MenuSubHeading">

                Add Submenu

            </td>

        </tr>

        <tr>

            <td style="height: 100px">

                <telerik:RadGrid ID="rgSubmenus" runat="server" AllowPaging="True" GridLines="Horizontal"

                    Skin="WebBlue" OnNeedDataSource="rgSubmenus_NeedDataSource" PageSize="10" Width="70%"

                    OnInsertCommand="rgSubmenus_InsertCommand" OnItemDataBound="rgSubmenus_ItemDataBound" OnItemCreated="rgSubmenus_ItemCreated">

                    <PagerStyle Mode="Slider" />

                    <MasterTableView CommandItemDisplay="TopAndBottom" AutoGenerateColumns="false" DataKeyNames="submenuid"

                        EditMode="EditForms">

                        <Columns>

                            <telerik:GridBoundColumn DataField="submenuid" HeaderText="SubMenu ID" HeaderStyle-HorizontalAlign="Center"

                                ItemStyle-HorizontalAlign="Left" Visible="false">

                            </telerik:GridBoundColumn>

                            <telerik:GridBoundColumn DataField="mainmenuid" HeaderText="MainMenu ID" HeaderStyle-HorizontalAlign="Center"

                                ItemStyle-HorizontalAlign="Left" HeaderStyle-Width="15%" Visible="false">

                            </telerik:GridBoundColumn>

                            <telerik:GridBoundColumn DataField="mainmenuname" HeaderText="MainMenu Name" HeaderStyle-HorizontalAlign="Center"

                                ItemStyle-HorizontalAlign="Left" HeaderStyle-Width="15%">

                            </telerik:GridBoundColumn>

                            <telerik:GridBoundColumn DataField="submenuname" HeaderText="SubMenu Name" HeaderStyle-HorizontalAlign="Center"

                                ItemStyle-HorizontalAlign="Left" HeaderStyle-Width="15%">

                            </telerik:GridBoundColumn>

….. So On.

                        </Columns>

                        <EditFormSettings EditFormType="Template">

                            <EditColumn UniqueName="EditCommandColumn1">

                            </EditColumn>

                            <FormTemplate>

                                <table width="100%" cellpadding="0" cellspacing="0" border="0" bordercolor="red">

                                    <tr>

                                        <td width="49%" align="right">

                                            Select MainMenu

                                        </td>

                                        <td width="2%">

                                            :

                                        </td>

                                        <td width="49%" align="left">

                                            <telerik:RadComboBox ID="ddlMainmenus" runat="server" MarkFirstMatch="True" Skin="WebBlue"

                                                EmptyMessage="Select Mainmenu" Width="150px">

                                                <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

                                            </telerik:RadComboBox>

                                        </td>

                                    </tr>

                                    <tr>

                                        <td width="49%" align="right">

                                            Submenu Name …………………So on….

C#Code:-

I am trying to bind this by using

protected void rgSubmenus_ItemDataBound(object sender, GridItemEventArgs e)

    {

       

        if(e.Item is GridEditableItem && e.Item.IsInEditMode)

        {

            RadComboBox cboInstructor = (RadComboBox)e.Item.FindControl("ddlMainmenus");

………

            

        }

 

    }

But I am nt able to Bind. Pls help me in this regards….!

Princy
Top achievements
Rank 2
 answered on 21 Jul 2008
2 answers
211 views
I see that there's a way to implement a post back on a row click.  (by setting ClentSettings -> EnablePostBackOnRowClick to true).

Is there a way to do the same thing with only a double click?  (Ie. I don't want a post back on a single click, only a double click)
Shinu
Top achievements
Rank 2
 answered on 21 Jul 2008
1 answer
296 views
Hello

I want to open a new Rad window on the button click. And I want to display some controls from the same page only.

Please provide me any sample application for the same or any methods to do the same.

Regards,

Vinit
Shaun Peet
Top achievements
Rank 2
 answered on 20 Jul 2008
2 answers
126 views
Dear Sir,

I am using javascript to add some new tabs.  After total tabs are more than expected, the scrollbar should be displayed.  However, the scrollbar doesn't.

Anything I can do to get this goal without postback?
Thank you
DaveJones
Top achievements
Rank 1
 answered on 19 Jul 2008
7 answers
426 views
I have a radwindow with some links to different things. I want to be able to click on a link and then have the radwindow close (got this part working)

and then in the parent page I want a code behind method to be called so I can look at the value sent back from the RadWindow and Response.Redirect to certain URL.

Is this possible?

I looked on the forum here already and didnt see anything regarding this issue. help

Shaun Peet
Top achievements
Rank 2
 answered on 19 Jul 2008
2 answers
218 views
hi,
I work on custom control(inherit RadComboBox) with multi column combobox. For header is used HeaderTemplate and on ItemsRequested I create RadComboBoxItem for each element. For each element I want to display a picture from Table. If put in  RadComboBoxItem an Image control and fill ImageUrl with path it works exactly what I want.
The question is how to show picture from table? I'm able to read the picture into System.Drawing.Image control and make some extra changes on the image but I don't now how to display the image in the RadComboBox.
Any suggestions how to do it?
Marjan
Top achievements
Rank 1
 answered on 19 Jul 2008
4 answers
162 views
Hi,

I have been trying to call a webservice validation to the events before the editor allows someone to edit an appointment.

But i can't find a way to actually stop the scheduler from opening the form.

I call the validation OnClientAppointmentDoubleClick

var hasReservations = null; 
function OnClientAppointmentDoubleClick(sender, eventArgs) 
{ 
    var strId = eventArgs.get_appointment().get_id().substring(0, 36); 
    WebServices.SiteService.EventHasRegistration(strId, OnLookupComplete, OnError); 


then i set the hasReservations = true/false depending if there are any reservations to that appointment.

I try using the following code to stop the schduler, but it wont work due to the async. delay.
if(hasReservations == null || hasReservations== 'undefined') 
{ 
    eventArgs.set_cancel(true); 
    radalert("Validation service currently unavailable. Editing events are not available at this time."); 
    return; 
} 
 
if(hasReservations) 
{ 
    radalert("Some occurrences of this series have reservations assigned to them, they will not be modified."); 
    eventArgs.set_cancel(true); 
} 
 

How am i able to implement such thing?

This doesn't have to happen on the client side, but i cant't find a way to validate it before the client recurrence popup is displayed.

The client documentation for the scheduler is horrible, and i cant find anything i need.

Someone please help me!

Thanks

Fabio


Fabio Honigmann
Top achievements
Rank 2
 answered on 18 Jul 2008
1 answer
86 views
Hi

I'm trying to build a custom skin for the calendar and I can't figure out how to reference the arrows for fast navigation. Does anyone know where in the CSS I can change those images?

Mike
The KID
Top achievements
Rank 2
 answered on 18 Jul 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?