Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
69 views
hi all,

i need to edit the textmode property of the auotgenerated popup edit mode. is it possible to do it from codebehind. if so which handler to place the logic for the same.

I tried with edittemplate <formtemplate> but it is getting reflected in insert popup too. i want both the templates to be different and with different set of controls.

kindly help me..

Regards,
Saravanan K


Shinu
Top achievements
Rank 2
 answered on 31 Mar 2010
1 answer
178 views
I have a basic page with Telerik Editor on it, with spell checking enabled.  The page worked fine in .NET 3.5 - spell checking and all, but since migrating the code to .NET 4.0 RC the spell checking functionality fails with the following error:

A potentially dangerous Request.Form value was detected from the client (CommandArgument="<br>").

What do I have to do to make this with with .NET 4.0? 

Thanks

Full error:

<html> 
    <head> 
        <title>A potentially dangerous Request.Form value was detected from the client (CommandArgument=&quot;&lt;br&gt;&quot;).</title> 
        <style> 
         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}  
         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} 
         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} 
         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } 
         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } 
         pre {font-family:"Lucida Console";font-size: .9em} 
         .marker {font-weight: bold; color: black;text-decoration: none;} 
         .version {color: gray;} 
         .error {margin-bottom: 10px;} 
         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; } 
        </style> 
    </head> 
 
    <body bgcolor="white"
 
            <span><H1>Server Error in '/' Application.<hr width=100size=1 color=silver></H1> 
 
            <h2> <i>A potentially dangerous Request.Form value was detected from the client (CommandArgument=&quot;&lt;br&gt;&quot;).</i> </h2></span
 
            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "
 
            <b> Description: </b>Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted.  This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack.  To allow pages to override application request validation settings, set the requestValidationMode attribute in the httpRuntime configuration section to requestValidationMode="2.0". Example: &lt;httpRuntime requestValidationMode="2.0" /&gt;. After setting this value, you can then disable request validation by setting validateRequest="false" in the Page directive or in the &lt;pages&gt; configuration section.  However, it is strongly recommended that your application explicitly check all inputs in this case.  For more information, see http://go.microsoft.com/fwlink/?LinkId=153133
            <br><br
 
            <b> Exception Details: </b>System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (CommandArgument=&quot;&lt;br&gt;&quot;).<br><br
 
            <b>Source Error:</b> <br><br
 
            <table width=100bgcolor="#ffffcc"
               <tr> 
                  <td> 
                      <code> 
 
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.</code> 
 
                  </td> 
               </tr> 
            </table> 
 
            <br> 
 
            <b>Stack Trace:</b> <br><br
 
            <table width=100bgcolor="#ffffcc"
               <tr> 
                  <td> 
                      <code><pre
 
[HttpRequestValidationException (0x80004005): A potentially dangerous Request.Form value was detected from the client (CommandArgument=&quot;&lt;br&gt;&quot;).] 
   System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection) +8809720 
   System.Web.HttpRequest.ValidateNameValueCollection(NameValueCollection nvc, RequestValidationSource requestCollection) +122 
   System.Web.HttpRequest.get_Form() +114 
   Telerik.Web.UI.SpellCheckHandler.ProcessRequest(HttpContext context) +187 
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100 
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +75 
</pre></code
 
                  </td> 
               </tr> 
            </table> 
 
            <br> 
 
            <hr width=100size=1 color=silver
 
            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:4.0.30128; ASP.NET Version:4.0.30128.1 
 
            </font> 
 
    </body> 
</html> 
<!--  
[HttpRequestValidationException]: A potentially dangerous Request.Form value was detected from the client (CommandArgument=&quot;&lt;br&gt;&quot;). 
   at System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection) 
   at System.Web.HttpRequest.ValidateNameValueCollection(NameValueCollection nvc, RequestValidationSource requestCollection) 
   at System.Web.HttpRequest.get_Form() 
   at Telerik.Web.UI.SpellCheckHandler.ProcessRequest(HttpContext context) 
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) 
--> 

Georgi Tunev
Telerik team
 answered on 31 Mar 2010
1 answer
121 views
Ok, putting the actual label in a tool tip is kind of cute, but it isn't a good idea when they want to print or copy the graph...
How do I get it to stop truncating the labels???
Cheah KY
Top achievements
Rank 1
 answered on 31 Mar 2010
2 answers
144 views
Hi!

I want to transfer our DataList with template to the Grid control and don't know how to go about it, please help! This datalist has custom paging too:

<asp:datalist id="dlProducts" runat="server" EnableViewState="False">  
                        <HeaderTemplate> 
                </td> 
                <td colspan="9" /> 
            </tr> 
            <tr class="gridHeader">  
                <td width="5%">SC</td> 
                <td width="15%">Man Code</td> 
                <td width="30%">Description</td> 
                <td width="10%" align="right">Cost 1</td> 
                <td width="10%" align="right">Cost 2</td> 
                <td width="10%" align="right">Cost 3</td> 
                <td width="10%" align="right">Cost 4</td> 
                <td width="10%" align="right">Status</td> 
            </tr> 
            </HeaderTemplate> 
            <ItemTemplate> 
            </td> 
            <td colspan="9" /> 
        </tr> 
        <tr class="gridItem">  
                    <td width="5%" align="left"><asp:HyperLink id="hlnkSC" runat="server" NavigateUrl='<%# String.Format("~/Purchasing/ProductDealerDetail.aspx?siid={0}", DataBinder.Eval(Container.DataItem, "SupplierItemId")) %>' Text='<%# DataBinder.Eval(Container.DataItem, "SourceCode") %>'/></td> 
                    <td width="15%" align="left"><asp:HyperLink id="hlnkManCode" runat="server" NavigateUrl='<%# String.Format("~/Purchasing/ProductDealerDetail.aspx?siid={0}", DataBinder.Eval(Container.DataItem, "SupplierItemId")) %>' Text='<%# DataBinder.Eval(Container.DataItem, "SupplierItemCode") %>'/></td> 
                    <td width="30%" align="left"><asp:HyperLink id="hlnkItem" runat="server" NavigateUrl='<%# String.Format("~/Purchasing/ProductDealerDetail.aspx?siid={0}", DataBinder.Eval(Container.DataItem, "SupplierItemId")) %>' Text='<%# DataBinder.Eval(Container.DataItem, "SupplierProduct") + " " + DataBinder.Eval(Container.DataItem, "Description2") %>'/></td> 
                    <td width="10%" align="right"><%# FormatCurrencyString(DataBinder.Eval(Container.DataItem, "OCCost")) %></td>  
                    <td width="10%" align="right"><%# FormatCurrencyString(DataBinder.Eval(Container.DataItem, "OCCost1")) %></td>  
                    <td width="10%" align="right"><%# FormatCurrencyString(DataBinder.Eval(Container.DataItem, "OCCost2")) %></td>  
                    <td width="10%" align="right"><%# FormatCurrencyString(DataBinder.Eval(Container.DataItem, "OCCost3")) %></td>  
                    <td width="10%" align="right"><it:TextImage id="Textimage1" Text='<%# DataBinder.Eval(Container.DataItem, "ItemStatusImage" )%>' ImageUrl='<%# DataBinder.Eval(Container.DataItem, "ItemStatusImage" )%>' ImageDirectory="/ItemStatus" Runat="Server" /></td>  
                </tr> 
          
</ItemTemplate> 
            </asp:datalist> 
Joe
Top achievements
Rank 1
 answered on 31 Mar 2010
7 answers
436 views
Hi all, I'm trying to get a ComboBox with:
  • text and image in the items
  • only the image in the SELECTED item
 You can see an example in Tripadvisor web site (upper right corner).
Is it possible?

Thanks!

GF
Denny Caldwell
Top achievements
Rank 1
 answered on 30 Mar 2010
2 answers
359 views

I want to create a RadGrid to use like a spreadsheet, where users can fill in the cells, add rows, and delete rows. We're doing that now with an Infragistics grid, which I want to replace. I've attached a pic of what it looks like, which I now want to do with a RadGrid (but with a comboxbox in the "Cost Center" field now).

After I created the columns, I ran the webpage, but the grid is blank -- it doesn't even show the column headers. All I want is an empty row for the user to enter values into (like my attached pic shows) after which they can add or delete rows. (I'll save/load the data into the grid later.)

My RadGrid is defined below, with various ColumnType and DataTypes. But when I run it, there's no grid on the page. What am I missing? Or is RadGrid meant only for display purposes? I found none of your demos allow the spreadsheet-like editing of cells, so am I using the wrong control?

 

 

        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" GridLines="None">  
            <HeaderContextMenu EnableAutoScroll="True">  
            </HeaderContextMenu> 
            <MasterTableView> 
                <RowIndicatorColumn> 
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </RowIndicatorColumn> 
                <ExpandCollapseColumn> 
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </ExpandCollapseColumn> 
                <Columns> 
                    <telerik:GridCheckBoxColumn DataType="System.Boolean" HeaderText="Print" UniqueName="Print">  
                    </telerik:GridCheckBoxColumn> 
                    <telerik:GridCheckBoxColumn DataType="System.Boolean" HeaderText="Post" UniqueName="Post">  
                    </telerik:GridCheckBoxColumn> 
                    <telerik:GridBoundColumn HeaderText="Account Number" UniqueName="Account Number">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn HeaderText="Detail Description" UniqueName="Detail Description">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridDropDownColumn HeaderText="Cost Center" UniqueName="Cost Center">  
                    </telerik:GridDropDownColumn> 
                    <telerik:GridNumericColumn DataType="System.Decimal" HeaderText="Quantity" UniqueName="Quantity">  
                    </telerik:GridNumericColumn> 
                </Columns> 
            </MasterTableView> 
        </telerik:RadGrid> 

 

Jeremy Yoder
Top achievements
Rank 1
 answered on 30 Mar 2010
0 answers
75 views

ASP.NET AJAX Controls : Rotator

Suggestion

1) Add a scroll bar which contain the total frame (ex. like a play video scroll bar) - it can fast to location frame
2) Add Play and Stop button -  Play for Autoscroll
3) Double Click - Enlarge frame
4) Print the frame

Thanks!

edward
Top achievements
Rank 1
 asked on 30 Mar 2010
10 answers
165 views
John John

Posted on on Mar 1, 2010

Hi,
  I have a problem in viewing text in the PDF file. I have 3 hyperlink controls as the following aspx code sicne my project scenario is like that. In viewing  the text of the controls in Grid has no problem. But in PDF file the position and text has been changed.

 <telerik:GridTemplateColumn HeaderText="URL" SortExpression="URL" DataField="URL" GroupByExpression="URL Group By URL" UniqueName="URL" HeaderStyle-Width="52%">  
                            <ItemTemplate>   
                                                                                                          
                               
                                  
                                <asp:HyperLink ID="URL" Text='Title1' runat="server"></asp:HyperLink>                                                                                    
                                <asp:Literal ID="literalUrl1" Text='Title2' runat="server"></asp:Literal> 
                                <asp:Literal ID="literalUrl2" Text='Title3' runat="server"></asp:Literal>                                  
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn>     

Say in simple the above text are ok with grid displayed like Title1,Titll2,Title3
But in PDF file it seems like Title2,title3,Title1 respectively

I dont know what to do to come text as an expected manner

-Thanks
Daniel
Telerik team
 answered on 30 Mar 2010
3 answers
199 views
Hello, I have a situation where I need to export a lot of data, however, I need to show only a few columns in the grid.  I tried adding all of the fields to the grid but have them invisible, however they do not then export.  Not thinking it would work I created a second grid and set it to visible false and of course I was right it did not work, I tried putting the grid in a table cell with a height of 0px but it expands for the grid anyway.

Basically, I need to export around 40+ fields to excel but I want to only show 5 in the grid on the page.

Is this possible or is there a workaround?

Jeff
Daniel
Telerik team
 answered on 30 Mar 2010
1 answer
278 views
Hi All

I have developed a web app using a webservice. Everything works fine in the development environment. I have moved the webservice to the production server in a test folder behind my main website. I can browse to the published service localy on the production server and i can access the remote service from my development machine.

If I run my web app in my development environment I can use the remote webservice no problem. If I move the web application to the production environment the browser outputs this error when the application performs the ajax login method.

The following javascript error is output to the browser
Error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server.

The status code returned from the server was: 500
Source File: http://www.grav80.com/clients/callswharf/Redshift/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_HiddenField&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a1247b7d8-6b6c-419f-a45f-8ff264c90734%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2009.2.826.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3ad2d891f5-3533-469c-b9a2-ac7d16eb23ff%3a16e4e7cd%3a86526ba7%3aed16cbdc%3ab7778d6c
Line: 15

The Following error appears in the event log

Exception information: 
    Exception type: WebException 
    Exception message: Unable to connect to the remote server 
 
Request information: 
    Request URL: http://www.grav80.com/clients/callswharf/redshift/login.aspx 
    Request path: /clients/callswharf/redshift/login.aspx 
    User host address: 77.68.58.231 
    User:  
    Is authenticated: False 
    Authentication Type:  
    Thread account name: NT AUTHORITY\NETWORK SERVICE 

You can view the behaviour in the test environment here.

You can view the service here 

Simon Child
Top achievements
Rank 1
 answered on 30 Mar 2010
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?