Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
74 views
Ive run into an issue here, when i try to use the radopen JS function to open an external web page, it takes over the browser.  Please help.

Markup
<telerik:RadWindow ID="radWindowPeopleSoftEdit" runat="server" ShowContentDuringLoad="false"
MinWidth="800" Height="600" VisibleStatusbar="false" AutoSize="false" ReloadOnShow="true"
IconUrl="/global/images/edit.gif" VisibleOnPageLoad="false" Behaviors="Move, Close"
Overlay="true" Modal="true">
</telerik:RadWindow>

string script = "radopen('[External Site]','radWindowPeopleSoftEdit');";
imgPopUpEdit.Attributes.Add("onclick", script);

I have used this method to open windows in the past and it has worked.  All instances of the rad window that are internal pages work fine, it is just for external sites.

Thank you in advance
Chris Salas
Top achievements
Rank 1
 answered on 19 Sep 2012
2 answers
103 views
I had to use radComboxtBox and aspDD on the same page once. I observed that, for the same value of width they had different sizes. I it was pain to find each telerik combobox and make it 305 or sometimes even 308 or 310, to look same as asp:DD having 300 width.

[ all these widths are in px ]

Aarsh
Top achievements
Rank 1
 answered on 19 Sep 2012
4 answers
266 views
I've got a Radgrid with a single child table that is built programmatically on PageInit. I used your demo here as my guide. The master table cannot be edited, but you can insert new values into the child table. One of the columns in my master table is a checkbox column. I would like to pre-populate a child table checkbox when in edit mode depending on whether the master table column is checked or not. I'm looking at doing it in the EditMode_ItemDataBound event but I can't seem to get anything to stick.  Any suggestions?
Josh
Top achievements
Rank 1
 answered on 19 Sep 2012
1 answer
85 views
I have a form like this, and i show it with a radwindows.
  
<telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1">  </telerik:RadAjaxLoadingPanel>
     
    <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1">
            
                        <asp:Label CssClass="label" ID="lblSedes" Text="Sede:" runat="server" />
                       <telerik:RadComboBox ID="ddlSedes" AutoPostBack="true" AllowCustomText="true" Filter="Contains" runat="server">
                         </telerik:RadComboBox>
                        <asp:Label CssClass="label" Text="Personal:" ID="lblPersonal" runat="server" />
                        <telerik:RadComboBox ID="ddlPersonal" AllowCustomText="true" Filter="Contains" runat="server">
                        </telerik:RadComboBox>
                        <asp:Label CssClass="label" ID="lblFecha" runat="server" Text=" Fecha:" />
                      <telerik:RadDatePicker runat="server" ID="txtFecha">
                        </telerik:RadDatePicker>
                        
     <asp:Button ID="btnGuardar" CssClass="btnGuardar" runat="server" Text="Guardar" />
<script type="text/javascript">
    function GetRadWindow()     
        {     
            var oWindow = null;     
            if (window.radWindow)
                oWindow = window.RadWindow; //Will work in Moz in all cases, including clasic dialog     
            else if (window.frameElement.radWindow)
                oWindow = window.frameElement.radWindow;//IE (and Moz as well)     
            return oWindow;               
        }     
       function cerrar()     
        {     
              GetRadWindow().Close();
                if (!arg)
                    {
                       parent.refreshGrid();
                    }
                    else
                    {
                       parent.refreshGrid("RebindAndNavigate");
                    }  
        }           
    </script>
   </telerik:RadAjaxPanel>

                  
                 
               And when i try to close it from code behind , the code don't works  
 
ClientScript.RegisterStartupScript(Me.GetType(), "Nombre",  " <script>cerrar();</script>" False)


if I try without the RadAjaxLoadingPanel works well.

help please. i need close this windows
Marcelo
Top achievements
Rank 1
 answered on 19 Sep 2012
5 answers
96 views
I have a form like this, and i show it with a radwindows.
  
<telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1">  </telerik:RadAjaxLoadingPanel>
     
    <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1">
            
                        <asp:Label CssClass="label" ID="lblSedes" Text="Sede:" runat="server" />
                       <telerik:RadComboBox ID="ddlSedes" AutoPostBack="true" AllowCustomText="true" Filter="Contains" runat="server">
                         </telerik:RadComboBox>
                        <asp:Label CssClass="label" Text="Personal:" ID="lblPersonal" runat="server" />
                        <telerik:RadComboBox ID="ddlPersonal" AllowCustomText="true" Filter="Contains" runat="server">
                        </telerik:RadComboBox>
                        <asp:Label CssClass="label" ID="lblFecha" runat="server" Text=" Fecha:" />
                      <telerik:RadDatePicker runat="server" ID="txtFecha">
                        </telerik:RadDatePicker>
                        
     <asp:Button ID="btnGuardar" CssClass="btnGuardar" runat="server" Text="Guardar" />
<script type="text/javascript">
    function GetRadWindow()     
        {     
            var oWindow = null;     
            if (window.radWindow)
                oWindow = window.RadWindow; //Will work in Moz in all cases, including clasic dialog     
            else if (window.frameElement.radWindow)
                oWindow = window.frameElement.radWindow;//IE (and Moz as well)     
            return oWindow;               
        }     
       function cerrar()     
        {     
              GetRadWindow().Close();
                if (!arg)
                    {
                       parent.refreshGrid();
                    }
                    else
                    {
                       parent.refreshGrid("RebindAndNavigate");
                    }  
        }           
    </script>
   </telerik:RadAjaxPanel>

                  
                 
               And when i try to close it from code behind , the code don't works  
 
ClientScript.RegisterStartupScript(Me.GetType(), "Nombre"" <script>cerrar();</script>" , False)


if I try without the RadAjaxLoadingPanel works well.

help please. i need close this windows


Marcelo
Top achievements
Rank 1
 answered on 19 Sep 2012
0 answers
68 views
hi ,
kindly help me i have range date filter and i want to show the date inputs and pickers like the following 
from :dateinput {pickerbutton}
to:dateinput {pickerbutton} 
not inline display ,i want every picker in new line 
Ashraf
Top achievements
Rank 2
 asked on 19 Sep 2012
8 answers
214 views
I have a splitter that contains left, main and right panes.  The left pane contains a panelbar.  I want to use the actions in the panelbar to direct results to the main pane.  I'm using the code below.  Everything is opening in a new window.

<telerik:RadSplitter ID="spltBody" runat="server" Width="100%" BorderSize="0">
  <telerik:RadPane ID="paneLeft" runat="server" Width="200">
    <div style="margin: 0px 3px 0px 5px;">
      <telerik:RadPanelBar ID="pbarMenu" runat="server" Width="100%">
        <Items>
          <telerik:RadPanelItem runat="server" Selected="True" Text="About Us" 
            Expanded="true">
            <Items>
              <telerik:RadPanelItem runat="server" NavigateUrl="http://localhost/standards/default.aspx" 
                Target="<%= paneBody.ClientID %>" Text="Who We Are" Selected="true">
              </telerik:RadPanelItem>
              <telerik:RadPanelItem runat="server" NavigateUrl="corevalues.aspx" Target="<%= paneBody.ClientID %>" 
                Text="Core Values">
              </telerik:RadPanelItem>
            </Items>
          </telerik:RadPanelItem>
          <telerik:RadPanelItem runat="server" NavigateUrl="benefits.aspx" 
            Target="<%= paneBody.ClientID %>" Text="Benefits">
          </telerik:RadPanelItem>
          <telerik:RadPanelItem runat="server" NavigateUrl="careers.aspx" Target="<%= paneBody.ClientID %>" 
            Text="Career Opportunities">
          </telerik:RadPanelItem>
          <telerik:RadPanelItem runat="server" Text="Contact Us">
            <Items>
              <telerik:RadPanelItem runat="server">
                <ItemTemplate>
                  If you have questions, you can contact Al Plourde at 
                </ItemTemplate>
              </telerik:RadPanelItem>
            </Items>
          </telerik:RadPanelItem>
        </Items>
      </telerik:RadPanelBar>      
    </div>
  </telerik:RadPane>
  <telerik:RadPane ID="paneBody" runat="server">
    <div style="margin: 0px 3px 0px 5px;">
    This is the main body
    </div>
  </telerik:RadPane>
  <telerik:RadPane ID="paneRight" runat="server" Width="150">
    <div style="margin: 0px 3px 0px 5px;">
    This is the right pane
    </div>
  </telerik:RadPane>
</telerik:RadSplitter>

Thanks!
Bala
Top achievements
Rank 1
 answered on 19 Sep 2012
0 answers
136 views
Hi,
I am using RadControls old version which was working perfectly fine with me until now.
I have hosting on GoDaddy (shared hosting). Recently, I have upgraded to IIS7 for better performance.
After upgrading it, I started getting the below errors on my website (System.Security exception) 
This error occurs during Edit Mod of RadGrid.

I am attaching the error / aspx/ cs / web.config file along with this post.
Request you to look into this asap, please do not tell me to upgrade the Radcontrols version (My client would be reluctant unless I get this issue resolved !)

Server Error in '/' Application.
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
 
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
 
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:
 
 
[SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
   System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
   System.Security.CodeAccessPermission.Demand() +58
   System.Reflection.Assembly.VerifyCodeBaseDiscovery(String codeBase) +118
   System.Reflection.Assembly.get_CodeBase() +35
   System.Web.Handlers.ScriptResourceHandler.GetCodeBaseWithAssert(Assembly assembly) +31
   System.Web.Handlers.ScriptResourceHandler.GetLastWriteTime(Assembly assembly) +36
   System.Web.Handlers.ScriptResourceHandler.GetAssemblyInfoInternal(Assembly assembly) +61
   System.Web.Handlers.ScriptResourceHandler.GetAssemblyInfo(Assembly assembly) +62
   System.Web.Handlers.RuntimeScriptResourceHandler.System.Web.Handlers.IScriptResourceHandler.GetScriptResourceUrl(Assembly assembly, String resourceName, CultureInfo culture, Boolean zip, Boolean notifyScriptLoaded) +325
   System.Web.Handlers.ScriptResourceHandler.GetScriptResourceUrl(Assembly assembly, String resourceName, CultureInfo culture, Boolean zip, Boolean notifyScriptLoaded) +33
   System.Web.UI.ScriptManager.GetScriptResourceUrl(String resourceName, Assembly assembly) +89
   System.Web.UI.ScriptRegistrationManager.RegisterClientScriptResource(Control control, Type type, String resourceName) +111
   System.Web.UI.ScriptManager.RegisterClientScriptResource(Control control, Type type, String resourceName) +9
 
 
Version Information: Microsoft .NET Framework Version:2.0.50727.4223; ASP.NET Version:2.0.50727.4223



<%@ Page Language="C#" MasterPageFile="~/SRGAHome/MasterPages/AdminFullMaster.master"
    AutoEventWireup="true" CodeFile="Relay_Past_Satsang.aspx.cs" Inherits="SRGAHome_Admin_Relay_Past_Satsang"
    Title="Relaying Past Satangs" %>
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.QuickStart" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.WebControls" Assembly="RadAjax.NET2" %>
<%@ Register TagPrefix="rad" Namespace="Telerik.WebControls" Assembly="RadGrid.NET2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphBreadCrumb" runat="Server">
    <a id="A1" href="~/SRGAHome/Admin/Dashboard.aspx" runat="server">Dashboard</a><span>›</span>Past Satsang Configuration
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphPageTitle" runat="Server">
    Past Satsang Configuration
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="mainBody" runat="Server">
    <td valign="top">
        <br />
        <table width="925" border="0" align="center" cellpadding="0" cellspacing="0">
           <tr>
                <td class="subDataLarge" style="text-align: left" colspan="2">
                    <br />
                    <ajax:UpdatePanel UpdateMode="Conditional" runat="server" ID="upSubmit">
                        <ContentTemplate>
                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                <tr>
                                    <td class="subDataLarge" valign="top">
                                        <rad:RadGrid ID="RadGrid1" runat="server" Skin="Windows" GridLines="None" AllowPaging="True"
                                            AllowSorting="True" AutoGenerateColumns="False" Width="97%" OnNeedDataSource="RadGrid1_NeedDataSource"
                                            ShowStatusBar="true" EnableAJAXLoadingTemplate="true" LoadingTemplateTransparency="50"
                                            OnDeleteCommand="RadGrid1_DeleteCommand" OnInsertCommand="RadGrid1_InsertCommand"
                                            OnItemDataBound="RadGrid1_ItemDataBound" OnDataBound="RadGrid1_DataBound" OnUpdateCommand="RadGrid1_UpdateCommand"
                                            EnableAJAX="True">
                                            <PagerStyle Mode="NextPrevAndNumeric" />
                                            <MasterTableView DataKeyNames="PastSatsangId,DisplayonHomePage" GridLines="None" Width="100%" CommandItemDisplay="Top"
                                                ShowFooter="True">
                                                <FooterStyle BackColor="Azure" />
                                                <Columns>
                                                    <rad:GridEditCommandColumn ButtonType="ImageButton" UpdateImageUrl="../../Images/photo-gallery/small-icons/Update.gif"
                                                        EditImageUrl="../../Images/photo-gallery/small-icons/Edit.gif" InsertImageUrl="../../Images/photo-gallery/small-icons/Insert.gif"
                                                        CancelImageUrl="../../Images/photo-gallery/small-icons/Cancel.gif" UniqueName="EditCommandColumn">
                                                        <HeaderStyle Width="30px" />
                                                    </rad:GridEditCommandColumn>
                                                    <rad:GridButtonColumn ConfirmText="Delete this record?" ButtonType="ImageButton"
                                                        ImageUrl="../../Images/photo-gallery/small-icons/Delete.gif" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
                                                        <HeaderStyle Width="20px" />
                                                        <ItemStyle HorizontalAlign="Center" />
                                                    </rad:GridButtonColumn>
                                                    <rad:GridBoundColumn DataField="PastSatsangId" HeaderText="PastSatsangId" UniqueName="PastSatsangId"
                                                        ReadOnly="True" Visible="false">
                                                    </rad:GridBoundColumn>
                                                    <rad:GridTemplateColumn HeaderText="Display Name" SortExpression="DisplayName" UniqueName="DisplayName">
                                                        <ItemTemplate>
                                                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                                                <tr>
                                                                    <td valign="top">
                                                                        <asp:Label runat="server" ID="lblDisplayName" Text='<%# Eval("DisplayName") %>'></asp:Label>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="left" />
                                                        <EditItemTemplate>
                                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="tbDisplayName"
                                                                ErrorMessage="This field is required!" runat="server">
                                                            </asp:RequiredFieldValidator>
                                                            <br />
                                                            <asp:TextBox runat="server" ID="tbDisplayName" Text='<%# Bind("DisplayName") %>'
                                                                Width="500px"></asp:TextBox><span style="color: Red; font-family: Verdana; font-size: medium">*</span>
                                                        </EditItemTemplate>
                                                    </rad:GridTemplateColumn>
                                                    <rad:GridTemplateColumn HeaderText="URL" SortExpression="URL" UniqueName="URL">
                                                        <ItemTemplate>
                                                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                                                <tr>
                                                                    <td valign="top">
                                                                        <asp:Label runat="server" ID="lblURL" Text='<%# Eval("URL") %>'></asp:Label>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="left" />
                                                        <EditItemTemplate>
                                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="tbURL"
                                                                ErrorMessage="This field is required!" runat="server">
                                                            </asp:RequiredFieldValidator>
                                                            <br />
                                                            <asp:TextBox runat="server" ID="tbURL" Text='<%# Bind("URL") %>' Width="500px"></asp:TextBox><span
                                                                style="color: Red; font-family: Verdana; font-size: medium">*</span>
                                                        </EditItemTemplate>
                                                    </rad:GridTemplateColumn>
                                                    <rad:GridTemplateColumn HeaderText="Display for Users" SortExpression="DisplayonHomePage"
                                                        UniqueName="DisplayonHomePage">
                                                        <ItemTemplate>
                                                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                                                <tr>
                                                                    <td valign="top">
                                                                        <asp:Label runat="server" ID="lblDisplayonHomePage" Text='<%# Eval("DisplayonHomePage") %>'></asp:Label>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="left" />
                                                        <EditItemTemplate>
                                                            <br />
                                                            <asp:DropDownList ID="ddlDisplayonHomePage" runat="server" Width="50px">
                                                            </asp:DropDownList>
                                                        </EditItemTemplate>
                                                    </rad:GridTemplateColumn>
                                                </Columns>
                                                <EditFormSettings ColumnNumber="2" CaptionFormatString="Edit properties of Satsang {0}"
                                                    CaptionDataField="DisplayName">
                                                    <FormTableItemStyle Wrap="False"></FormTableItemStyle>
                                                    <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
                                                    <FormMainTableStyle CellSpacing="0" CellPadding="3" Width="100%" />
                                                    <FormTableStyle GridLines="Horizontal" CellSpacing="0" CellPadding="2" CssClass="module"
                                                        Height="110px" Width="100%" />
                                                    <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
                                                    <FormStyle Width="100%" BackColor="#EEF2EA"></FormStyle>
                                                    <EditColumn ButtonType="ImageButton" UpdateImageUrl="../../Images/photo-gallery/small-icons/Update.gif" EditImageUrl="../../Images/photo-gallery/small-icons/Edit.gif"
                                                        InsertImageUrl="../../Images/photo-gallery/small-icons/Insert.gif" CancelImageUrl="../../Images/photo-gallery/small-icons/Cancel.gif"
                                                        InsertText="Insert Satsang Details" UpdateText="Update record" UniqueName="EditCommandColumn1"
                                                        CancelText="Cancel edit">
                                                    </EditColumn>
                                                    <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
                                                </EditFormSettings>
                                                <ExpandCollapseColumn Visible="False">
                                                    <HeaderStyle Width="19px"></HeaderStyle>
                                                </ExpandCollapseColumn>
                                                <RowIndicatorColumn Visible="False">
                                                    <HeaderStyle Width="20px" />
                                                </RowIndicatorColumn>
                                            </MasterTableView>
                                        </rad:RadGrid><br />
                                        <br />
                                    </td>
                                </tr>
                            </table>
                        </ContentTemplate>
                    </ajax:UpdatePanel>
                </td>
            </tr>
            <tr>
                <td class="copy" align="right" colspan="2">
                    <a href="Dashboard.aspx">Back To Dashboard</a><br />
                </td>
            </tr>
            <tr>
                <td style="height: 20px" colspan="2"
                    </td>
            </tr>
        </table>
    </td>
</asp:Content>



#region ====== Includes ======
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using SRGA.Utilities;
using SRGA.User;
#endregion
 
public partial class SRGAHome_Admin_Relay_Past_Satsang : System.Web.UI.Page
{
    #region ====== Variable Declaration ======
    protected MasterHandler objMaster = new MasterHandler();
    protected SatsangManagementHandler objSatsang = new SatsangManagementHandler();
    #endregion
 
    #region ====== Page Load ======
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["UserId"] == null)
        {
            ClientScript.RegisterClientScriptBlock(typeof(Page), "TimeOut", "<script language=javascript>parent.location.href='TimeOut.aspx';</script>");
            return;
        }
        else if (Session["RoleId"] != null)
        {
            // Checking whether this is a webcast admin. 3 - Webcast Admin, 1 - Super Admin
            string[] roleId = Session["RoleId"].ToString().Split(',');
            bool isAccess = false;
            foreach (string item in roleId)
            {
                if (item.Contains("1") || item.Contains("3"))
                {
                    isAccess = true;
                }
            }
 
            if (!isAccess)
            {
                ClientScript.RegisterClientScriptBlock(typeof(Page), "UnAuthorized Access", "<script language=javascript>parent.location.href='UnAuthorizedAccess.aspx';</script>");
                return;
            }
        }
    }
    #endregion
 
    #region ====== ItemDataBound event ======
    protected void RadGrid1_ItemDataBound(object sender, Telerik.WebControls.GridItemEventArgs e)
    {
        if (e.Item is Telerik.WebControls.GridDataItem)
        {
            // Displaying Label for Yes/No
            Telerik.WebControls.GridDataItem dataItem = e.Item as Telerik.WebControls.GridDataItem;
            Label lblDisplayonHomePage = (Label)(dataItem["DisplayonHomePage"].FindControl("lblDisplayonHomePage"));
            if (bool.Parse(lblDisplayonHomePage.Text.Trim().ToString()))
            {
                lblDisplayonHomePage.Text = "Yes";
            }
            else
            {
                lblDisplayonHomePage.Text = "No";
            }
        }
 
        if (e.Item is Telerik.WebControls.GridEditableItem && e.Item.IsInEditMode)
        {
            // Displaying Dropdownlist for Yes/No
            DropDownList ddlDisplayonHomePage = (DropDownList)e.Item.FindControl("ddlDisplayonHomePage");
            ddlDisplayonHomePage.Items.Add(new ListItem("Yes", "True"));
            ddlDisplayonHomePage.Items.Add(new ListItem("No", "False"));
            if (e.Item.ItemIndex != -1)
            {
                string displayonHomepage = RadGrid1.MasterTableView.DataKeyValues[e.Item.ItemIndex]["DisplayonHomePage"].ToString();
                ddlDisplayonHomePage.SelectedValue = displayonHomepage.ToString();
            }
        }
    }
    #endregion
 
    #region ====== NeedDataSource Event ======
    protected void RadGrid1_NeedDataSource(object source, Telerik.WebControls.GridNeedDataSourceEventArgs e)
    {
        try
        {
            // Handling Time Out.
            if (Session["UserId"] == null)
            {
                Page.RegisterClientScriptBlock("TimeOut", "<script language=javascript>parent.location.href='../../TimeOut.aspx';</script>");
                return;
            }
 
            if (!e.IsFromDetailTable)
            {
                RadGrid1.DataSource = objSatsang.GetPastSatsangList(true);
            }
 
        }
        catch (Exception ex)
        {
            LogHandler.LogError(long.Parse(Session["UserId"].ToString()), LogHandler.APPLICATION_ERROR, ex.StackTrace.ToString(), ex.Message.ToString());
            Response.Redirect("Error.aspx?errmsg=" + HttpUtility.UrlEncode(ex.Message.ToString()));
        }
    }
    #endregion
 
    #region ====== UpdateCommand Event ======
    protected void RadGrid1_UpdateCommand(object source, Telerik.WebControls.GridCommandEventArgs e)
    {
        Telerik.WebControls.GridEditableItem editedItem = e.Item as Telerik.WebControls.GridEditableItem;
        string pastSatsangId = editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["PastSatsangId"].ToString();
        string displayName = (editedItem["DisplayName"].Controls[3] as TextBox).Text;
        string url = (editedItem["URL"].Controls[3] as TextBox).Text;
        bool displayonHomepage = bool.Parse((editedItem["DisplayonHomePage"].Controls[1] as DropDownList).SelectedValue);
 
        try
        {
            // Code for Updating Past Satsang Details
            objSatsang.UpdatePastSatsang(int.Parse(pastSatsangId), displayName, url, displayonHomepage, int.Parse(Session["UserId"].ToString()));
            SetMessage("Satsang '" + displayName + "' updated.");
        }
        catch (Exception ex)
        {
            RadGrid1.Controls.Add(new LiteralControl("Unable to Update Satsang Details. Reason: " + ex.Message));
            e.Canceled = true;
        }
    }
    #endregion
 
    #region ====== InsertCommand Event ======
    protected void RadGrid1_InsertCommand(object source, Telerik.WebControls.GridCommandEventArgs e)
    {
 
        Telerik.WebControls.GridEditFormInsertItem insertedItem = (Telerik.WebControls.GridEditFormInsertItem)e.Item;
 
        string displayName = (insertedItem["DisplayName"].Controls[3] as TextBox).Text;
        string url = (insertedItem["URL"].Controls[3] as TextBox).Text;
        bool displayonHomepage = bool.Parse((insertedItem["DisplayonHomePage"].Controls[1] as DropDownList).SelectedValue);
 
        try
        {
            // Code for Inserting Past Satsang Details
            objSatsang.AddPastSatsang(displayName, url, displayonHomepage, int.Parse(Session["UserId"].ToString()));
            SetMessage("Satsang Details Inserted.");
        }
        catch (Exception ex)
        {
            RadGrid1.Controls.Add(new LiteralControl("Unable to Insert Satsang Details. Reason: " + ex.Message));
            e.Canceled = true;
        }
    }
    #endregion
 
    #region ====== DeleteCommand Event ======
    protected void RadGrid1_DeleteCommand(object source, Telerik.WebControls.GridCommandEventArgs e)
    {
        Telerik.WebControls.GridDataItem item = (Telerik.WebControls.GridDataItem)e.Item;
        string pastSatsangId = item.OwnerTableView.DataKeyValues[item.ItemIndex]["PastSatsangId"].ToString();
        string displayName = (item["DisplayName"].Controls[1] as Label).Text;
        try
        {
            // Code for Deleting Past Satsang Details
            int result = objSatsang.DeletePastSatsang(int.Parse(pastSatsangId), int.Parse(Session["UserId"].ToString()));
            if (result == 1)
            {
                SetMessage("Details for Satsang '" + displayName + "' deleted.");
            }
        }
        catch (Exception ex)
        {
            RadGrid1.Controls.Add(new LiteralControl("Unable to delete Satsang Details. Reason: " + ex.Message));
            e.Canceled = true;
        }
    }
    #endregion
 
    #region ====== SetMessage ======
    private void SetMessage(string message)
    {
        gridMessage = message;
    }
    #endregion
 
    #region ====== DataBound Event ======
    private string gridMessage = null;
    protected void RadGrid1_DataBound(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(gridMessage))
        {
            DisplayMessage(gridMessage);
        }
    }
    #endregion
 
    #region ====== DisplayMessage ======
    private void DisplayMessage(string text)
    {
        RadGrid1.Controls.Add(new LiteralControl(string.Format("<span style='color:red'>{0}</span>", text)));
    }
    #endregion
}



<?xml version="1.0"?>
<!--
    Note: As an alternative to hand editing this file you can use the
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in
    machine.config.comments usually located in
    \Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
    <!-- Added for Yet Another Forum  -->
    <configSections>
        <section name="yafnet" type="yaf.SectionHandler,yaf"/>
        <section name="rewriter" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter"/>
    </configSections>
    <yafnet configSource="yafnet.config"/>
    <!--<rewriter configSource="urlrewriter.config"/>-->
    <!-- Added for Yet Another Forum  -->
    <appSettings>
        <add key="WebServerUrl" value="http://localhost:57528/PappajiWebsite/"/>
    </appSettings>
    <connectionStrings>
        <clear/>
        <!--<add name="connString" connectionString="user id=**;password=**;database=****;data source=(local);" providerName="System.Data.SqlClient"/>-->
        </connectionStrings>
    <system.web>
        <!-- Added from Yet Another Forum Begins here -->
        <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
        <!-- Added from Yet Another Forum Ends here -->
        <!--
            Set compilation debug="true" to insert debugging
            symbols into the compiled page. Because this
            affects performance, set this value to true only
            during development.
        -->
        <compilation debug="true">
            <assemblies>
                <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                <add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
            </assemblies>
        </compilation>
        <!--
            The <authentication> section enables configuration
            of the security authentication mode used by
            ASP.NET to identify an incoming user.
    <authentication mode="Windows"/>
        -->
        <authentication mode="Forms">
            <forms name=".YAFNET_Authentication" timeout="525600"/>
        </authentication>
        <!--
            The <customErrors> section enables configuration
            of what to do if/when an unhandled error occurs
            during the execution of a request. Specifically,
            it enables developers to configure html error pages
            to be displayed in place of a error stack trace.
        -->
        <customErrors mode="Off">
            <!--<error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" /> -->
        </customErrors>
 
        <sessionState timeout="600" />
 
        <!-- Settings for Implementing Ajax Starts here-->
        <pages buffer="true" enableEventValidation="false" validateRequest="false" viewStateEncryptionMode="Never" enableViewStateMac="false">
            <controls>
                <add tagPrefix="ajax" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
                <add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit"/>
            </controls>
        </pages>
        <httpModules>
            <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
            <!-- Cross Side Scripting HTTP Module -->
            <!-- Added from Yet Another Forum Begins here -->
            <!--<add type="Intelligencia.UrlRewriter.RewriterHttpModule,Intelligencia.UrlRewriter" name="UrlRewriter"/>-->
            <!-- Added from Yet Another Forum End here -->
        </httpModules>
        <httpHandlers>
            <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
        </httpHandlers>
        <httpRuntime maxRequestLength="1024000" executionTimeout="36000"/>
        <!-- Settings for Implementing Ajax Ends here-->
        <!-- Added from Yet Another Forum Begins here -->
        <!--trace enabled="true" pageOutput="true"/-->
        <!--  <xhtmlConformance mode="Legacy"/> -->
        <!-- Added from Yet Another Forum End here -->
 
    </system.web>
</configuration>



Manish
Top achievements
Rank 1
 asked on 19 Sep 2012
1 answer
117 views
Hello,

I have a data table which has 4 columns. They are Names,Date,Convey,NonConvey.
I have used

RadChart1.DataGroupColumn =

 

"name"

 

RadChart1.DataManager.ValuesYColumns =

 

New String() {"convey"}
RadChart1.PlotArea.XAxis.DataLabelsColumn = "Grouping_Name"
This works fine.
I would like to add NonConvey column to the chart  also as as Secondary Y axis but the same grouping as 'name'. Is this possible?

My Data table is attached with this.
Many Thanks for your help.

Kind Regards
Sunitha

 

Evgenia
Telerik team
 answered on 19 Sep 2012
1 answer
471 views
Hi,

I have a requirement to load the grid data partially and load more data when user chooses to scroll down without pagination.

( Something like we have in facebook)

Not sure if this is technically called as lazy loading or loading on demand. Is it possible to have this feature enabled using radgrid?

Regards,
Jay
Eyup
Telerik team
 answered on 19 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?