Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
149 views
I have a toolbar with several buttons. The toolbar is ajaxified so the buttons raise ajax updates. I want one of the buttons to do a postback instead (it is used to export some grid content, and cannot do so through an ajax update). I am able to handle the ajax manager requeststart event, but I am not sure how to get a reference to the particular button in order to set enableajax = false for it. I am able to get a reference to the toolbar as a whole through the eventArgs.get_eventTarget() method, but I don't want to disable ajax for the whole toolbar.. only one particular button.
Shinu
Top achievements
Rank 2
 answered on 31 Mar 2010
0 answers
59 views
hi,
can we break a time slot into its sub parts
for eg:
i have 10 min time slot region and my appointment is 2 min so can i adjust one or more 2 min appointment in Same 10 min Time slot????

thanks
Regarded as:
Muhammad Ali
Muhammad ali
Top achievements
Rank 1
 asked on 31 Mar 2010
1 answer
100 views
Hi, we have a master/detail table. The master table has an Aggregate Sum on a $ amount column. We have a detail table that shows multiple payments on an order. I would like to have a aggregate total on the detail table when you expand and view it, but right now, the detailtable aggregate is the same as the master table aggregate. ANy thoughts on what i am doing wrong? Thanks.
Yavor
Telerik team
 answered on 31 Mar 2010
1 answer
169 views
Below you will see the demo of the problem I have.

I need from edittemplate of the Grid in ButtonControl to update Message Control in Master Page. If inside of the proxy I don't put
<telerik:RadAjaxManagerProxy ID="ramProxyShow" runat="server">  
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="RadGrid1">  
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManagerProxy> 
I don't put AjaxSettings - everything is OK and works. But with it it doesn't.

Any suggestions?

I have Master Page
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="MainMaster.master.cs" Inherits="Test_Web_Application.MainMaster" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<%@ Register src="UserControls/Message.ascx" tagname="Message" tagprefix="uc1" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server">  
    <title></title>  
    <asp:ContentPlaceHolder ID="head" runat="server">  
    </asp:ContentPlaceHolder> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <uc1:Message ID="MessageInfo" runat="server" /> 
        <asp:ContentPlaceHolder ID="ContentBlock" runat="server">  
        </asp:ContentPlaceHolder> 
    </div> 
    <telerik:radscriptmanager ID="ScriptManager" runat="server">  
    </telerik:radscriptmanager> 
    <telerik:radajaxloadingpanel ID="RadAjaxLoadingPanel" runat="server"   
        Transparency="20">  
    </telerik:radajaxloadingpanel> 
    <telerik:radajaxmanager ID="RadAjaxManager" runat="server"   
        DefaultLoadingPanelID="RadAjaxLoadingPanel">  
    </telerik:radajaxmanager> 
    </form> 
</body> 
</html> 
 
using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Web;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using Test_Web_Application.UserControls;  
 
namespace Test_Web_Application  
{  
    public partial class MainMaster : System.Web.UI.MasterPage  
    {  
        public Message MessageControl   
        {   
            get  
            {  
                return MessageInfo;  
            }  
        }  
 
        protected void Page_Load(object sender, EventArgs e)  
        {  
        }  
    }  
}  
 

ContentPage
<%@ Page Title="" Language="C#" MasterPageFile="~/MainMaster.Master" AutoEventWireup="true" CodeBehind="TestMPwithAJAX.aspx.cs" Inherits="Test_Web_Application.TestMPwithAJAX" %> 
 
<%@ Register src="UserControls/ButtonControl.ascx" tagname="ButtonControl" tagprefix="uc2" %> 
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">  
</asp:Content> 
<asp:Content ID="Content3" ContentPlaceHolderID="ContentBlock" runat="server">  
    <uc2:ButtonControl ID="ButtonControlShow" runat="server" /> 
</asp:Content> 
 

2 user Controls:
Message Control
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Message.ascx.cs" Inherits="Test_Web_Application.UserControls.Message" %> 
<asp:Label ID="LabelMessage" runat="server" Text="Label"></asp:Label> 
using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Web;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
 
namespace Test_Web_Application.UserControls  
{  
    public partial class Message : System.Web.UI.UserControl  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
 
        }  
 
        public string CurrentMessage   
        {  
            get  
            {  
                return LabelMessage.Text;  
            }  
            set  
            {  
                LabelMessage.Text = value;  
            }  
        }  
    }  
} 

Button Control with Grid

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ButtonControl.ascx.cs" Inherits="Test_Web_Application.UserControls.ButtonControl" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<asp:Button ID="ButtonShowMessage" runat="server" Text="Show Message" onclick="ButtonShowMessage_Click" /> 
<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None"   
    AutoGenerateColumns="False" Skin="Office2007"   
    onneeddatasource="RadGrid1_NeedDataSource" Width="800px"   
    oninsertcommand="RadGrid1_InsertCommand" onitemcreated="RadGrid1_ItemCreated">  
    <ClientSettings> 
        <Scrolling AllowScroll="true" /> 
    </ClientSettings> 
    <MasterTableView DataKeyNames="PaymentFrequencyID" EditMode="EditForms" Width="2000px" CommandItemDisplay="Top">  
        <Columns> 
            <telerik:GridTemplateColumn DataField="Disabled" DataType="System.Boolean"   
                HeaderText="Disabled"   
                UniqueName="Disabled">  
                <ItemTemplate> 
                    <asp:CheckBox ID="chkDisabled" runat="server" /> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
        </Columns> 
        <editformsettings editformtype="Template">  
            <formtemplate> 
                <asp:Button ID="btnShowMessageFromTheGrid" runat="server" onclick="btnShowMessageFromTheGrid_Click" Text="Show Message" /> 
           </formtemplate> 
        </editformsettings> 
    </MasterTableView> 
    <ClientSettings> 
        <Resizing AllowColumnResize="True" /> 
    </ClientSettings> 
</telerik:RadGrid> 
      
<telerik:RadAjaxManagerProxy ID="ramProxyShow" runat="server">  
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="RadGrid1">  
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManagerProxy> 
 
 
using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Web;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
 
namespace Test_Web_Application.UserControls  
{  
    public partial class ButtonControl : System.Web.UI.UserControl  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
 
        }  
 
 
        protected void btnShowMessageFromTheGrid_Click(object sender, EventArgs e)  
        {  
            (this.Page.Master as MainMaster).MessageControl.CurrentMessage = "TEST TEST";  
        }  
        protected void ButtonShowMessage_Click(object sender, EventArgs e)  
        {  
            (this.Page.Master as MainMaster).MessageControl.CurrentMessage = "TEST";  
        }  
 
        protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)  
        {  
            var list = new List<TestDIVBorder>();  
            list.Add(new TestDIVBorder() { PaymentFrequencyID = 1, Disabled = true });  
 
            RadGrid1.DataSource = list;  
        }  
 
        protected void RadGrid1_InsertCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)  
        {  
 
        }  
 
        protected void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)  
        {  
 
        }  
    }  
} 
Yavor
Telerik team
 answered on 31 Mar 2010
3 answers
439 views
I want to see pager even if there is only one page, so I add AlwaysVisible="true"  to the PagerStyle, but seems no effect.
What's wrong with it?

<telerik:RadGrid ID="RGPlaylist" Skin="ParagalloSkin" EnableEmbeddedSkins="false" CssClass="list_one" runat="server" Width="800px"  
                    GridLines="None" AutoGenerateColumns="false" 
                    ForeColor="#333333" 
                    AllowSorting="True" PageSize="10" 
                    DataKeyNames = "PlaylistID" OnPreRender="RGPlaylist_PreRender" OnNeedDataSource="RGPlaylist_NeedDataSource" 
                    AllowPaging="true" AllowFilteringByColumn="true"  AllowAutomaticDeletes="true"> 
                    <ItemStyle CssClass="rows" /> 
                    <AlternatingItemStyle CssClass="alternate_rows" /> 
                    <GroupingSettings CaseSensitive="false" /> 
 
...... 
 
<FooterStyle BackColor="#fff" Font-Bold="True" ForeColor="White" /> 
            <HeaderStyle BackColor="#b6b6b6" Font-Bold="True" CssClass="toprow" /> 
                    <PagerStyle Mode="NumericPages" ShowPagerText="true" CssClass="gridPager" BackColor="#ececea" ForeColor="Gray" AlwaysVisible="true"  PagerTextFormat="Endre side: {4} Side {0} av {1}, produkt {2} til {3} av totalt {5}"/> 
                    <SortingSettings SortToolTip="Klikk her for Ã¥ sortere" SortedAscToolTip="sortert stigende" 
                SortedDescToolTip="sortert desc" /> 
               </telerik:RadGrid> 
 


Pam Redrum
Top achievements
Rank 1
 answered on 31 Mar 2010
1 answer
74 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
188 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=100% size=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=100% bgcolor="#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=100% bgcolor="#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=100% size=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
128 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
150 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
444 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?