Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
94 views
I am doing a manual update from a button click in my radgrid.

The problem that I am having is that after I have done all the insert processes, I cannot get teh edititemtemplate to close and put the radgrid back to its normal grid listing. How do I close the edittemplate?
Andrey
Telerik team
 answered on 06 Nov 2012
2 answers
28 views
Hi,

The following function is working fine in IE but the sliders are not displayed in Chrome or Firefox.

If I replace "var MyAmount = slider1.get_value();" by "var MyAmount = "1000" and the same for "var MyDuration" all is perfect.
Is it a known issue ?

Any idea about how to fix that problem to make it works in all the browsers ?

Thanks for your support ...

Herve

function RefundRange() {

        var slider1 = $find('<%= RsAmount.ClientID %>');
        var MyAmount = slider1.get_value();

        var slider2 = $find('<%= RsDuration.ClientID %>');
        var MyDuration = slider2.get_value();
       
        var MiniRefund = Math.round((((MyAmount * 7) / 100) + MyAmount) / MyDuration);
        var MaxiRefund = Math.round((((MyAmount * 14) / 100) + MyAmount) / MyDuration);


        SpanMiniRefund.innerHTML = "CHF " + MiniRefund + ".-";
        SpanMaxiRefund.innerHTML = "CHF " + MaxiRefund + ".-";
}

        
        
Herve
Top achievements
Rank 2
 answered on 06 Nov 2012
3 answers
71 views
Hello,
I'm trying to put SSRS ReportViewer controls in a RadMultiPage controlled by a RadTabStrip and RadAjaxManager.  When changing to a different tab I get the following js error for the report element:

Microsoft JScript runtime error: Sys.ArgumentException: Value must not be null for Controls and Behaviors.
Parameter name: element

<asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadTabStrip1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" AutoPostBack="true" MultiPageID="RadMultiPage1">
        <Tabs>
            <telerik:RadTab Text="Tab1">
            </telerik:RadTab>
            <telerik:RadTab Text="Tab2">
            </telerik:RadTab>
        </Tabs>
    </telerik:RadTabStrip>
    <telerik:RadMultiPage ID="RadMultiPage1" runat="server">
        <telerik:RadPageView ID="RadPageView1" runat="server">
            <rsweb:ReportViewer ID="ReportViewer1" runat="server" ProcessingMode="Remote">
                <ServerReport ReportPath="myPath" ReportServerUrl="myUrl" />
            </rsweb:ReportViewer>
        </telerik:RadPageView>
        <telerik:RadPageView ID="RadPageView2" runat="server">
            <rsweb:ReportViewer ID="ReportViewer2" runat="server" ProcessingMode="Remote">
                <ServerReport ReportPath="myPath" ReportServerUrl="myUrl" />
            </rsweb:ReportViewer>
        </telerik:RadPageView>
    </telerik:RadMultiPage>


Any idea what's going on?  I also tried the above by adding the reportviewers in the UpdatedControls section of the AjaxManager but that still threw an error:

<telerik:AjaxUpdatedControl ControlID="ReportViewer1" />


   I was able update the report with a normal UpdatePanel, but can't get this working.
Maria Ilieva
Telerik team
 answered on 06 Nov 2012
9 answers
137 views
I've been following the example here to allow a control in my CommandItemTemplate to export the grid to Excel.

http://www.telerik.com/community/code-library/aspnet-ajax/general/export-radgrid-content-to-excel-word-csv-pdf-with-ajax-enabled.aspx

When the page initially loads, the button works as expected and the performs the post-back which allows the data in the grid to be exported. However, if I were to press another button (not the export button) that DOES cause an Ajax response, then when I click the export button, the export button no longer causes a post-back. It's like it has reverted back to being ajaxified. 

This is in my RadGrid.ItemCreated event where I Register the Post Back on my export buttons

if (e.Item is GridCommandItem)
{
    ImageButton btnExport = (e.Item as GridCommandItem).FindControl("btnExport") as ImageButton;
    LinkButton btnExportLink = (e.Item as GridCommandItem).FindControl("btnExportLink") as LinkButton;
    RadScriptManager scriptManager = (RadScriptManager)Master.FindControl("RadScriptManager1");
    if (scriptManager != null)
    {
        scriptManager.RegisterPostBackControl(btnExport);
        scriptManager.RegisterPostBackControl(btnExportLink);
                        
    }
}

If I click a different button that causes an ajax request it breaks the exporting button. Code below that breaks the exporting.

void btnGo_Command(object sender, CommandEventArgs e)
{
    WeekNumber = Convert.ToInt32(ddlWeek.SelectedValue);
    Year = Convert.ToInt32(ddlYear.SelectedValue);
             
    SetWeekSelectWarningMessage(WeekNumber);
    SetMissingTotalsCount();
    SetPendingTotalsCount();
    grdTimecards.Rebind();
}
Kostadin
Telerik team
 answered on 06 Nov 2012
11 answers
789 views
Hello!
I have a RadGrid inside of RadWindow...
I need to select a Radgrid row in clientside...
How can I do that? 

I´m trying to get the radgrid like that: 
var masterTable = $find("<%=radgridID.ClientID%>").get_masterTableView();

but always getting null... 

Any help?


Bhavesh
Top achievements
Rank 2
 answered on 06 Nov 2012
1 answer
83 views
Hi,
Is there anyway to get the icons for the editor command buttons? Specifically, I am creating a custom version of the image manager and would like to use the icon that comes with the standard version but I can't find it in my files.
Thanks,
Matt


P.S. When I say that I am making a custom version, I just mean the button; I'm not customizing the image manager dialog.
Bozhidar
Telerik team
 answered on 06 Nov 2012
7 answers
314 views
Hi,

I am implementing RadTreeview Context menu. It working fine when user right click on it.. but I wanted to display the context menu when user leftclick on it..

Can you please provide some code related to displaying contextmenu when user leftclick on the RadTreeview..?
James
Top achievements
Rank 1
 answered on 06 Nov 2012
2 answers
646 views
Hi there, I have a radtreeview which has a context menu which works perfectly on right click. When a user right clicks on a node in the tree the context menu will appear with options such as "delete [course name]", "edit [course name]", and "add [course name]". Where [course name] is is where the name of the node they are clicking on will go which also works perfectly. My tree view is like this:

ALL COURSES [ROOT]
COURSE GROUP NAME
COURSE
COURSE

Each level on the tree has a slightly different context menu as some have more options than the others. So far I have managed to get a context menu to appear on left click, but all this does is make the biggest context menu appear no matter which node is clicked on and where the course name should be [course name] is displayed instead of the actual course name. But when I right click and then left click the context menu works fine but right click is needed before hand.

Here is part of my asp tree code:
<telerik:RadTreeView ID="UsersTreeView" runat="server" Height="100%" Width="400px"
                OnNodeEdit="UsersTreeView_NodeEdit" OnNodeExpand="UsersTreeView_NodeExpand"
                OnNodeCollapse="UsersTreeView_NodeCollapse" AllowNodeEditing="True" EnableDragAndDrop="True"
                OnContextMenuItemClick="TreeView_ContextMenuItemClick" OnClientContextMenuShowing="UsersTreeView_onClientContextMenuShowing"
                OnClientContextMenuItemClick="UsersTreeView_onClientContextMenuItemClicking"  OnClientNodeClicking="UsersTreeView_onNodeClicking" 
                MultipleSelect="True" OnNodeDrop="UsersTreeView_HandleDrop" >
                <ContextMenus>
                    <telerik:RadTreeViewContextMenu ID="UserGroupContextMenu" runat="server">

AND here is the JavaScript being used:
function UsersTreeView_onClientContextMenuShowing(sender, args) {
    sender.unselectAllNodes();
    var treeNode = args.get_node();
    treeNode.set_selected(true);
    //enable/disable menu items
    UsersTreeView_setMenuItemsState(args.get_menu().get_items(), treeNode);
}

function UsersTreeView_onClientContextMenuItemClicking(sender, args) {
    var menuItem = args.get_menuItem();
    var treeNode = args.get_node();
    menuItem.get_menu().hide();

    switch (menuItem.get_value()) {
        case "add":
        //case "addroot":
        case "edit":
        //case "user_viewcourses":
        case "user_assigncourses":
        case "group_assigncourses":
        case "group_assigncoursessub":
        //case "moveroot":
        case "delete":
            break;
    }
}

AND currently for left click I am using this:
    function UsersTreeView_onNodeClicking(sender, args) {
            var domEvent = args.get_domEvent();
            var menu = $find("<%= UserGroupContextMenu.ClientID %>");
            args.set_cancel(true);
            menu.show(domEvent);
        }

Now I do realize that with my left click code this is needed somewhere:
UsersTreeView_setMenuItemsState(args.get_menu().get_items(), treeNode);

Its used within the default right click code to decide the correct context menu needed but I've tried adding it to my left click code and just cant seem to get it working. I have searched like mad round the forums and Google but for my specific problem I have been unable to find an answer, for all I know it could be impossible to do? 

Thanks, James
James
Top achievements
Rank 1
 answered on 06 Nov 2012
5 answers
131 views
Hello,

I have a master page with an asp menu.  On a content page I have a RadListBox that is hiding part of the menu.  I've tried setting the position to relative and the z-index higher in a div surrounding the menu but nothing seems to make a difference.  This is in IE7.  Any suggestions?

Thanks,
Casey

Simon
Top achievements
Rank 1
 answered on 06 Nov 2012
5 answers
109 views
I'm getting problems showing appointment with a recursive rule.

This is the code of the scheduler from the aspx:

<telerik:RadScheduler ID="scheduler" runat="server" SelectedView="MonthView" DataKeyField="ID" DataStartField="Start"
     DataEndField="End" DataSubjectField="Subject"  OverflowBehavior="Expand">
</telerik:RadScheduler>


And this is the code that I used to insert the appointment:

DateTime startAppointment = new DateTime(2012, 10, 22, 0, 0, 0);
DateTime endAppointment = new DateTime(2012, 10, 22, 10, 0, 0);
TimeSpan startRecurrence = new TimeSpan(00, 00, 00);
TimeSpan endRecurrence = new TimeSpan(10, 00, 00);
 
Telerik.Web.UI.Appointment appointment = new Telerik.Web.UI.Appointment("1", startAppointment, endAppointment, "demo");
 
RecurrenceRange range = new RecurrenceRange();
range.Start = startAppointment;
range.EventDuration = endRecurrence - startRecurrence;
range.MaxOccurrences = Int32.MaxValue;
 
RecurrenceDay dias = RecurrenceDay.EveryDay;
WeeklyRecurrenceRule rrule = new WeeklyRecurrenceRule(1, dias, range);
appointment.RecurrenceRule = rrule.ToString();
scheduler.InsertAppointment(appointment);

If I insert the appointment and I check it at runtime the value of "rrule.Occurrences.Count()" it returns 3000 but the scheduler only shows 21. What's the problem? Why the scheduler doesn't show all the occurrences?

Best Regards
Plamen
Telerik team
 answered on 06 Nov 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?