Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
119 views

I am working with the RadButton inside the User Control...

<telerik:RadButton ID="tbnCancel"
                   runat="server"
                   Text="Cancel"
                   OnClientClicked="CloseEditFormTodoList" >
</telerik:RadButton>

And I am Calling javascript Function for Closing User Control


function CloseEditFormTodoList(sender, eventArgs) {

    var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
    masterTable.cancelAll();
    return false;
}

My User Control was Closed But the Page is postback.

How to avoid Postback?




Slav
Telerik team
 answered on 06 Feb 2013
1 answer
152 views
I want to add some data to my scheduler with my common RadScheduler1_AppointmentInsert method but somehow its not working ...  maybe I'm totally wrong but I thing that should work some how like that ... 
do i need to parse some thing bc
Tilte = Varchar
FromDate/ToDate = DateTime
RecurrenceRule/RecurrenceRuleID = int
Houers = float 
protected void RadScheduler1_AppointmentInsert(object sender, SchedulerCancelEventArgs e)
       {
           if (ExceedsLimit(e.Appointment))
           {
               e.Cancel = true;
               RegisterScript();
           }
           else
           {
                
               int id = HtUser.GetUserIdByLogin(Page.User.Identity.Name);
               //e.Appointment.Attributes.Add("UserId", id.ToString());
               HtVacationDay vacationDay = new HtVacationDay();
 
               vacationDay.Title = e.Appointment["Title"];
               vacationDay.FromDate =e.Appointment["FromDate"];
               vacationDay.ToDate = e.Appointment["ToDate"];
               vacationDay.RecurrenceRule = e.Appointment["RecurrenceRule"];
               vacationDay.RecurrenceRuleID = e.Appointment["RecurrenceRuleID"];
               vacationDay.Hours = e.Appointment["Hours"];
           }
       }
thanks for help and fast answer 
Plamen
Telerik team
 answered on 06 Feb 2013
4 answers
307 views
Hello. I do not know if this is covered in any of your online documentation, but I could not find my answer anywhere on your site.

I am trying to have "liquid" tab widths in our implementation of your RadTabStrip component (i.e., conforming ONLY to the width that the text in the tab takes up, so not a fixed width, but with the same padding, alignment, etc. for each tab) not utilizing the components pre-existing skins but utilizing a background image of our own creation. It seems like this liquid type of layout that expands or contracts based on text in the tab occurs automatically when using Telerik skins in the demos. What styling information do I have to give the tabs (either for the strip itslef and/or the <ul>, <li>, etc.) so that it can achieve this liquid width for each tab.

Thank you for your prompt attention. jk
Jeanne
Top achievements
Rank 1
 answered on 06 Feb 2013
2 answers
549 views
So I have a radgrid on a form. right before the radgrid aspx code starts, I have set the row property of visible = false (ex:
<tr runat="server" id="rw1" visible="false">
On my code behind (using VB.NET) I have set the btnShowGrid_Click event to this:
rw1.visible = true
grd1.visible=true
btnHideGrid.visible = true
....
The problem I am encountering is that I press this button for the first time on the form and it will only show the row, so I have to click it again to show the radgrid.
When I click on the "Hide Grid" button, the row and grid hide, and then I click the "Show Grid" button again and everything is displayed, I dont need to click on it again.
Why is this happening?

By the way the radgrid visible property is set to true not false.
Carina
Top achievements
Rank 1
 answered on 05 Feb 2013
2 answers
168 views
I encoutered different problems with RadCalendar and his Header/Footer Templates:

1 - When I define a Telerik control (e.g. RadButton or RadComboBox) in the Header or Footer, then when I use $find on another Telerik control (a control which is not on the template) it return null, which was working before I add the control to the template.

2 - Because of problem #1, I use standard ASP controls like asp:Button and asp:DropDrownList but when these control are not added to the designer by Visual Studio so I cannot access them from C# or with "<%= MyControl.ClientID %>". I have to hardcode the final ID in javascript to be able tp use $get, which is not easy because my calendar is in a User Control so the ID is hard to predict.

3 - In the header template, when I put my asp:DropDownList, the control is visible but the list items is not shown. I think the list is under the calendar because when I put the control in the footer I can see it. I tried to set a very high z-index to the DropDownList with no success. I also tried to put a lower z-index to the calendar with no success either.

Any suggestions to fix these bugs...
Marc
Top achievements
Rank 1
 answered on 05 Feb 2013
1 answer
185 views
So I've got a control that uses a radcombobox. Said control exists in two nearly identical pages, but on one of the pages it's empty. Doing a step through on the codebehind shows that the datasource is binding correctly and is populated with information.

So I'm left here scratching my head trying to figure out why the combobox on this one page is always empty. In both cases the combobox is in a separate table above a radgrid, and is loaded when the grid calls it's NeedDataSource function on postback (after search, the box is used to determine an action to take against an item in the list).

It looks as if everything is fine on the server side.

<telerik:RadComboBox id="actionbox1" Runat="server"
        ToolTip="Select a Bill action" MarkFirstMatch="True" EnableLoadOnDemand="false" ShowDropDownOnTextboxClick="False" Width="176px">
</telerik:RadComboBox>
Chris
Top achievements
Rank 1
 answered on 05 Feb 2013
2 answers
3.0K+ views
hi,

I have rad grid control and radcompobox, now whenever I change radcombobox index, the page is post back and RadGrid1_NeedDataSource will be fired again with different datasource (because when changing combobox index the sql statment is changed and datatable is changed too) and the grid should be changed, but the problem its remaining same as it is!!

when I click refresh button in radgrid, then content of grid changed!

so the question would be, how to refresh datagrid after assigning datasource to different table?
Fernando
Top achievements
Rank 1
 answered on 05 Feb 2013
4 answers
184 views

I want to use the RadChart component. To try it, I first used the Telerik demo for scrolling and zooming (http://demos.telerik.com/aspnet-ajax/chart/examples/newfeatures/zoomingscrolling/defaultcs.aspx) and it works.

But when I put this code in our application, the chart is not renderer properly after the first page load, no data is shown and the loading image still there. It happen if I show the loading panel on page load as described on Telerik on-line documentation (http://www.telerik.com/help/aspnet-ajax/ajax-show-loadingpanel-on-initial-pageload.html).

I tried to bind data again on ajax request without sucess as in this post (http://www.telerik.com/community/forums/aspnet-ajax/ajax/show-loading-panel-on-initial-page-load.aspx) except I remake the entire data source because the chart don`t have a Rebind() method.

Anybody have an idea about how to use the RadChart component and still having a loading panel on page load?

Thanks.

Here is my source code

ASP
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestChart.aspx.cs" Inherits="MyWebApplication.TestChart" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Charting" Assembly="Telerik.Web.UI" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            // Show Ajax Loading Panel while loading the page
            function pageLoad(sender, eventArgs) {
                if (!eventArgs.get_isPartialLoad()) {
                    $find("<%= radAjaxManager.ClientID %>").ajaxRequest("InitialPageLoad");
            }
        }
        </script>
    </telerik:RadCodeBlock>
</head>
<body class="BODY">
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>

        <telerik:RadAjaxManager ID="radAjaxManager" runat="server" DefaultLoadingPanelID="radAjaxLoadingPanel" OnAjaxRequest="radAjaxManager_AjaxRequest">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="radAjaxManager">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="radAjaxManager" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>

        <!-- Ajax Loading Panel: Takes entire page and image center on it -->
        <telerik:RadAjaxLoadingPanel ID="radAjaxLoadingPanel" runat="server" IsSticky="True" Style="height: 100%; width: 100%;">
        </telerik:RadAjaxLoadingPanel>

        <div class="bigModule">
            <div class="bigModuleBottom">
                <div class="title">
                    To test the Zooming and Scrolling capabilities on this demo:</div>
                <ul>
                    <li>Zoom to a portion of the chart by dragging and selecting with the mouse a rectangle&nbsp;to
                        set a new scale for the chart. AJAX retrieves the visible "chunk" of the chart that
                        was selected. You can&nbsp;navigate the chart by scrolling and new image "chunks"
                        are requested on-the-fly.</li>
                        <li>You can also use stand-alone scrolling&nbsp;by explicitly&nbsp;setting EnableZoom="false".&nbsp;You
                            can still provide XScale and YScale factor values on the server-side.</li>
                </ul>
            </div>
        </div>
        <div class="module">
            <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <telerik:RadChart ID="RadChart1" runat="Server" Width="495px" AutoLayout="true" Skin="Mac">
                        <ClientSettings ScrollMode="Both" />
                        <Series>
                            <telerik:ChartSeries DataYColumn="MyColumn" Type="Line">
                            </telerik:ChartSeries>
                        </Series>
                        <Legend Visible="false"></Legend>
                        <ChartTitle TextBlock-Text="Zooming / Scrolling (no initial scaling)">
                        </ChartTitle>
                    </telerik:RadChart>
                </ContentTemplate>
            </asp:UpdatePanel>
            <br />
            <br />
            <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <telerik:RadChart ID="RadChart2" runat="Server" Width="495px" AutoLayout="true" Skin="Mac">
                        <ClientSettings EnableZoom="false" ScrollMode="XOnly" XScale="4" />
                        <Series>
                            <telerik:ChartSeries DataYColumn="MyColumn" Type="Line">
                                <Appearance FillStyle-MainColor="223, 87, 60">
                                </Appearance>
                            </telerik:ChartSeries>
                        </Series>
                        <Legend Visible="false"></Legend>
                        <ChartTitle TextBlock-Text="Scrolling only (initial XScale applied)">
                        </ChartTitle>
                    </telerik:RadChart>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </form>
</body>
</html>

C#
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;

namespace MyWebApplication
{
    public partial class TestChart : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataTable dt = new DataTable();
                dt.Columns.Add(new DataColumn("MyColumn", typeof(int)));

                Random rand = new Random(DateTime.Now.Millisecond);
                for (int i = 0; i < 20; i++)
                {
                    DataRow dr = dt.NewRow();
                    dr[0] = rand.Next(20);
                    dt.Rows.Add(dr);
                }

                RadChart1.DataSource = dt;
                RadChart1.DataBind();

                RadChart2.DataSource = dt;
                RadChart2.DataBind();
            }
        }
        protected void radAjaxManager_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
        {
            // Try rebinding data...
            if (e.Argument == "InitialPageLoad")
            {
                DataTable dt = new DataTable();
                dt.Columns.Add(new DataColumn("MyColumn", typeof(int)));

                Random rand = new Random(DateTime.Now.Millisecond);
                for (int i = 0; i < 20; i++)
                {
                    DataRow dr = dt.NewRow();
                    dr[0] = rand.Next(20);
                    dt.Rows.Add(dr);
                }

                RadChart1.DataSource = dt;
                RadChart1.DataBind();

                RadChart2.DataSource = dt;
                RadChart2.DataBind();
            }
        }
    }
}

Marc
Top achievements
Rank 1
 answered on 05 Feb 2013
4 answers
339 views

We are using the File Explorer with a CustomFileSystemProvider. When a user uploads a file, there is a method to check if the user has access to the share the file is being uploaded to. The method is called CheckWritePermissions:

public override bool CheckWritePermissions(string virtualTargetPath)

The method signature only provides access to the path of the folder. However, we need to also access the filename that is being uploaded as well, to do an additional check to see if the file already exists. At present, there doesn't seem to be any way to do this.

Does anyone know of a way to modify the CustomFileSystemProvider to access the filename when a user uploads documents to a share? Since users can upload multiple documents at a time, the method should show the current filename that is being processed as the files are uploaded.
Vessy
Telerik team
 answered on 05 Feb 2013
4 answers
182 views
Hi.
I wolud like to use JavaScript to get CheckAllItemsCheckBox and set it enabled or disabled for a choosen combobx.
Any ideas how to achieve this?
Mateusz
Top achievements
Rank 1
 answered on 05 Feb 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?