Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
38 views
In thi scode Cc is server side varibale . but it throw an error

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

<body class="demoMail">
    <form id="form" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" EnableRoundedCorners="False"
        DecoratedControls="All" />
    <div id="tabs">
        <ul>
            <li><a href="#tabs-1">DemoMail</a></li>
            <li><a href="#tabs-3">DemoMail Sentbox</a></li>
            <% if (Cc==2)
             {%>
            <li><a href="#tabs-2">Constant Contact Report</a></li>
            <%}%>
              <% if (mm==3)
             {%>
            <li><a href="#tabs-4">Marketo Report</a></li>
              <%}%>
        </ul>
plz post me a solution asap
thanks
Shinu
Top achievements
Rank 2
 answered on 10 Feb 2014
6 answers
148 views
Hi, 

I am not sure if this is the correct place to post this question but I hope so....

I am maintaining an existing app hat I have just been given and have 3 RADGRIDs which are identical and used for 3 types of transactions. I have several columns with a button at the end, with a row added to the bottom to have comments on the 2nd line of each transaction.

The button is to add comments and I want to get the current comments and put this into the dialog box when the add btn is clicked.

The problem I am having is that I dont know how to access the correct Row (the following example just gives me the 1st row and not the ROW whos add button was clicked and from which RADGRID.

Here is the code I found on you site which gives me the comments for the first transaction only and the radgrids after thet.

Thanks, George.

var grid = $find("RadGrid1").get_element();
var CommentsElement = $telerik.findElement(grid, "CommentsField");
if (CommentsElement)
$("#txtAddComment").val(CommentsElement.outerText); 



<telerik:RadGrid runat="server" ID="RadGrid1" HeaderStyle-HorizontalAlign="Left" 
<MasterTableView>
    <Columns>
        <telerik:GridTemplateColumn HeaderText="ID" ItemStyle-Width="200px" Display="false">
            <ItemTemplate>
                <asp:Label runat="server" ID="ID" Text='<%# DataBinder.Eval(Container.DataItem, "ID")%>' />
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn HeaderText="Name" ItemStyle-Width="150px">
             <ItemTemplate>
                  <asp:Label runat="server" ID="NAME" Text='<%# DataBinder.Eval(Container.DataItem, "NAME")%>' />
             </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn HeaderText="Add Comments">
             <ItemTemplate>
                <telerik:RadButton runat="server" Text="Add" ID="AddCommentBtn" OnClientClicked="AddCommentBtn_Clicked" AutoPostBack="false"  />
           </ItemTemplate>
        </telerik:GridTemplateColumn>
    </Columns>
    <DetailItemTemplate>
        <asp:Table ID="ColumnRow" runat="server">
            <asp:TableRow>
                <asp:TableCell>
                      <asp:Label runat="server" ID="CommentsField" Text='<%# DataBinder.Eval(Container.DataItem, "COMMENTS")%>' 
                </asp:TableCell>
            </asp:TableRow>
        </asp:Table>
    </DetailItemTemplate>
</MasterTableView>
</telerik:RadGrid>


<telerik:RadGrid runat="server" ID="RadGrid2" HeaderStyle-HorizontalAlign="Left" 
<MasterTableView>
    <Columns>
        <telerik:GridTemplateColumn HeaderText="ID" ItemStyle-Width="200px" Display="false">
            <ItemTemplate>
                <asp:Label runat="server" ID="ID" Text='<%# DataBinder.Eval(Container.DataItem, "ID")%>' />
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn HeaderText="Name" ItemStyle-Width="150px">
             <ItemTemplate>
                  <asp:Label runat="server" ID="NAME" Text='<%# DataBinder.Eval(Container.DataItem, "NAME")%>' />
             </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn HeaderText="Add Comments">
             <ItemTemplate>
                <telerik:RadButton runat="server" Text="Add" ID="AddCommentBtn2" OnClientClicked="AddCommentBtn_Clicked" AutoPostBack="false"  />
           </ItemTemplate>
        </telerik:GridTemplateColumn>
    </Columns>
    <DetailItemTemplate>
        <asp:Table ID="ColumnRow" runat="server">
            <asp:TableRow>
                <asp:TableCell>
                      <asp:Label runat="server" ID="CommentsField" Text='<%# DataBinder.Eval(Container.DataItem, "COMMENTS")%>' 
                </asp:TableCell>
            </asp:TableRow>
        </asp:Table>
    </DetailItemTemplate>
</MasterTableView>
</telerik:RadGrid>
Princy
Top achievements
Rank 2
 answered on 10 Feb 2014
1 answer
130 views
I need to do error checking on a page and it happens on the selectedtabevent.  If the page errors out I need them to stay on teh current tab and not go forward until they have picked what they need to do.  So I thought i could se tthe selected index but it seems not to work.  Is there another way to do this?

function CheckValidation(sender, args) {
           var tab1 = sender.get_selectedIndex();
           if (tab1 == 1) {
               var combo = $find('<%= ddlSoldCounty.ClientID %>');
               var item = combo.get_value();
               if (item = 0)  {
                   if (tab1 == 1) {
                       //Set the selected tab back to 0
                       tab1.sender.set_selectedIndex == 0;
                   }
                   alert('You must pick a county from Drop Down List');
               }
           }
       }
Shinu
Top achievements
Rank 2
 answered on 10 Feb 2014
0 answers
156 views
Hi Everyone

i am making Webmail like this http://demos.telerik.com/aspnet-ajax/webmail/ 
but problem is that.. How to show Total UnRead Email in inbox..
Example: Yahoo or other email sites inbox show Total Unread email
how to do this..?

Thanks
In Advance
Arsalan
Top achievements
Rank 1
 asked on 09 Feb 2014
3 answers
104 views
Hi
I changed  culture for radscheduler but name of days is still in English
How can I change that?
Mahdi
Top achievements
Rank 1
 answered on 08 Feb 2014
8 answers
255 views
I have a treeview and I have enabled the checkbox next to each node. The problem I am facing - is with multi select . Users dont want the 'Multiselect' feature. For example , if you select USA (parent)  user should only be able to selct One State e.g TEXAS and not more than that. If he wants to select NEW York then the previous selection TEXAS should be unchecked and New York should be checked.

I am using the following in my ASPX. I see that multiselect= true / false is working only when the user clicks the 'NODE' (I mean on the text e.g TEXAS) .. But in my case I have checkbox next to each node .. I mean checkbox next to TEXAS , NEWYORK.... I am not able to restrict users from checking multiple checkboxs in the same level. I mean users are able to select TEXAS and New york checkboxes irrespective of multiselect= true / false settings.

I am using webservice ondemand load feature to load the XML (I am using a physcial XML file)

Please provide me an example , how to do it . If not atleast provide me an sample how to highlight LAST selected NODE.

                                <telerik:RadTreeView ID="RadTreeView1" runat="server" Width="100%" Height="475px"
                                                     OnNodeCheck="RadTreeView1_NodeCheck"
                                                     PersistLoadOnDemandNodes="true" LoadingStatusPosition="BelowNodeText"
                                                     OnClientNodeChecked="CheckboxChecked"
                                                     OnClientNodeCollapsed="nodeCollapsed"
                                                     CheckBoxes="true" TriStateCheckBoxes="true" MultipleSelect="false" OnClientMouseOver="onMouseOver" style="white-space:normal;" >
                                                     <ExpandAnimation Type="none"></ExpandAnimation>
                                                     <CollapseAnimation Type="none"></CollapseAnimation>
                                                     <WebServiceSettings Path="NodeWebService.asmx" Method="GetTreeViewNodes">
                                                     </WebServiceSettings>
                                                     <Nodes>
                                                        <telerik:RadTreeNode Text="Pipeline" Value="Pipeline" ExpandMode="WebService">
                                                        </telerik:RadTreeNode>
                                                     </Nodes>
                                </telerik:RadTreeView>

Thanks
Sri
Srikrishna
Top achievements
Rank 1
 answered on 07 Feb 2014
7 answers
149 views
I am using 2013.3.1324.35, and have a RadGrid where databinding occurs on the client using javascript and webservices calls, i.e.  location and method attributes are not set declaratively.   The grid's height needs to expand to fill the browser's client area, so setting fixed height is not possible.

When there is no need for a scrollbar, then loading, sorting and paging all work flawlessly.   The headers align perfectly as seen in Image 1.

Next case is when the grid dimensions are changed, or the page size is changed, such that a vertical scrollbar appears.  Again using the same databinding as described above, the headers are now misaligned.  See Image 2.

In attempt to fix this, I discovered that if I perform the initial databind in the codebehind, and then allow all subsequent databind to occur clientside as described above, then I get the result as shown in Image 3.  Here all the headers align, there is a small rectangular place holder in the header above the scrollbar, and this is all good.

My guess is that there is some grid initialization occuring in the codebehind that is not available during clientside binding.  Is that the case?  

I don't want to mix databinding methods.  Most of the examples for clientside binding, just allow the height to increase to accomodate larger page sizes.  In my case, the grid height is already full screen, so the scrollbar appears.  I'm wondering if I need to caldulate and set the grid height programmatically prior to the initial binding on the client.

From the images, etc. can you shed any light on this behavior?
Dave
Dave
Top achievements
Rank 1
 answered on 07 Feb 2014
2 answers
55 views
Hello, 

Is there any way I can control the order in which the items appear in tree view . 

Is there any function in Kendo which lets me control it 

Thanks 
Vikram
Top achievements
Rank 1
 answered on 07 Feb 2014
2 answers
152 views
In my App_Themes folder, I have a file called TelerikCustomSkin.skin.  In it, I set the default skins for the Telerik controls.  A sample of the contents is as follows:

...
<
telerik:RadScheduler runat="server" Skin="Office2007" EnableEmbeddedSkins="true" />
<telerik:RadToolBar runat="server" Skin="Custom" EnableEmbeddedSkins="false" height="23px"/>
<telerik:RadTreeView runat="server" Skin="Custom" EnableEmbeddedSkins="false" Font-Names="Arial" Font-Size="9pt" />
<telerik:RadDock  runat="server" Skin="Custom" EnableEmbeddedSkins="false" />
<telerik:RadTabStrip runat="server" Skin="Custom" EnableEmbeddedSkins="false" />
...


I am attempting to use the radTreeView on a page similar to your demo page showing examples for each of your controls.  So in my .aspx page I have the following:

<telerik:RadTreeView ID="rtvTree" runat="server" EnableEmbeddedSkins="True" Skin="Silk">
    <Nodes>
        <telerik:RadTreeNode runat="server" Text="Top Ten" Value="pnlTopTen"/>
        <telerik:RadTreeNode runat="server" Text="Topic Areas" Value="pnlTopicAreas"/>
    </Nodes>
</telerik:RadTreeView>

However, my radTreeView is still being rendered using my custom skin, not the embedded skin.  I have removed the custom skin from the TelerikCustomSkin.skin and it works then.  However, I would now have to change all the other locations radTreeView is being used and add the skin attribute.

I am using Telerik 3.5 from release 2013_3.1114.

Any help is appreciated.
Ed
Top achievements
Rank 1
 answered on 07 Feb 2014
2 answers
212 views
Dear Sir:
   I tried to override the existing embedded skin in the page... it is fine and it works.... but if i tried to put it into the separated css file and it didn't work anymore.... is there anything i have to take care with it?


<head id="Head1" runat="server">  
 
    <link href="~/css/common.css" type="text/css" rel="stylesheet"/>      
    <link href="~/css/customize.css" type="text/css" rel="stylesheet"/>   //<-- Not work to put it inside      
      
 
        
      
    <style type="text/css">  
        .rfdDecorated    
        {    
            text-align: center !important;  
            padding-left: 6px !important;    
            border: 1px solid red !important;    
        }     
          
        div.RadComboBox_Outlook,                  //<-- fine to just put it in the page
        div.RadComboBox_Outlook .rcbInput,  
        div.RadComboBoxDropDown_Outlook  
        {  
            font: 10px  Arial,"Segoe UI", sans-serif;  
            color: #333;  
        }  
    </style>  

I don't wanna to put the code into the page separately.....

thank you for your kindly help

From edl0022
Mishal
Top achievements
Rank 1
 answered on 07 Feb 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?