Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
127 views
I have a aspx page with the following markup. The issue i'm having is that the master table shows the expected records but the detail view always shows zero rows. If I manually set the session variable (Session["LoggerSN"] = "0050C230ED8B";) in the page load event than I get the rows I would expect in the detail view of the grid.

How/When does the SessionParameter get loaded for LoggerSN?

 <SelectParameters>
                <asp:SessionParameter Name="LoggerSN" SessionField="LoggerSN" Type="String"/>
            </SelectParameters>

What am I doing wrong???

<body>
    <form id="form1" runat="server">
    <div>
    
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
        </telerik:RadScriptManager>
    
        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false"    
            DataSourceID="LoggerDictionary" GridLines="None" AllowSorting="True" Skin="Vista"
                AllowPaging="True" AllowAutomaticUpdates="True" AllowAutomaticInserts="True"
                AllowAutomaticDeletes="True"
                ShowStatusBar="True" PageSize="15"><PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
<MasterTableView DataKeyNames="LoggerSN" DataSourceID="LoggerDictionary" AllowMultiColumnSorting="True" AllowAutomaticDeletes="true" AllowAutomaticUpdates="true"
                    AllowAutomaticInserts="true" CommandItemDisplay="Top">

    <DetailTables>
        <telerik:GridTableView  runat="server" DataKeyNames="LoggerSN" Width="100%"
            DataSourceID="RTDictionary" AllowAutomaticDeletes="True"  
            AllowAutomaticInserts="True" AllowAutomaticUpdates="True"
            AutoGenerateColumns="True" HierarchyLoadMode="ServerBind">
            <RowIndicatorColumn Display="false">
                <HeaderStyle Width="20px" />
            </RowIndicatorColumn>
            <ExpandCollapseColumn Display="false">
                <HeaderStyle Width="20px" />
            </ExpandCollapseColumn>
        </telerik:GridTableView>
    </DetailTables>
    
    <ParentTableRelation>
        <telerik:GridRelationFields DetailKeyField="LoggerSN" MasterKeyField="LoggerSN"/>
    </ParentTableRelation>
    
    
<RowIndicatorColumn Visible="false">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>

<ExpandCollapseColumn Visible="True">
<HeaderStyle Width="19px"></HeaderStyle>
</ExpandCollapseColumn>
    <Columns>
        <telerik:GridBoundColumn DataField="LoggerSN" HeaderText="LoggerSN"
            ReadOnly="True" SortExpression="LoggerSN" UniqueName="LoggerSN">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="SiteID" HeaderText="SiteID"
            SortExpression="SiteID" UniqueName="SiteID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="LoggerDescription"
            HeaderText="LoggerDescription" SortExpression="LoggerDescription"
            UniqueName="LoggerDescription">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="LoggerType" DataType="System.Int16"
            HeaderText="LoggerType" SortExpression="LoggerType" UniqueName="LoggerType">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="DomainName" HeaderText="DomainName"
            SortExpression="DomainName" UniqueName="DomainName">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="UTC_Offset" DataType="System.Int16"
            HeaderText="UTC_Offset" SortExpression="UTC_Offset" UniqueName="UTC_Offset">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="DST_Adjustment" HeaderText="DST_Adjustment"
            SortExpression="DST_Adjustment" UniqueName="DST_Adjustment">
        </telerik:GridBoundColumn>
    </Columns>
</MasterTableView>
        </telerik:RadGrid>
    
        <asp:SqlDataSource ID="RTDictionary" runat="server"
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" ConflictDetection="CompareAllValues"
            SelectCommand="SELECT LoggerSN, ModBusID, ChannelOrder, ChannelName, MinSeconds, Disabled FROM RealTimeDeviceDictionary WHERE LoggerSN = @LoggerSN">
            <SelectParameters>
                <asp:SessionParameter Name="LoggerSN" SessionField="LoggerSN" Type="String"/>
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="LoggerDictionary" runat="server"
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" ConflictDetection="CompareAllValues"
            DeleteCommand="DELETE FROM [LoggerDictionary] WHERE [LoggerSN] = @LoggerSN"
            InsertCommand="INSERT INTO [LoggerDictionary] ([LoggerSN], [SiteID], [LoggerDescription], [LoggerType], [DomainName], [UTC_Offset], [DST_Adjustment]) VALUES (@LoggerSN, @SiteID, @LoggerDescription, @LoggerType, @DomainName, @UTC_Offset, @DST_Adjustment)"
            SelectCommand="SELECT [LoggerSN], [SiteID], [LoggerDescription], [LoggerType], [DomainName], [UTC_Offset], [DST_Adjustment] FROM [LoggerDictionary] WHERE ([LoggerType] = @LoggerType)"
            UpdateCommand="UPDATE [LoggerDictionary] SET [SiteID] = @SiteID, [LoggerDescription] = @LoggerDescription, [LoggerType] = @LoggerType, [DomainName] = @DomainName, [UTC_Offset] = @UTC_Offset, [DST_Adjustment] = @DST_Adjustment WHERE [LoggerSN] = @LoggerSN">
            <SelectParameters>
                <asp:Parameter DefaultValue="250" Name="LoggerType" Type="Int16" />
            </SelectParameters>
            <DeleteParameters>
                <asp:Parameter Name="LoggerSN" Type="String" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="SiteID" Type="String" />
                <asp:Parameter Name="LoggerDescription" Type="String" />
                <asp:Parameter Name="LoggerType" Type="Int16" />
                <asp:Parameter Name="DomainName" Type="String" />
                <asp:Parameter Name="UTC_Offset" Type="Int16" />
                <asp:Parameter Name="DST_Adjustment" Type="String" />
                <asp:Parameter Name="LoggerSN" Type="String" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="LoggerSN" Type="String" />
                <asp:Parameter Name="SiteID" Type="String" />
                <asp:Parameter Name="LoggerDescription" Type="String" />
                <asp:Parameter Name="LoggerType" Type="Int16" />
                <asp:Parameter Name="DomainName" Type="String" />
                <asp:Parameter Name="UTC_Offset" Type="Int16" />
                <asp:Parameter Name="DST_Adjustment" Type="String" />
            </InsertParameters>
        </asp:SqlDataSource>
    
    </div>
    <telerik:RadAjaxManager runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    </form>
</body>
Iana Tsolova
Telerik team
 answered on 23 Oct 2009
1 answer
128 views
Hello,

 I am currently exporting a aspx page to excel using the below code. This page has multiple RadGrids on it with Headers and Footers. The Problem I am having is that when Exporting to Excel it is putting the Footer row ABOVE the rad grid instead of at the Bottom. Is there a way of correcting this or a work around? Thank you.

This is On Page Load of a GenerateReport.aspx Page which gets called by the ASPX page which is what I am trying to export to excel.

 
            Response.Clear()  
            Response.Charset = "" 
            ''set the response mime type for excel  
            Response.ContentType = "application/vnd.ms-excel" 
 
            HttpContext.Current.Response.AddHeader("content-disposition""attachment;filename=1.xls")  
 
            Dim sw As New StringWriter  
            Server.Execute(Session("ReportFile"), sw)  
 
            Response.Write(sw.ToString.Replace("<div""<span").Replace("</div""</span").Replace("<input id=""ctl00_PageContent", "<span id=""ctl00_PageContent"))  
            Response.End() 

This is one of the RadGrids currently on a aspx page which I am trying to export by doing the server.execute Above.

          
         <telerik:RadGrid ID="dgMonth" runat="server" ShowGroupPanel="False" RecordType="Deposit" AutoGenerateColumns="True" EnableEmbeddedskins="false" 
                RecordCountString="Total Record Count: {0}" Width="700px" RecordCountCssClass="" InsertMode="1"  InsertInDialogWindow="0" EnableAJAXLoadingTemplate="True"   
                DataActiveField="Active" BorderWidth="1px" ShowFooter="True"  GridLines="None" PagerStyleVisible="False" FooterStyle-BackColor="AliceBlue" > 
            <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" Visible="False"   /> 
            <ClientSettings AllowDragToGroup="True"></ClientSettings> 
            <MasterTableView CommandItemDisplay="Top" ShowHeader="True" Width="100%" DataKeyNames="MonthlyDate" ShowFooter="true" EditMode="InPlace">  
                 <EditFormSettings> 
                    <PopUpSettings ScrollBars="None"></PopUpSettings> 
                </EditFormSettings> 
                <CommandItemTemplate> 
                    <asp:LinkButton ID="lnkInsert" runat="server" Visible="false" CommandName="InitInsert" CausesValidation="false"<img style="border:0px" alt="" src="../images/AddRecord.gif" />Add New Interim Deposit</asp:LinkButton> 
                </CommandItemTemplate> 
                <CommandItemSettings AddNewRecordImageUrl="AddRecord.gif" RefreshImageUrl="Refresh.gif">  
                </CommandItemSettings> 
                  <FooterStyle BackColor="White" ForeColor="Black" Font-Size="12pt"   
                        Font-Bold="False"   HorizontalAlign="Right" /> 
 
            </MasterTableView> 
            <HeaderContextMenu EnableEmbeddedSkins="False" EnableTheming="True">  
            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
            </HeaderContextMenu> 
            <FilterMenu EnableEmbeddedSkins="False" EnableTheming="True">  
                <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
            </FilterMenu> 
        </telerik:RadGrid> 


Sebastian
Telerik team
 answered on 23 Oct 2009
1 answer
147 views

Hi ,

Is there any option to set custom sort image url?

I tried with SortAscImgUrl and SortDscImg url.

But i am getting the image with white Backgroud .Attached the Screen shot.

Is there any option to set custom url or any reffrence link

Thanks
senthil

Pavlina
Telerik team
 answered on 23 Oct 2009
6 answers
142 views
Hello,

I'm using version 2009.1.311.20 and IE 8. I would like to be able to change the position of the datepicker's popup, but can't figure out how to do it since the datepicker is in the RadGrid. If I could do it server side that would be fine as I am utilizing the item created event of the RadGrid and would like to place the code there.

Thanks,
Casey
Casey
Top achievements
Rank 1
 answered on 23 Oct 2009
1 answer
73 views
The Self Hierarchy grid's Child rows bound correctly if we bind the grid source in the Page Load event.
If we bind the Self  Hierarchy Grid in the button click event the child rows are bounded twice. The child rows first bound with the parent row and also bound as row which has no child records.
We used datatable as to bind the grid and rest of the things are same as explained in the below exmaple link
http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/selfreferencing/defaultcs.aspx

Sebastian
Telerik team
 answered on 23 Oct 2009
2 answers
137 views

Several years ago we built an application that utilizes the RadTreeView control.  The application worked fine upon deployment to the web server. Recently, the customer who owns the application switched hosting companies. Since the switch, the page that uses the RadTreeView control will not render completely on the new company's web server.

The symptoms of the problem are that the page begins to load, then will hang indefinitely. All other pages on the site work properly. Viewing the source, one can see that the page rendering seems to stop mid-line before the entire tree view markup is sent to the browser.  The problem can be seen on this test page: Tree View Rendering Problem Example

The markup for the test page has been made very simple. There is no code-behind being utilized:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RenderTest.aspx.cs" Inherits="Virtuoso.RenderTest" Theme="Admin"%> 
 
<%@ Register Assembly="RadTreeView.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %> 
 
<!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="Head1" runat="server">  
    <title>Untitled Page </title> 
</head> 
<body> 
    <form id="form1" runat="server">  
      
<rad:RadTreeView ID="rtvMenu" runat="server" DragAndDrop="true" MultipleSelect="false" 
                DataSourceID="SiteMapDataSource1" EnableViewState="true" AutoPostBack="true" 
                DataTextField="Title" DataFieldID="SiteMapMenuID" DataFieldParentID="Parent" 
                Skin="Web20" > 
                                </rad:RadTreeView> 
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" SiteMapProvider="SqlSiteMapProvider" /> 
 
</form> 
</body> 
</html> 

I have done some experimentation and determined that the TreeView will render completely if it is not bound to the SiteMapDataSource.

Obviously, since the test code works fine in our development environment, on our test server and worked fine for over a year at the previous hosting company's server, it appears to be an issue with the server of the new host provider.  However, as a developer I will be expected to contact the hosting company and explain to them what needs to be done to fix the problem. From my previous dealings with this hosting company, I am skeptical they have the knowledge to fix the issue without me telling them exactly the steps to take. However, I am at a loss as to what could cause this issue.

I would appreciate any insight into how this could be resolved.  Thanks!

Terry
Top achievements
Rank 1
 answered on 23 Oct 2009
2 answers
136 views
Hi all,

Is there any way of uploading video straight to the YouTube server using radUpload?
If you don't guess what I mean, please, take a look at this http://code.google.com/apis/youtube/2.0/developers_guide_dotnet.html#Browser_based_Upload

Thanks a lot

Giorgi
Giorgi Zautashvili
Top achievements
Rank 1
 answered on 23 Oct 2009
0 answers
92 views

I have this in a test page

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm3.aspx.cs" Inherits="PulsionTechnology.RefugeeCouncil.WebForm3" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
         <telerik:RadScriptManager runat="Server" ID="RadScriptManager1" />
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="RadScheduler1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
           
            <telerik:RadScheduler runat="server" ID="RadScheduler1" Width="500px" TimeZoneOffset="03:00:00"
                SelectedDate="2007-03-30" DayStartTime="08:00:00" DayEndTime="18:00:00"
                OnDataBound="RadScheduler1_DataBound" Skin="WebBlue">
                <Localization AdvancedAllDayEvent="All day"></Localization>
                <AdvancedForm Modal="true" />
            </telerik:RadScheduler>
    </div>
    </form>
</body>
</html>

And Code Behind

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;

namespace PulsionTechnology.RefugeeCouncil
{
    public partial class WebForm3 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        // You can safely ignore this method.
        // Its purpose is to limit the changes to the underlying data only to the active user session.
        protected void Page_Init(object sender, EventArgs e)
        {
            XmlSchedulerProvider provider;

            provider = new XmlSchedulerProvider(Server.MapPath("~/App_Data/Appointments.xml"), false);
            RadScheduler1.Provider = provider;
        }

 

        protected void RadScheduler1_DataBound(object sender, EventArgs e)
        {
            // Turn off the support for multiple resource values.
            foreach (ResourceType resType in RadScheduler1.ResourceTypes)
            {
                resType.AllowMultipleValues = false;
            }
        }
    }
}

I am getting a postback and no ajax asynchronous postback - what am I missing?

Gregor Suttie
Top achievements
Rank 1
 asked on 23 Oct 2009
1 answer
76 views
I have this code:

string text1="function teditDelayedScript() {    if (window.confirm('Se eliminara el registro seleccionado')) __doPostBack('ctl00$mpContentMain01_01$MotorTipoEditor','deleteselected');  }  window.setTimeout('teditDelayedScript()',300);";

radajaxpanel01.ResponseScripts.Add(text1);


How do I need to do for doing this working ok, after a callback?


This code is generated after a postback, so the content of the text1 variable is assigned dynamically on the server side.
__doPostBack('ctl00$mpContentMain01_01$MotorTipoEditor','deleteselected');
Johny
Top achievements
Rank 1
 answered on 23 Oct 2009
3 answers
63 views
How would I go about adding the record count beneath the title of a pdf document created using the ExportToPdf functionality of RadGrid? Seems like a simple task, but haven't been able to figure it out yet. Any help would be greatly appreciated!
Michael
Top achievements
Rank 1
 answered on 23 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
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
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?