Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
112 views
hi, I am just started working on Telerik Grid, but getting error  as copied below. Please suggest me what needs to be done to fix it... Am i missing anything? Thanks, Pradip

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

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).]
   System.Web.UI.ControlCollection.AddAt(Int32 index, Control child) +224
   Telerik.Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated) +214

[HttpException (0x80004005): Please, see whether wrapping the code block, generating the exception, within RadCodeBlock resolves the error.]
   Telerik.Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated) +280
   Telerik.Web.UI.RadAjaxControl.PerformRender() +502
   Telerik.Web.UI.RadAjaxControl.OnPageRender(HtmlTextWriter writer, Control page) +1851
   Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +163
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +149
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +80
   System.Web.UI.Control.Render(HtmlTextWriter writer) +39
   System.Web.UI.Page.Render(HtmlTextWriter writer) +49
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +81
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +336
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +64
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5898


Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053
Princy
Top achievements
Rank 2
 answered on 04 Mar 2009
1 answer
71 views
I'm trying to emulate a slide approach as done via js on the following web site:
http://www.gopconvention2008.com/

There would be a graphic inside a panel, and clicking the graphic would cause the panel to collapse.  But, it would never collapse to be smaller than the width of the graphic.

Anyone done anything like this already using splitters?  Have any ideas?

Or should I just take the js approach?

Thx
Kevin
Top achievements
Rank 2
 answered on 04 Mar 2009
2 answers
132 views

Hi there,

I seem to have a problem with the editor rewriting some HTML code.

Whenever I put this code into the editor content and then click the Design button it strips width:700px; from the first div style.

Is this by design and is there any way of stopping it? I've tried setting ConvertToXhtml="True" to false however this doesnt make any difference.
  

<div style="border: black 1px solid;width:700px;">  
<div style="line-height: 50px; text-align: center;"><strong>Header</strong> 
<div style="text-align: left;">  
<ul style="top-margin: 0px;">  
    <li style="line-height: 30px;">Bullet 1</li> 
    <li style="line-height: 30px;">Bullet 2</li> 
    <li style="line-height: 30px;">Bullet 3</li> 
    <li style="line-height: 30px;">Bullet 4</li> 
</ul> 
</div> 
</div> 
</div> 
 

Kind Regards
James

 

James
Top achievements
Rank 2
 answered on 03 Mar 2009
8 answers
649 views
I am trying to use a custom usercontrol for editing items in a RadGrid.  The user control only has a textbox, the cancel and update buttons on it.  I am trying to bind the textbox with via a bind statment but have an error returned.  The description of the usercontrol is:

<%

@ Control Language="VB" AutoEventWireup="false" CodeFile="frmPartnerAttributing.ascx.vb" Inherits="frmPartnerAttributing" %>

 

<

 

asp:TextBox ID="txtPartnerAttributing" runat="server"

 

Text

 

='<%# DataBinder.Eval( Container, "Parent.BindingContainer.DataItem.PartnerAttributing") %>'

 

Width

 

="239px"></asp:TextBox>

 

<

 

br /><br />

 

<

 

asp:Button ID="cmdUpdate" runat="server" Text="Update" />

 

<

 

asp:Button ID="cmdCancel" runat="server" Text="Cancel" />

The error is that the BindingContainer is a GridTableView which does not have a DataItem member.  Is there something wrong with tis method of binding data to the textbox in the usercontrol? The method comes straight from one of the examples.

Thanks,


 

William Corry
Top achievements
Rank 1
 answered on 03 Mar 2009
1 answer
86 views
Hi,

We are currently evaluating the possibility of using RADEditor to replace the default WSS rich text editor.
We are very enthousiast about the possibility of your product but we have one question about the link Manager.

As we are using WSS and we are not planning to switch to MOSS in a near futur, we were woundering if their was a way to have a version of the Link Manager in the toolbar that is not requiring the AssetPicker (that generates the javascript error on WSS).

Is it something that exist and needs to be activated?
Is it something we can develop on our side and add to the toolbar?

It is an important issue for us since our webmaster use that functionnality alot and they are not familiar with HTML.

Regards,

Pierre-Luc Turgeon
Analyst-Programmer
Transat Tours Canada
Pierre-Luc
Top achievements
Rank 1
 answered on 03 Mar 2009
7 answers
200 views
Hi

I'm using a webservice to populate a RadComboBox.

Here is my js:

    
function OnClientItemsRequested(sender, eventArgs) {  
        var items = sender.get_items();  
 
        if (items.get_count() == 2) {  
            OpenEntityWindowFromItem(items.getItem(1), sender);  
        }  
    } 
function HandleRequestStart(sender, eventArgs) {  
        var context = eventArgs.get_context();  
        context["Filter"] = sender.get_text();  
    }  
 
    function OnClientItemsRequestFailedHandler(sender, eventArgs) {  
        alert(eventArgs.get_errorMessage());  
        // set cancel to hide the default message      
        eventArgs.set_cancel(true);  
    }  
      
    function OnClientSelectedIndexChanged(sender, eventArgs) {  
        OpenEntityWindowFromItem(eventArgs.get_item(), sender);  
    } 

        

Here is my markup (The web service path is set in codebehind):

<telerik:RadComboBox ID="uxRadComboBox" runat="server" EmptyMessage="Search..." 
     Skin="Web20" EnableEmbeddedSkins="false" 
     OnClientItemsRequesting="HandleRequestStart" OnClientSelectedIndexChanged="OnClientSelectedIndexChanged" 
     OnClientItemsRequested="OnClientItemsRequested" 
     EnableLoadOnDemand="true" OnClientItemsRequestFailed="OnClientItemsRequestFailedHandler">  
        <WebServiceSettings Method="GetSearch" /> 
    </telerik:RadComboBox> 

Here is my webservice method:

 [WebMethod]  
        public SearchComboBoxItemData[] GetSearch(object context)  
        {  
          .....  
        } 

Here is the SearchComboBoxItemData class:

public class SearchComboBoxItemData  
    {  
        public string Text { get; set; }  
        public string Value { get; set; }  
    } 

This all works fine on my local set, but on our production server when I click in the combobox, a windows explorer message box pops up saying: "There was an error processing the request."  There isn't any error published to the event viewer.  Is there anything I can do in my code to get more details about the error that is occurring, so I can fix it?

Thank You
Caleb Sandfort
Top achievements
Rank 1
 answered on 03 Mar 2009
7 answers
107 views
I have been a Telerik subscriber for a while now and have recently upgraded my VS.NET application from 2005 to 2008 and the frameworks from 2.0 to 3.5 and therefore loaded the latest version of the RadControls for the ASP.NET into this. I have also loaded the Hotfix as per the Knowledge base instructions to change from trial to my licensed copy. I have done this twice now. Everytime i think i have it fixed, all of a sudden the trial message reappears in my application. I want to load my app into production tonight and this is leaving me unsure to do so.

How can I be absolutely sure this is taken care of correctly (e.g. a registry entry, etc...), anyone have some advice.

Thank you
Scott MacDonald
Top achievements
Rank 1
 answered on 03 Mar 2009
2 answers
103 views
I am in the process of updating a web application from Q1 2008 to Q3 2008. 

The method text is alignment has changed from <p align... to a <p style="text-align....
In Q1 2008 The Editor  Centered text was rendered and returned as
<p align = "center"> Some Text </p>

In Q3 2008 it is being converted to 

<p style="text-align: center; undefined:">Some Text</p>

Is there a way configure the editor to use the old method of text alignment? 




Brete
Top achievements
Rank 1
 answered on 03 Mar 2009
1 answer
149 views
I thought I was home free today but alas I was thwarted by Firefox.  The following code throws an error in Firefox but works just fine in IE 7.0  Any ideas?  I am using the SessionDataSource since I have a page which I want to use a grid but not store any data.

The error thrown is:

Unable to locate record to delete. Please asure you have selected the DataKeyNames propery.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Unable to locate record to delete. Please asure you have selected the DataKeyNames propery.


 
<cc2:SessionDataSource ID="Asset" runat="server" DisplayWarning="False" ClearSessionOnInitialLoad="True" 
                DataFile="~/App_Data/AssetSession.mdb" DeleteCommand="DELETE FROM [Asset] WHERE [ID] = ?" 
                InsertCommand="INSERT INTO [Asset] ([ID], [Description], [RMA], [TAG], [PO], [Serial], [Value]) VALUES (?, ?, ?, ?, ?, ?, ?)" 
                SelectCommand="SELECT * FROM [Asset]" SessionKey="System.Web.UI.Page_Asset" PrimaryKeyFields="ID" 
                UpdateCommand="UPDATE [Asset] SET [Description] = ?, [RMA] = ?, [TAG] = ?, [PO] = ?, [Serial] = ?, [Value] = ? WHERE [ID] = ?">  
                <UpdateParameters> 
                    <asp:Parameter Name="Description" Type="String" /> 
                    <asp:Parameter Name="RMA" Type="String" /> 
                    <asp:Parameter Name="TAG" Type="String" /> 
                    <asp:Parameter Name="PO" Type="String" /> 
                    <asp:Parameter Name="Serial" Type="String" /> 
                    <asp:Parameter Name="Value" Type="String" /> 
                    <asp:Parameter Name="ID" Type="Int32" /> 
                </UpdateParameters> 
                <DeleteParameters> 
                    <asp:Parameter Name="ID" Type="Int32" /> 
                </DeleteParameters> 
                <InsertParameters> 
                    <asp:Parameter Name="ID" Type="Int32" /> 
                    <asp:Parameter Name="Description" Type="String" /> 
                    <asp:Parameter Name="RMA" Type="String" /> 
                    <asp:Parameter Name="TAG" Type="String" /> 
                    <asp:Parameter Name="PO" Type="String" /> 
                    <asp:Parameter Name="Serial" Type="String" /> 
                    <asp:Parameter Name="Value" Type="String" /> 
                </InsertParameters> 
            </cc2:SessionDataSource> 
            <telerik:RadGrid ID="assetGrid" runat="server" DataSourceID="Asset" GridLines="None" 
                AllowAutomaticInserts="True" Skin="Office2007" AutoGenerateColumns="False" AllowAutomaticDeletes="true">  
                <HeaderContextMenu EnableTheming="True">  
                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                </HeaderContextMenu> 
                <ClientSettings> 
                    <Selecting AllowRowSelect="True" /> 
                </ClientSettings> 
                <MasterTableView DataKeyNames="ID" DataSourceID="Asset" EditMode="EditForms" CommandItemDisplay="Bottom">  
                    <CommandItemTemplate> 
                        <div class="noprint">  
                            <asp:Button ID="btnAdd" runat="server" Text="Add New Item" CommandName="InitInsert">  
                            </asp:Button> 
                            <asp:Button ID="btnDelete" runat="server" Text="Delete Selected Item" ToolTip="Click item to select" CommandName="DeleteSelected">  
                            </asp:Button>                              
                        </div> 
                    </CommandItemTemplate> 
                    <EditFormSettings> 
                        <EditColumn UniqueName="InsertCommandColumn" ButtonType="PushButton" InsertText="Insert Item"></EditColumn> 
                    </EditFormSettings> 
                    <RowIndicatorColumn> 
                        <HeaderStyle Width="20px"></HeaderStyle> 
                    </RowIndicatorColumn> 
                    <ExpandCollapseColumn> 
                        <HeaderStyle Width="20px"></HeaderStyle> 
                    </ExpandCollapseColumn> 
                    <Columns> 
                        <telerik:GridBoundColumn DataField="ID" HeaderText="ID" SortExpression="ID" UniqueName="ID" 
                            DataType="System.Int32" ReadOnly="True">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="Description" HeaderText="Description" SortExpression="Description" 
                            UniqueName="Description" MaxLength="33">                              
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="RMA" HeaderText="RMA" SortExpression="RMA" UniqueName="RMA" 
                            MaxLength="18">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="TAG" HeaderText="TAG" SortExpression="TAG" UniqueName="TAG" 
                            MaxLength="8">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="PO" HeaderText="PO" SortExpression="PO" UniqueName="PO" 
                            MaxLength="11">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="Serial" HeaderText="Serial" SortExpression="Serial" 
                            UniqueName="Serial" MaxLength="18">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="Value" HeaderText="Value" SortExpression="Value" 
                            UniqueName="Value" MaxLength="8">  
                        </telerik:GridBoundColumn> 
                    </Columns> 
                </MasterTableView> 
                <FilterMenu EnableTheming="True">  
                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                </FilterMenu> 
            </telerik:RadGrid> 

Again, it works just perfect in IE 7.0...not in Firefox 3.0.5

 

 I have just updated my code with your newer version of the SessionDataSource.cs code (had to convert to vb). and get the same error just in Firefox :(  I have put A LOT of time into this project and don't want to see it fail...please help!

Line 252:                Dim res As DataRow() = sessionTable.[Select]([select])  
Line 253:                If res.Length <> 1 Then  
Line 254:                    Throw New InvalidOperationException("Unable to locate record to delete. Please asure you have selected the DataKeyNames propery.")  
Line 255:                End If  
Line 256: 

 

 

Cyrus
Top achievements
Rank 1
 answered on 03 Mar 2009
1 answer
94 views
Hi All,

does anyone know of how to  unclude intellisense into the editor.... 

basically what I would like to do is  identify when a user types in a word say sum( the editor will then produce a list of  dynamic variables.

as you have probably guessed I am trying to provide a code writing  editor for users to generate their own  formulae based on custom specific criteria

Many Thanks

Mark
Rumen
Telerik team
 answered on 03 Mar 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?