Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
182 views
Hi,

Do you have any examples on creating a custom footer?

I'm thinking of creating footer that have several labels like the below example

Qty Price Total
1 10.00 10.00
2 20.00 40.00
SubTotal: 50.00
Discount: <textbox here for user input>
Grand Total: <subtotal + discount>
Shinu
Top achievements
Rank 2
 answered on 18 Feb 2013
1 answer
55 views
Hi;
Please I need your help to lead me, I start to work with "RadScheduler Control"  but I need to synchronize information between the MS-Outlook and my RadScheduler, so how I can do that, I need your advice.
Thanks
Plamen
Telerik team
 answered on 18 Feb 2013
1 answer
159 views
Hi all

I create a grid and create some item template , but still can't remove a border or a separator

a screenshot is attached

and here is my code that attached too

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="GamesArchive.ascx.cs" Inherits="Pages_Controls_Others_GamesArchive" %>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
</telerik:RadAjaxLoadingPanel>
 
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" HorizontalAlign="NotSet"
    Width="800px" BorderColor="#180052">
    <br />
    <telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" runat="server" GridLines="None" MasterTableView-GridLines="None"
        AllowPaging="True" PageSize="10" CellSpacing="0" CellPadding="0" Skin="Web20" Width="800px"
        BackColor="#180052" BorderColor="#180052" BorderWidth="0" GroupingEnabled="False" ShowHeader="False">
        <MasterTableView DataSourceID="SqlDataSource1">
            <ItemTemplate>
                <center>
                    <div style="Width: 700px; height: 123px;">
                        <div style="Width: 120px; height: 120px; float: left; border: red 1px solid;">
                            <center>
                                <asp:Image ID="Image10" runat="server" Height="120px" Width="120px" ImageUrl='<%# "~/Games/Picss/" + Eval("Game_Avatar")%>'></asp:Image>
                            </center>
                        </div>
                        <div style="Width: 100px; height: 120px; float: left;"><br /></div>
                        <div style="Width: 248px; height: 120px; float: left; border: red 1px solid;">
                            <center>
                                <br />
                                <asp:Label ID="Label12" runat="server" ForeColor="White" CssClass="FontNormalBold" Text='<%# Eval("Game_Title")%>'></asp:Label>
                                <br />
                                <asp:Label ID="Label1" runat="server" ForeColor="White" CssClass="FontNormal" Text='<%# "<B>Categroy: </b>" +  Eval("Game_Category")%>'></asp:Label>
                            </center>
                        </div>
                        <div style="Width: 100px; height: 120px; float: left;"><br /></div>
                        <div style="Width: 120px; height: 120px; float: left; border: red 1px solid;">
                            <center>
                                <br />
                                <asp:HyperLink ID="HyperLink8" runat="server" NavigateUrl='<%# "~/Pages/GamesView.aspx?id=" + Eval("Game_ID")%>'>
                                    <asp:Image ID="Image11" runat="server" Height="60px" ImageUrl="~/Pics/Icons/OthersIcons/Game.PNG"></asp:Image>
                                </asp:HyperLink>
                            </center>
                             <asp:Label ID="Label11" runat="server" CssClass="FontNormal" ForeColor="White" Text="Play Now"></asp:Label>
                        </div>
                    </div>
                </center>
            </ItemTemplate>
            
            <CommandItemSettings ExportToPdfText="Export to PDF" />
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
            </ExpandCollapseColumn>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
    </telerik:RadGrid>
</telerik:RadAjaxPanel>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"></asp:SqlDataSource>


thanks in advance
Jayesh Goyani
Top achievements
Rank 2
 answered on 18 Feb 2013
1 answer
1.0K+ views
Hello, 
    I tried searching the forums but I did not find quite what I am looking for.  I would like to remove the horizontal scrollbar from the RadGrid control while still leaving it scrollable.  I am handling the scrolling with the RadSlider control.  What I am trying to do is have a dynamically built grid - no idea how many columns or rows it will have - with a footer, but with the horizontal scrollbar below it all.  We don't want the horizontal scrollbar between the grid data and the footer since the visual presentation is ...off. The ASPX page looks like

<asp:Content ID="Content2" ContentPlaceHolderID="BodyContent" runat="server">
    <script type="text/javascript">
 
        $(document).ready(function () {
 
            $('#divLoading').hide();
 
            $('.monthHeaderRow').click(function () {
                var next;
 
                next = $(this).next();
 
                while (next.hasClass('monthDataRow')) {
                    next.toggle();
                    next = next.next();
                }
            });
 
            $('#divLoading').center();
             
        });
 
        function pageLoad(sender, args) {
            $find("<%= RadSlider1.ClientID %>").set_maximumValue($find("<%= grdTrackingReport.ClientID %>")._gridDataDiv.scrollWidth);
  
        function valueChange(sender, args) {
            var gridDataDiv = $find("<%= grdTrackingReport.ClientID %>")._gridDataDiv;
            if (sender.get_id() == "<%= RadSlider1.ClientID %>") {
                gridDataDiv.scrollLeft = sender.get_value();
            }
            else {
                gridDataDiv.scrollTop = sender.get_value();
            }
        }
    </script>
 
    <telerik:RadGrid ID="grdTrackingReport" runat="server" CssClass="Grid" OnItemDataBound="grdTrackingReport_ItemDataBound">
        <MasterTableView TableLayout="Fixed"></MasterTableView>
        <AlternatingItemStyle BackColor="#e8f2fd"></AlternatingItemStyle>
 
        <ClientSettings>
            <Selecting AllowRowSelect="true"></Selecting>
            <Scrolling AllowScroll="true" UseStaticHeaders="true" />
        </ClientSettings>
    </telerik:RadGrid>
    <center>
       <telerik:RadSlider ID="RadSlider1" runat="server" OnClientValueChange="valueChange" Length="600" />
     </center>
 
</asp:Content>

with a CSS entry of:
.Grid div
        {
            overflow: hidden !important;
        }


Is this possible?  If so, what am I missing?

Thanks,
Mark
Shinu
Top achievements
Rank 2
 answered on 18 Feb 2013
1 answer
636 views
Hi,

I have a RadWindow and I need to display it as a confirm dialog on my Delete RadButton Click. I am setting my Button postback from JavaScript but I think its not working correctly. Please help me with code.

Thanks,
Ben.
Princy
Top achievements
Rank 2
 answered on 18 Feb 2013
2 answers
147 views
Hi,

I have Fromtime & ToTime in my application by using RadTimePicker control.In fromtime, i am displaying from 12:00 AM (Starttime) to 11:30 PM ( Endtime) with 30 min interval ,but if select 11:30 PM only , It's through an exception.It's urgent for me,please give me any solution for this.

Thanks in advance.

Regards
Sekhar.
Purnasekhar
Top achievements
Rank 1
 answered on 18 Feb 2013
1 answer
138 views
Maybe I'm not doing this the right way, but I'm trying to use RadWindow as a dialog box.  When I add controls (dropdownlist, textbox, listbox) to the RadWindow dynamically I'm not able to figure out how to get the new values of these dynamic controls on a postback.

I've tried 2 different approaches to adding the dynamic controls to the Radwindow.  In the first case I added a Panel dynamically to rwinProperties.ContentContainer and I add all my controls to this panel.  I look for the dynamic controls on rwinProperties.ContentContainer.Controls.  But I don't see them there after the postback.  I also tried creating a static Panel inside the ContentTemplate and adding all the dynamic controls to it.  Still no luck.

The postback is created by a radbutton I added statically in the RadWindow in the ContentTemplate.  I'm suspecting

So I'm suspecting that I can't these values from a postback, so how do I get them? 

Thanks
Sub SetSectionProperties(ByVal SectionID As String, SectionCount As String, ByVal SectionName As String)
     
    Dim SectionString As String = SectionID & "__" & SectionCount
    Dim Properties As New clsDashboardProperties(SectionID)
     
    Dim PropertyName As String
    Dim PropertyNameTitle As String
    Dim PropertyDesc As String
    Dim PropertyID As Integer
    Dim PropertyVisible As Boolean
    Dim ValueSet As String = ""
    Dim DefaultValue As String
    Dim ControlType As String = ""
    Dim lbl As Label
    Dim ddl As DropDownList
    Dim lbx As ListBox
    Dim tb As TextBox
    Dim lc As LiteralControl
    Dim ht As Hashtable = Session("SessionProperties")
    Dim pnl As New System.Web.UI.WebControls.Panel
    Dim pnl2 As New System.Web.UI.WebControls.Panel
    Dim oProp As clsDashboardPropertyMapItem
     
    Dim tbl As Table
    Dim tbl2 As Table 'For invisible properties
    Dim rw As TableRow
    Dim cell As TableCell
 
    pnl.ID = "pnlDialog"
    pnl.Width = New Unit("100%")
    pnl.Height = New Unit("100%")
    pnl.BorderWidth = 1
    pnl.BackColor = Drawing.Color.LightGray
    pnl.Visible = True
     
    rwinProperties.ContentContainer.Controls.Add(pnl)
 
    lbl = New Label
    lbl.Text = "<br/><b>  " & SectionName & " " & "Properties</b>"
    pnl.Controls.Add(lbl)
     
    lbl = New Label()
    lbl.Text = "<br/><br/>"
    pnl.Controls.Add(lbl)
     
    If Properties.Count >= 1 Then
        tbl = New Table
        tbl2 = New Table
        tbl2.Visible = False
         
        For Each prop As clsDashboardProperty In Properties
            PropertyName = prop.PropertyName
            PropertyNameTitle = prop.PropertyNameTitle
            ValueSet = prop.ValueSet
            ControlType = prop.ControlType
            PropertyDesc = prop.PropertyDesc
            PropertyID = prop.PropertyID
            PropertyVisible = prop.PropertyVisible
            DefaultValue = prop.DefaultValue
 
            rw = New TableRow()
            cell = New TableCell()
            cell.Width = 10
            cell.Text = " "
            rw.Controls.Add(cell)
             
            cell = New TableCell()
            cell.Text = "<b>" & PropertyNameTitle & ":</b>  "
            rw.Controls.Add(cell)
            cell = New TableCell()
             
            'Add some space
            cell = New TableCell()
            cell.Width = 10
            cell.Text = " "
            rw.Controls.Add(cell)
             
            Dim Values() As String = ValueSet.Split(",")
                     
            If ControlType = "lb" Then
                lbl = New Label
                lbl.Text = Values(0)
                lbl.ID = "lb_" & SectionString & "_" & PropertyID & "_" & PropertyName
                lbl.Visible = PropertyVisible
 
                cell.Controls.Add(lbl)
                         
            ElseIf ControlType = "ddl" Then
                ddl = New DropDownList
                ddl.Items.Add("Default")
 
                For Each Val As String In Values
                    ddl.Items.Add(Val)
                Next
 
                ddl.ID = "ddl_" & SectionString & "_" & PropertyID & "_" & PropertyName
                ddl.Visible = PropertyVisible
 
                ddlSelect(ddl, DefaultValue) 'Go select an item in the list
 
                cell.Controls.Add(ddl)
            ElseIf ControlType = "lbx" Then
                lbx = New ListBox
                lbx.Items.Add("Default")
                lbx.SelectionMode = ListSelectionMode.Multiple
                For Each Val As String In Values
                    lbx.Items.Add(Val)
                 Next
 
                lbx.ID = "ddl_" & SectionString & "_" & PropertyID & "_" & PropertyName
                lbx.Visible = PropertyVisible
 
                lbxSelect(lbx, DefaultValue) 'Go select items in the list
 
                cell.Controls.Add(lbx)
            ElseIf ControlType = "tb" Then
                tb = New TextBox
                tb.ID = "tb_" & SectionString & "_" & PropertyID & "_" & PropertyName
                tb.Text = Values(0)
                tb.Visible = PropertyVisible
 
                cell.Controls.Add(tb)
            ElseIf ControlType = "tbml" Then  'Multiline textbox
                tb = New TextBox
                tb.ID = "tb_" & SectionString & "_" & PropertyID & "_" & PropertyName
                tb.Text = Values(0)
                tb.Visible = PropertyVisible
 
                tb.TextMode = TextBoxMode.MultiLine
                tb.Rows = 4
                tb.Columns = 35
                tb.Font.Name = "Arial"
             
                cell.Controls.Add(tb)
            End If
 
            rw.Controls.Add(cell)
         
            'Add some space
            cell = New TableCell()
            cell.Width = 10
            cell.Text = " "
            rw.Controls.Add(cell)
             
            'Add the description of the property
            cell = New TableCell()
            cell.Text = "<i>" & PropertyDesc & "</i>  "
            rw.Controls.Add(cell)
 
            If PropertyVisible Then
                tbl.Controls.Add(rw)
            Else
                tbl2.Controls.Add(rw)
            End If
        Next
 
        pnl.Controls.Add(tbl)
             
        If tbl2.Rows.Count > 0 Then
            pnl.Controls.Add(tbl2)
        End If
         
        lc = New LiteralControl()
        lc.Text = "<br/>"
 
        pnl.Controls.Add(lc)
    Else
 
        lbl = New Label
        lbl.Text = "    No Properties available for this section.<br/><br/>"
        pnl.Controls.Add(lbl)
    End If
     
    lc = New LiteralControl()
    lc.Text = "  "
    pnl.Controls.Add(lc)      
 
End Sub
 
Sub rbtnUpdateProperties_Click(ByVal sender As Object, ByVal e As System.EventArgs)
     
    Dim pnl As Panel = rwinProperties.ContentContainer.FindControl("pnlDialog")
    For Each Ctl As Control In pnl.Controls
        If Ctl.ID.StartsWith("ddl") Then
            Dim ddl As DropDownList = CType(Ctl, DropDownList)
            Dim name As String = ddl.ID
            Dim value As String = ddl.SelectedValue
            Dim fields() As String = name.Split("_")
     
            AddToProperties(fields(1), fields(3), fields(5), name, value)
        ElseIf Ctl.ID.StartsWith("lbx") Then
            Dim lbx As ListBox = CType(Ctl, ListBox)
            Dim name As String = lbx.ID
            Dim value As String = GetListBoxSelectedValues(lbx)
            Dim fields() As String = name.Split("_")
     
            AddToProperties(fields(1), fields(3), fields(5), name, value)
                     
        ElseIf Ctl.ID.StartsWith("tb") Then
            Dim tb As TextBox = CType(Ctl, TextBox)
            Dim name As String = tb.ID
            Dim value As String = tb.Text
            Dim fields() As String = name.Split("_")
     
            AddToProperties(fields(1), fields(3), fields(5), name, value)
        ElseIf Ctl.ID.StartsWith("tbml") Then
            Dim tb As TextBox = CType(sender, TextBox)
            Dim name As String = tb.ID
            Dim value As String = tb.Text
            Dim fields() As String = name.Split("_")
     
            AddToProperties(fields(1), fields(3), fields(5), name, value)
        End If
    Next
     
    UpdateZone()
End Sub

<telerik:RadWindow runat="server" ID="rwinProperties" Modal="true" Height="450" Width="550" Title="Panel Properties"  CssClass="RadWindow"  >
    <ContentTemplate>
 
            <telerik:RadButton id="rbtnUpdateProperty" runat="server" Text="Update" EnableEmbeddedSkins="false" Skin="SOD_SKIN" AutoPostBack="true" OnClick="rbtnUpdateProperties_Click" />
                       
            <telerik:RadButton id="rbtnClosePropertyWindow" runat="server" Text="Cancel" EnableEmbeddedSkins="false" Skin="SOD_SKIN"    />
 
    </ContentTemplate>
</telerik:RadWindow>
Hunter
Top achievements
Rank 1
 answered on 18 Feb 2013
1 answer
221 views
I want to let some users download some files from my website and I don't want them to see the physical path of the downloading file.
I moved the files in a folder outside of my web folder and use Response.WriteFile(filePath) to download them. this help me to hide the path but this method doesn't support resume download which I really want it.
So what method you recommend I use?
Thanks
moegal
Top achievements
Rank 1
 answered on 17 Feb 2013
2 answers
184 views
When using the RadGrid in the following example the RadGrid height does not account for the height of content in the master page resulting in a vertical scroll bar being displayed. Do you have a recommended approach for correctly resizing the RadGrid when used with a master page?

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Deals.master.cs" Inherits="DueDiligenceGrid.Deals1" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
    <asp:ContentPlaceHolder ID="head" runat="server"></asp:ContentPlaceHolder>
</head>
<body>
    <div style="height: 100px; background-color: Blue;"></div>
    <form id="form1" runat="server">
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
          
        </asp:ContentPlaceHolder>
    </form>
</body>
</html>
  
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Deals.aspx.cs" Inherits="DueDiligenceGrid.Deals" MasterPageFile="~/Deals.Master" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Src="~/Control/DealGrid.ascx" TagName="TelerikDealGrid" TagPrefix="dd" %>
  
<asp:Content ID="HeadContent" ContentPlaceHolderID="head" runat="server">
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <style type="text/css">
            html  
            {   
                overflow:auto; 
            }
                    
            html, 
            body
            {   
                height: 100%;   
                margin: 0px;   
                padding: 0px;  
            }   
        </style>
    </telerik:RadCodeBlock>
</asp:Content>
  
<asp:Content ID="MainContent" ContentPlaceholderID="ContentPlaceHolder1" runat="server">
    <telerik:RadSplitter 
        ID="TelerikDealGridSplitter" 
        runat="server"
        Orientation="Horizontal"
        Width="100%"
        Height="100%">
        <telerik:RadPane 
            ID="TelerikDealSearchPane" 
            runat="server"
            Height="100" 
            MaxHeight="100"
            ShowContentDuringLoad="false">
        </telerik:RadPane>
        <telerik:RadSplitBar 
            CollapseMode="Forward"
            ID="TelerikDealGridSplitBar" 
            runat="server" 
            EnableResize="True">
        </telerik:RadSplitBar>
        <telerik:RadPane ID="TelerikDealGridPane" runat="server" ShowContentDuringLoad="false">
            <telerik:RadScriptManager ID="DealScriptManager" runat="server" />
            <dd:TelerikDealGrid ID="TelerikDealGrid" runat="server" />      
        </telerik:RadPane>
    </telerik:RadSplitter>
</asp:Content>
  
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DealGrid.ascx.cs" Inherits="DueDiligenceGrid.Control.DealGrid" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<telerik:RadAjaxManager ID="TelerikDealGridAjaxManager" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="TelerikDealGrid">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="TelerikDealGrid" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
    <telerik:RadGrid 
        ID="TelerikDealGrid"
        runat="server" 
        OnSortCommand="TelerikDealGrid_SortCommand" 
        OnPageIndexChanged="TelerikDealGrid_PageIndexChanged"
        Width="100%"
        Height="100%" 
        OnPageSizeChanged="TelerikDealGrid_PageSizeChanged" 
        AllowSorting="True"
        PageSize="15" 
        AllowPaging="True" 
        AllowMultiRowSelection="True" 
        ShowGroupPanel="true"
        GridLines="None"
        Style="border: 0;">
        <MasterTableView Width="100%" Summary="Deal table" CommandItemDisplay="TopAndBottom">
            <CommandItemTemplate>
                <div style="height: 30px; text-align: left; background-color:Red">
                  
                </div>
            </CommandItemTemplate>
        </MasterTableView>
        <ClientSettings>
            <Scrolling AllowScroll="true" UseStaticHeaders="true" />
        </ClientSettings>
        <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
    </telerik:RadGrid>
David
Top achievements
Rank 1
 answered on 17 Feb 2013
4 answers
232 views
Having spend way to many hours fighting with the javascript intellisense in VS2010 i am currently looking into ScriptSharp again - though there have been posts in the past I havent seen any comments recently.

If you havent heard of ScriptShart, you can read an overview of it here: http://projects.nikhilk.net/ScriptSharp - i quote,

"Script# is a C# compiler that generates JavaScript (instead of MSIL) for use in Web applications or other script-based applications such as Windows Vista Sidebar gadgets. The primary goal of Script# is to provide a more productive scripting environment for developing Ajax applications that are more maintainable over the long term by leveraging various aspects of the C# development model....."

Is there anyone using / wanting to use ScriptSharp with the telerik client side apis??

Does anyone have ScriptSharp libraries for the Telerik controls (if so, are you willing to share) ?

Is there anyone interested in working together with me to build a set of import libraries for ScriptSharp (my main interest is obviously only in the controls and the mehtods & properties that i need to use, but i am willing to invest some extra time adding all the methods & properties).

...or, what are your feelings about ScriptSharp (and other similar tools), is it a waste of time/effort?? I would love to hear the Telerik communities views on the matter.
Karl Maynard
Top achievements
Rank 1
 answered on 17 Feb 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?