Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
175 views
Hello, I have a RadGrid with a pageSize = 10 and i used a Server Side Paging to retrieve my data. The problem is when the radgrid had the values startRowIndex = 10 and MaximumRows = 10 from the objectDatasource, it show just one record in the Page 2. In the other Pages it's ok. Here is my Code :
<telerik:RadGrid ID="gdvGC_0007" ShowStatusBar="True" 
                        runat="server" AllowPaging="True" AllowCustomPaging="True" AllowSorting="True" 
                        GridLines="None" Width="98%" Skin="Gray" AutoGenerateColumns="False" MasterTableView-DataKeyNames="ListID" 
                        DataSourceID="odsListGeneric" Visible="False" OnItemDataBound="GridViews_ItemDataBound" OnItemCreated="GridViews_ItemCreated"
                        <HeaderContextMenu Skin="Web20"
                            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                        </HeaderContextMenu> 
                        <MasterTableView Width="100%">                                                      
                            <Columns> 
                                <telerik:GridBoundColumn DataField="ElementValue" HeaderText="English" SortExpression="En_DName" /> 
                                <telerik:GridBoundColumn DataField="ElementValueFr" HeaderText="French" SortExpression="Fr_DName" /> 
                                <telerik:GridBoundColumn DataField="ElementValueSp" HeaderText="Spanish" SortExpression="Sp_DName" /> 
                                <telerik:GridBoundColumn DataField="Reserved" HeaderText="Reserved" Visible="false" /> 
                                <telerik:GridTemplateColumn> 
                                    <ItemTemplate> 
                                        <asp:RadioButton ID="rdSelect" runat="server" AutoPostBack="True" OnCheckedChanged="rdSelect_CheckedChanged" /> 
                                    </ItemTemplate> 
                                </telerik:GridTemplateColumn> 
                            </Columns> 
                        </MasterTableView> 
                        <ClientSettings> 
                            <Selecting AllowRowSelect="True"></Selecting> 
                        </ClientSettings> 
                        <FilterMenu Skin="Web20"
                            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                        </FilterMenu> 
                        <PagerStyle Mode="NextPrevAndNumeric" /> 
                    </telerik:RadGrid> 
<asp:ObjectDataSource ID="odsListGeneric" runat="server" EnablePaging="True" TypeName="elementUIC" 
                        SelectMethod="SelectTriElements" SelectCountMethod="getRecordCount" SortParameterName="sortParameter" 
                        StartRowIndexParameterName="startRowIndex" MaximumRowsParameterName="maximumRows" 
                        DataObjectTypeName="CElement" OldValuesParameterFormatString="original_{0}"
                        <SelectParameters> 
                            <asp:Parameter Direction="Output" Name="myRowsCount" Type="Int32" /> 
                            <asp:QueryStringParameter DbType="Int32" QueryStringField="LvGroupID" Name="LvGroupID" /> 
                            <asp:QueryStringParameter DbType="String" QueryStringField="Element" Name="Element" /> 
                        </SelectParameters> 
                    </asp:ObjectDataSource> 

Pavlina
Telerik team
 answered on 14 Apr 2009
16 answers
1.0K+ views
I have a 3 level hierarchical grid. I set the datasource of each child grid in the ASPX. I now have added a checkbox to include older data from the tables, and if that check box ix checked, I want to change the datasources of the master and detail tables. I have an oncheckboxchanged event handler for the checkbox, and can set the master grid datasource fine. What is the code to set the detail table's datasource in C# in the checkboxchanged event handler?

Thanks
  protected void outdatedChanged(object sender, EventArgs e) 
    { 
        CheckBox cb = (CheckBox)sender; 
        if (cb.Checked) 
        { 
            providersGrid.DataSourceID = "CCprovidersIncludingOutdated"// master grid       
         //I want to set the detail grids datasources here for outdated content 
        } 
        else 
        { 
            providersGrid.DataSourceID = "CCproviders"// master grid 
            //I want to set the detail grids datasources here 
             
        } 
    } 
 

Yavor
Telerik team
 answered on 14 Apr 2009
1 answer
217 views
I have a website that is structured as follows:

-> MasterPage  - Contains RadAjaxManager control
     ->Page
          ->Control 1 
          ->Control 2
          ->Control 3
          ->Control 4

Each control needs to implement a AjaxRequest event handlers for control specific events (nothing cross control, or master page stuff). So in each control I am using RadAjaxManager.GetCurrent(this.Page) method and attach to the AjaxRequest event. The problem I am having is that if the javascript from Control 1 fires the AjaxRequest event all of the other controls seem to get their event handlers called as well. Is there a way to filter the requests so they don't all fire? Is there a better way to do this?   
Pavlina
Telerik team
 answered on 14 Apr 2009
1 answer
132 views
Greeting!

I was tryign to implement RadInput controls to form (due to large amount of simple validations specific for every control) and found that RadMaskedTextBox is made only for engl-lang developmens, while i need to implement Rus mask.

If there any possibilities or solutions to make it? Or mask will stay there with ASCII [page:0] only and no possible utf-8 implementations can be done?
Pavel
Telerik team
 answered on 14 Apr 2009
1 answer
152 views
Hi,
We have custom master pages which make use of custom CSS classes.
When authors go in edit mode the contents inside the RADEditor are displayed using its own CSS and it doesn't respect the custom css of the master page. Not even in the Preview mode.
But, once the page is published it uses the custom css classes.
We have tried config.xml and CSS settings but not able to make it work in Edit mode.

Thanks in advance.
Stanimir
Telerik team
 answered on 14 Apr 2009
3 answers
164 views
Hi,

When will it be possible to download the version updated of RADEDITOR for MOSS with Q1 SP1 2009 of RADCONTROLS For Ajax ?

We started several new projects and I prefer to work with the new version.

Thanks in advance for your answer.

Best regards.

Nicolas.
Stanimir
Telerik team
 answered on 14 Apr 2009
0 answers
55 views
Hi,

I am using RadScheduler and loading data is ok.

I set AllowDelete="false", AllowEdit="false", AllowInsert="false", ReadOnly="True". That means there is no event when clicking on item such as: add, edit, delete, just show.

But when clicking data displayed on Internet Explorer, text disappear and leave blank, Fire Fox is no problem. I do not where to fix this bug. Please help me.

Thanks
Thy
Top achievements
Rank 1
 asked on 14 Apr 2009
2 answers
189 views
I have a datasource that includes an undetermined time range. Because of this I need to display both Date & Time in the xAxis labels. I have seen the various posts on including date or time but don't see how I would include both. In my own code I currently can toggle between showing date or time by simply toggling the ValueFormat as seen below. How can I show both?

 

_chart.AutoLayout = true;  
_chart.PlotArea.XAxis.IsZeroBased = false;  
_chart.PlotArea.XAxis.Appearance.ValueFormat = ChartValueFormat.ShortTime;  
_chart.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 320
Brett Robichaud
Top achievements
Rank 1
 answered on 13 Apr 2009
6 answers
124 views
As I expirenced that all the buttons are disabled when switch editor to HTML source mode.
Is it possible to make buttons enabled in source mode? At least find and replace functionality which is really important tool for editing the source.
Rick
Top achievements
Rank 1
 answered on 13 Apr 2009
2 answers
291 views
I'm stumped.  I have a column in a grid with an image.  In one working page, on mouseover of the image we use the webservicesettings to call a service and dynamically value the mouseover tooltip with a larger thumbnail of the image.  It works great and is based on the image gallery sample that auto-sizes and such.

I have another page that also has an image column and calls a different service to do the same effect.  However when I mouse over the image NOTHING HAPPENS.  I set an alert in the OnClientBeforeShow function and it never seems to be called.  The only difference I can think of is that this page uses the code that does an OnPageLoad ajax request to show a loading graphic while the page loads.  Is this perhaps causing issues with the radtooltips?

The only differences I can think of are 1) the initial ajax on page load addition, and 2) the additional asp panel wrapped around things that is not in the other screen which works fine.

Here is the master page aspx, the page aspx, and the page code-behind.

Thx!

Master page:

<%@ Master Language="C#" AutoEventWireup="true" Codebehind="WebAppMaster.master.cs" 
    Inherits="Portal.Shell.MasterPages.WebAppMaster" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<!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 id="Head" runat="server">  
<title></title>  
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> 
<meta name="description" content="" /> 
<meta name="keywords" content="" /> 
<meta name="author" content="" /> 
</head> 
<body> 
<div id="wrap">  
 
    <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All" /> 
    <form id="mainForm" runat="server">  
        <asp:ScriptManager ID="DefaultMasterScriptManager" runat="server"></asp:ScriptManager> 
        <asp:ContentPlaceHolder ID="DefaultContent" runat="server" /> 
        <br /><br /> 
    </form> 
 
</div> 
</body> 
</html> 
 

Now the aspx page:

<%@ Page Language="C#" AutoEventWireup="true" Codebehind="Domains.aspx.cs" Inherits="Portal.WebApp.Views.Domains" 
    Title="Domains" MasterPageFile="~/Shared/WebAppMaster.master" %> 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> 
<asp:Content ID="content" ContentPlaceHolderID="DefaultContent" Runat="Server">  
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">  
       <script type="text/javascript">  
           function pageLoad(sender, eventArgs) {  
               if (!eventArgs.get_isPartialLoad()) {  
                   $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("InitialPageLoad");  
               }  
           }     
       </script> 
    </telerik:RadCodeBlock> 
    <script type="text/javascript">  
        var currentTooltip = null;  
 
        function OnClientBeforeShow(sender, args) {  
            //Hide the currently visible tooltip   
            if (currentTooltip) {  
                if (currentTooltip != sender) currentTooltip.hide();  
                return;  
            }  
 
            currentTooltip = sender;  
            args.set_cancel(true);  
        }  
 
        function centerTooltip(img) {  
            if (currentTooltip) {  
                currentTooltip.set_contentElement(img);  
 
                //use the method updateLocation because it does not call WebService's method which loads the content   
                currentTooltip.updateLocation();  
                currentTooltip = null;  
            }  
        }  
    </script> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" 
       OnAjaxRequest="RadAjaxManager1_AjaxRequest">  
       <AjaxSettings> 
           <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">  
               <UpdatedControls> 
                   <telerik:AjaxUpdatedControl ControlID="Panel1" 
                       LoadingPanelID="RadAjaxLoadingPanel1" /> 
               </UpdatedControls> 
           </telerik:AjaxSetting> 
       </AjaxSettings> 
    </telerik:RadAjaxManager> 
       <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" 
        Width="75px">  
        <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading3.gif") %>' 
            style="border: 0px;" /> 
    </telerik:RadAjaxLoadingPanel> 
    <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" Position="center" 
        RelativeTo="BrowserWindow" OnClientBeforeShow="OnClientBeforeShow">  
        <WebServiceSettings Method="GetWebSiteThumb" Path="~/Services/WSSiteThumb.asmx" /> 
    </telerik:RadToolTipManager> 
    <h2>Domains</h2> 
    <asp:Panel ID="Panel1" runat="server">  
        <div class="breadcrumb">Back to: <href="Default.aspx">Jobs</a></div>  
        <telerik:RadGrid ID="RadGrid1" runat="server"   
            AllowSorting="True" GridLines="None" AutoGenerateColumns="false" OnItemCommand="RadGrid1_OnItemCommand" OnItemDataBound="RadGrid1_ItemDataBound">  
            <ClientSettings EnableRowHoverStyle="true">  
                <Selecting AllowRowSelect="false" /> 
            </ClientSettings> 
            <MasterTableView CellSpacing="-1">  
            <RowIndicatorColumn> 
            <HeaderStyle Width="20px"></HeaderStyle> 
            </RowIndicatorColumn> 
 
            <ExpandCollapseColumn> 
            <HeaderStyle Width="20px"></HeaderStyle> 
            </ExpandCollapseColumn> 
                <Columns> 
                    <telerik:GridTemplateColumn UniqueName="thumb" ItemStyle-Width="20px">  
                        <ItemTemplate> 
                            <asp:Image runat="server" ID="thumb" ImageUrl="" Width="16" Height="16" /> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridBoundColumn UniqueName="domain" DataField="domain" HeaderText="Domain">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn UniqueName="score" DataField="score" HeaderText="Score">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridButtonColumn CommandName="Select" Text="View Pages"   
                        UniqueName="select" HeaderText="Action">  
                    </telerik:GridButtonColumn> 
                </Columns> 
            </MasterTableView> 
        </telerik:RadGrid> 
    </asp:Panel> 
</asp:Content> 
 

...and the code-behind:

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 Portal.WebApp.Views;  
using Microsoft.Practices.ObjectBuilder;  
using System.Collections.Generic;  
using Portal.BusinessObjects.Interface;  
using Telerik.Web.UI;  
 
namespace Portal.WebApp.Views  
{  
    public partial class Domains : Microsoft.Practices.CompositeWeb.Web.UI.Page, IDomainsView  
    {  
        private DomainsPresenter _presenter;  
 
        protected void Page_Load(object sender, EventArgs e)  
        {  
            if (!this.IsPostBack)  
            {  
                //this._presenter.OnViewInitialized();  
            }  
            this._presenter.OnViewLoaded();  
        }  
 
        protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)  
        {  
            if (e.Argument == "InitialPageLoad")  
            {  
                this._presenter.OnViewInitialized();  
            }  
        }  
 
        [CreateNew]  
        public DomainsPresenter Presenter  
        {  
            get  
            {  
                return this._presenter;  
            }  
            set  
            {  
                if (value == null)  
                    throw new ArgumentNullException("value");  
 
                this._presenter = value;  
                thisthis._presenter.View = this;  
            }  
        }  
 
        #region IDefaultView Members  
 
        public void SetDataSource(List<ISentimentDomain> aDomains)  
        {  
            RadGrid1.DataSource = aDomains;  
            RadGrid1.DataBind();  
        }  
 
        protected void RadGrid1_OnItemCommand(object source, GridCommandEventArgs e)  
        {  
            if ("Select" == e.CommandName)  
            {  
                GridDataItem row = e.Item as GridDataItem;  
                TableCell did = row["domain"];  
 
                this._presenter.OnDomainSelected(did.Text);  
            }  
        }  
 
        protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)  
        {  
            if (e.Item is GridDataItem)  
            {  
                GridDataItem row = e.Item as GridDataItem;  
                TableCell dom = row["domain"];  
                Image img = row["thumb"].FindControl("thumb") as Image;  
                img.ImageUrl = "~/img/delete.gif";  
                this.RadToolTipManager1.TargetControls.Add(img.ClientID, dom.Text, true);  
            }  
        }  
 
        public void SetError(string sError)  
        {  
            Session["errormsg"] = sError;  
            Response.Redirect("~/Errors/WebAppError.aspx", true);  
        }  
 
        #endregion  
 
    }  
}  
 
 
Kevin
Top achievements
Rank 2
 answered on 13 Apr 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?