Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
65 views
Hi,

Is it possible to capture timeslot selection end event at client side? onClientTimeSlotClick event is fired whenever I click on a timeslot. Is there an event fired when user finishes selecting a range at client side? Or better OnClientTimeSlotSelecting  and OnClientTimeSlotSelected events will be perfect.

TIA.
Plamen
Telerik team
 answered on 23 May 2012
1 answer
67 views
I have a page where I am using a RadPanelBar as a menu.

I want to kick off an ajax process when a page loads that does some database work and then changes an image on each item in the panelbar according to the results.

So far I have:

<telerik:RadCodeBlock runat="server">
    <script type="text/javascript">
        function pageLoad(sender, eventArgs) {
            if (!eventArgs.get_isPartialLoad()) {
                $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("InitialLoad");
            }
        }
    </script>
</telerik:RadCodeBlock>

Which successfully kicks off my process when the page loads, so I'm good there.

The problem is that the images in the PanelBar never change.

My RadAjaxManager looks like so:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
        onajaxrequest="RadAjaxManager1_AjaxRequest">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="pbMenu">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pbMenu" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

and the work code looks like:

protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e) {
            if (e.Argument == "InitialLoad") {
                RunLoadSim(pbMenu.Items);
            }
        }
 
        private void RunLoadSim(RadPanelItemCollection items) {
            foreach (RadPanelItem i in items) {
                i.ImageUrl = "~/images/menublocks/grey.png";
                RunLoadSim(i.Items);
 
                var start = new ParameterizedThreadStart(Sim);
                var thread = new Thread(start);
                thread.Start(i);
            }
        }
 
        private static void Sim(object arg) {
            var r = new Random();
            var i = r.Next(200, 5000);
            Thread.Sleep(i);
 
            var green = r.Next(0, 2) == 0;
 
            var imgUrl = green ? "green" : "red";
            ((RadPanelItem) arg).ImageUrl = "~/Images/MenuBlocks/" + imgUrl + ".png";
        }

The "work" code is just garbage to simulate db look ups right now.

Basically it sets the image in every panelbaritem to a grey square, then runs a fake worker process that sits for .2 to 5.0 seconds then loads either a green or red image in place of the grey one.

None of the colored squares ever appear though.

What am I doing wrong?

Thanks.
Tsvetina
Telerik team
 answered on 23 May 2012
2 answers
92 views
Hi all,
    In my radgrid there are 5 columns,and each column is having a link button in it. I need to check whether the name in column 3 is blank or not. And if the name field in the column 3 is blank I need to disable the link buttons in 4th and 5th columns. Below added my code and I am getting error with this. Please help me.

protected void GridSample_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
    foreach (GridDataItem item in GridSample.Items) {
        TableCell field_name = (TableCell)item("strName");
        if (field_name.Text == null) {
            Disable link buttons in columns 4 and 5.
        }
    }
}
Thanks in advance.
Janaki
Top achievements
Rank 1
 answered on 23 May 2012
2 answers
63 views
Hi

I use RadSplitter, RadPane and RadSplitBar in masterpage in asp.net but I can't resize or collapse RadPane.

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p></p>
 
     <script type="text/javascript" language="javascript">
 
    </script>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
        <telerik:RadSplitter ID="RadSplitter1" runat="server" Skin="Vista" Width="100%" Height="550px">
            <telerik:RadPane ID="LeftPane" runat="server" Width="350" MinWidth="200">
                left panel
            </telerik:RadPane>
            <telerik:RadSplitBar ID="RadSplitBar1" runat="server" CollapseMode="Forward"/>
            <telerik:RadPane ID="RightPane" runat="server" Scrolling="None" OnclientResized="afterResize">
                right panel
            </telerik:RadPane>
        </telerik:RadSplitter>
    </asp:Content>

If I use them in project without masterpage then it work fine.

Can you help me to solve it.

Thanks.
Hai
Top achievements
Rank 1
 answered on 23 May 2012
2 answers
440 views
Hi Everyone,

I have a scenario where I would like to use a Radconfirm but only if some server side validation warrants it.
I am using a RadAjaxManager on a Masterpage.  I am using RadAjaxManagerProxy on the Page.

Scenario:
I have a Textbox and a Save RadButton.

- Click Save Button
     < Server side check of Database to see if name already exists >

          1) Name already exists - Radconfirm will appear
               - Yes - Perform Save
               - No - close Confirm message

          2) Name does not exist
               - Perform Save

Any suggestions on how to achieve this would be much appreciated.

Thanks

Bran
Brandon
Top achievements
Rank 1
 answered on 23 May 2012
1 answer
76 views
When I change acalendar view in monthyear view, any server script run? If yes, Which one?
Richard
Top achievements
Rank 1
 answered on 22 May 2012
1 answer
87 views
Is possible to change Calendar behaviour when client change month? I want to show some special month instead of sequential monthes.
Richard
Top achievements
Rank 1
 answered on 22 May 2012
1 answer
62 views
Hello,

I am using RadAjax panel for the whole page. I am having listboxes and other labels in my page along with radgrid.

When I move listitem from one listbox to another listbox, I am using radajax panel not to postback.

But after that I see the columns in the RagGrid, 2 of them are disappearing which I am displaying Dynamically.

All other columns are bound columns. What is the reason ?

TIA
Richard
Top achievements
Rank 1
 answered on 22 May 2012
7 answers
160 views
I have a radgid that has a button for each export. (csv,xls,word,pdf) They are all set up the same and they all work except for the csv one. The CSV is only exporting the headers not the data. It used to work and nothing has changed that has anything to do with the export but now it is not working. I have tried the following steps. Rebooted my machine and restarted VS and i have also rerefrenced Telerik.Web.UI.dll and it is still only giving me "MenuId","MenuPageKey","MenuHeader","MenuLinkText","MenuLink","MenuSortOrder","MenuView","MenuHeaderSortOrder"

PDF word and excel all give me full data

below is my radgrid code and the code for the exports.
<telerik:RadGrid ID="RadGrid1" OnSortCommand="RadGrid1_SortCommand" OnPageIndexChanged="RadGrid1_PageIndexChanged" OnNeedDataSource="RadGrid1_NeedDataSource" 
        AllowSorting="True" PageSize="15" AllowPaging="True" runat="server" EnableEmbeddedSkins="false" 
        Skin="EasyEcomm" AutoGenerateColumns="true" ExportSettings-ExportOnlyData="false" ExportSettings-FileName="SqlExport" 
         ExportSettings-OpenInNewWindow="true"
        <PagerStyle Mode="Slider" /> 
        <ClientSettings EnableRowHoverStyle="true"
        </ClientSettings> 
    </telerik:RadGrid> 
    <asp:Label ID="SqlStatementLabel" runat="server" Text=""></asp:Label><br /> 
    <div class="bottom_left_div" runat="server" id="ButtonsDiv"
        <br /> 
        <asp:Button ID="BackButton" runat="server" Text="&lt;&lt; Back" OnClick="BackButton_Click" /><asp:Button 
            ID="ExportCSVButton" runat="server" Text="Export to CSV" OnClick="ExportCSVButton_Click" /> 
            <asp:Button 
            ID="ExportXLSButton" runat="server" Text="Export to XLS" OnClick="ExportXLSButton_Click" /> 
             
            <asp:Button 
            ID="ExportWRDButton" runat="server" Text="Export to Word" OnClick="ExportWRDButton_Click" /> 
            <asp:Button 
            ID="ExportPDFButton" runat="server" Text="Export to PDF" OnClick="ExportPDFButton_Click" /> 
             
             
        
    </div> 

    protected void ExportCSVButton_Click(object sender, EventArgs e) 
    { 
        RadGrid1.MasterTableView.AllowPaging = false
        RadGrid1.MasterTableView.Rebind();  
        RadGrid1.ExportSettings.IgnorePaging = true
        RadGrid1.MasterTableView.ExportToCSV(); 
    } 
   
 
    protected void ExportXLSButton_Click(object sender, EventArgs e) 
    { 
        RadGrid1.MasterTableView.AllowPaging = false
        RadGrid1.MasterTableView.Rebind();  
        RadGrid1.ExportSettings.IgnorePaging = true
        RadGrid1.MasterTableView.ExportToExcel(); 
    } 
 
    protected void ExportWRDButton_Click(object sender, EventArgs e) 
    { 
        RadGrid1.MasterTableView.AllowPaging = false
        RadGrid1.MasterTableView.Rebind();  
        RadGrid1.ExportSettings.IgnorePaging = true
        RadGrid1.MasterTableView.ExportToWord(); 
    } 
 
    protected void ExportPDFButton_Click(object sender, EventArgs e) 
    { 
        RadGrid1.ExportSettings.Pdf.PageHeight = Unit.Parse("162mm"); 
        RadGrid1.ExportSettings.Pdf.PageWidth = Unit.Parse("600mm"); 
        RadGrid1.MasterTableView.AllowPaging = false
        RadGrid1.MasterTableView.Rebind();  
        RadGrid1.ExportSettings.IgnorePaging = true
        RadGrid1.MasterTableView.ExportToPdf(); 
    } 


Thank you for your help
Paul
Top achievements
Rank 1
 answered on 22 May 2012
1 answer
66 views
Please guide me to fix this. How could I customize the telerik RadFilter Control

Advance & Thanks
Tamim
Richard
Top achievements
Rank 1
 answered on 22 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?