Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
153 views
Currently, I have an aspx page in vb that launches a RadHTMLChart and I want to grab the SVG code of that chart. However, since the chart is rendered client-side, I have to launch this aspx page and then grab the SVG code from a second aspx page during postback. Currently, I am using Server.Execute (firstpage.aspx) to grab the SVG code but this does not work. I want to use the SVG to generate a PDF document but the Server.Execute command seems to run in the background and the code that comes after it do not wait for it to finish first, hence I am not grabbing the SVG content. Does anyone know of another way to grab this SVG content? 
Marin Bratanov
Telerik team
 answered on 28 Jul 2014
2 answers
65 views
I have a User Control MainPage.aspx. Based on the tab clicked, it calls another class Page1.cs.Based on WorkFlow state, this calls another class Page2.cs. Page2 has 5 controls out of which 2 are radgrids. Page 2 has an Update panel, where all the 5 controls are added. Now Page2 to add the 1st grid, calls another class Inner1.cs, which based on certain conditions, calls Inner2 which again calls Inner3.cs which has the RadGrid. Here the RadGrid is simply added as   this.Controls.Add(this._RadGrid1); No panels or updatePanels here.  Inner2 adds Inner3 in a Panel. If Page2 directly adds Inner2 in its update panel, it works good. But as per the application, Page2 has to add Inner1, and hence sorting doesnt work in this case.It can sort one way but on 2nd click it gives back the no sort results. I also tried the onSort_Command function, but on each click it gave None as the current sort value!
Viktor Tachev
Telerik team
 answered on 28 Jul 2014
1 answer
315 views
Hi
this is my OnChenge function

function OnChange(sender, args) {
                if (sender.hasChanges()) {
                    var response;
                    if (sender.get_filterExpressions()._hasFilerEntries) {
                        response = sender.view();
                        alert("filter");
                    }
                    else
                        response = sender.get_data();  // args.get_items();
                    if (response) {
                        //DO SOMETHING
                    }
                }
            }

I would like to find only the records filtered if filters are filled, and all data if there are no filters
Problems:
1. If I have more pages in my grid, sender.view() return only data in the current page
2. If I cancel text in my filter textbox and I press enter
sender.get_filterExpressions()._hasFilerEntries
 is true

thanks
Maria Ilieva
Telerik team
 answered on 28 Jul 2014
9 answers
314 views
When items are being added/updated/deleted on a Telerik Radgrid (Batch editmode/ cell) and are not saved. Clicking on the headers for sorting is discarding the changes made to the grid. How to disable the grid column headers if an item is still in pending state (red).

No sorting functionality enabled in this example.
http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultcs.aspx

Thanks.
Konstantin Dikov
Telerik team
 answered on 28 Jul 2014
1 answer
158 views
Hi,

We are using a Rad Calendar for a control that we integrated into our website.  Which works great.  Until someone uses our "Add to Cart" button.  I have mixed some JS and some of the Rad Calendar JS calls.  

I have a box that, on click, opens my calendar and you can choose a day. Then the user chooses a time from a list when we get a post back from our service.

The issue is, if the user does not choose a "ticket" quantity, and chooses "add to cart," the calendar and the time stays chosen in the background, but my 'mask' resets to the default.  I am using the Rad Calendar to call the functions on the front end to show  and hide my 'masks'.  

How would I write the function so that the 'masks' only show if there no Time and Date chosen, but also make the selections show in the boxes if they are chosen, but "Add to Cart" postback occurs.

So what I need is the Calendar value AND the Time to still show in the boxes if the "Add to Cart" button is chosen and there is an error, such as not quantity.

Any and all help is appreciated.

I have screen shots attached.  I have put notes in the screen shots.


Myc JS and Calendar aspx code is below:

ASPX Code:

<asp:UpdatePanel runat="server" ID="up1" UpdateMode="Always">
<ContentTemplate>
<asp:Panel ID="Panel1" CssClass="ControlPanel" runat="server">
 
<asp:Table runat="server" ID="contents" CssClass="MuseumDateTimeTable">
 
<asp:TableRow ID="trCalendar" runat="server" VerticalAlign="Top">
<asp:TableCell ID="tcCalendar" runat="server" CssClass="CalendarOverallCell">
<div class="MuseumStepHeaderWrapper">
<div class="MuseumVariantStepText">
<asp:Label runat="server" ID="lblMuseumStepOne"><%=GetLocaleResourceString("Museum.StepOne")%></asp:Label>
    
</div>
  <asp:Label runat="server" ID="ltNextAvailableDate" Text="" CssClass="MuseumNextAvailableDate" />
    <%--
<div class="MuseumVariantChooseText">
<%=GetLocaleResourceString("Museum.MuseumChooseDateTimeText")%>
</div>--%>
</div>
 
    <div id="MuseumSelectedDayBox">
        <%--
<div id="DateSelectedTitle">
<%=GetLocaleResourceString("Museum.MuseumDateSelectedTitle")%></div>--%>
<div id="DateSelectedDay">
 
<asp:Literal runat="server" ID="ltMuseumDateSelectedDay" Text="" />
</div>
</div>
 
 
    <asp:HiddenField runat="server" ID="ShowCalendar" ClientIDMode="Static" />
<telerik:RadCalendar ID="tkCalendar" runat="server" EnableMultiSelect="false" OnSelectionChanged="tkCalendar_SelectionChange"
CssClass="CalendarOverall" AutoPostBack="true" ShowRowHeaders="false" NavigationPrevToolTip="Previous Month"
NavigationNextToolTip="Next Month" Skin="Special" EnableEmbeddedSkins="false"
EnableEmbeddedBaseStylesheet="false" EnableMonthYearFastNavigation="false" DayNameFormat="Short"
UseColumnHeadersAsSelectors="false">
 
<ClientEvents OnDateSelecting="LoadingTimes" />
<ClientEvents OnInit="InitializeCalendar" />
 
<ClientEvents OnCalendarViewChanging="MonthChangeShow" />
<ClientEvents OnDateSelected="EnableTimes" />
 
<SelectedDayStyle CssClass="CalendarSelectedDay" />
<OtherMonthDayStyle CssClass="CalendarOtherMonthDay" />
<TitleStyle CssClass="CalendarTitle" />
<DayStyle CssClass="CalendarDay" />
<SpecialDays>
<telerik:RadCalendarDay Repeatable="Today" Date="" ItemStyle-CssClass="rcToday">
</telerik:RadCalendarDay>
</SpecialDays>
<CalendarDayTemplates>
<telerik:DayTemplate ID="BlackOutDayTemplate" runat="server">
<Content>
<div class="UnavailableKeyText">
<%=GetLocaleResourceString("Museum.EventCalendar.Unavailable")%>
</div>
</Content>
</telerik:DayTemplate>
<telerik:DayTemplate ID="SoldOutDayTemplate" runat="server">
<Content>
<div class="SoldOutDateKeyText">
<%=GetLocaleResourceString("Museum.EventCalendar.SoldOut")%>
</div>
</Content>
</telerik:DayTemplate>
<telerik:DayTemplate ID="PreviousDayTemplate" runat="server">
<Content>
<div class="PreviousDate">
</div>
</Content>
</telerik:DayTemplate>
</CalendarDayTemplates>
</telerik:RadCalendar>
</asp:TableCell>
<%--<asp:TableCell ID="tcCalSpacer" runat="server" Width="10px">
<asp:Label ID="Label1" runat="server" Text="  "></asp:Label>
</asp:TableCell> --%>
<asp:TableCell ID="tcAvailableTimes" runat="server" VerticalAlign="Top" CssClass="MuseumAvailableTimes">
    <div class="MuseumStepHeaderWrapper">
<div class="MuseumVariantStepText">
    <asp:Label runat="server" ID="lblMuseumStepTwo"><%=GetLocaleResourceString("Museum.StepTwo")%></asp:Label>
</div>
    <%--
    <div class="MuseumVariantChooseText">
<%=GetLocaleResourceString("Museum.MuseumChooseQuantityText")%>
</div>--%>
</div>
 
<asp:ListBox CssClass="timeListBox" AutoPostBack="True" OnSelectedIndexChanged="TimedListBoxSelectionChanged"
ID="TimesAvailable" runat="server"></asp:ListBox>
<asp:Label ID="lblTimesMessage" runat="server" CssClass="MuseumTimesMessage"></asp:Label>
</asp:TableCell></asp:TableRow>
</asp:Table>
<asp:HiddenField ID="hfDateLock" value="false" runat="server" />
<asp:HiddenField ID="hfLastDate" Value=""  runat="server"/>
<div id="museumCalendarLoadingContainer">
</div>
<div id="museumCalendarLoadingContent">
<%=GetLocaleResourceString("Museum.MuseumCalendarEventProcessingText")%><br />
<img src="../App_Themes/Museum/images/museumLayout/loading.gif" /></div>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>

Javascript Code:

$(document).ready(function () {
    $('#museumCalendarLoadingContainer').hide();
    $('#museumCalendarLoadingContent').hide();
    //$('table.RadCalendar_Special').hide();
    $('#MuseumSelectedDayBox').removeClass('chosen');
        //On initial start adjust generated size and prepend blank option to list
    $(".timeListBox").attr('size', '1');
        //TODO: If 'No Shows Today' is in list don't show 'Choose Time' text only show 'No Shows Today'
    if ($('.timeListBox option[value="NoShows"]').length) {
        //Do nothing and show 'No Shows' message
        $('.timeListBox').addClass('SoldOutDateKeyText');
        }else{
        $('<option value="" selected>Choose a Time</option>').prependTo('.timeListBox');
    }
 
    //Default Choose Date on Dom Load and disable Choose Time
    $('#DateSelectedDay').html('Choose Date');
    if ($('#DateSelectedDay').html('Choose Date')) {
        $('.timeListBox').prop('disabled', 'disabled').addClass('disabled');
        $('<option value="" selected>Choose a Time</option>').prependTo('.timeListBox');
        $('.timeListBox').before('<div class="disabledTrigger"></div>');
    }
 
    $('.disabledTrigger').click(function (e) {
        $('#disabledMessage').hide();
            $('<div id="disabledMessage">Please choose date first<span id="closeFieldAlert">X</span></div>').prependTo('body').hide().delay(300).slideDown(400).delay(6000).slideUp(400);
            $('#closeFieldAlert, #disabledMessage').click(function () {
                $('#disabledMessage').hide();
            });
        // alert("Please choose DATE first");
    });
 
$(document).on('click', '#MuseumSelectedDayBox', function () {
    $('#MuseumSelectedDayBox').addClass('chosen');
    $("table.RadCalendar_Special").fadeIn(300);
        $('#calendarModalCover').show();
 
});
     
});
 
//Show/Hide calendar and show calendar again on Month Change using the ASP.NET Hidden field.
function pageLoad(sender, args) {
     
    if ($telerik.findElement(document, "ShowCalendar").value == "show") {
 
        $("table.RadCalendar_Special").show();
    };
    $telerik.findElement(document, "ShowCalendar").value = "hide";
    $("#calendardiv").click(function () {
         
        $("table.RadCalendar_Special").show();
    });
}
 
function MonthChangeShow(sender, eventArgs) {
    $telerik.findElement(document,"ShowCalendar").value = "show";
}
 
 
 
 
 
//DateSelecting - OnDateSelecting
function LoadingTimes(sender, eventArgs) {
$('#museumCalendarLoadingContainer').show();
$('#museumCalendarLoadingContent').show();
        $('#calendarModalCover').hide();
 
}
 
//Calendar Initialized - OnInit
function InitializeCalendar(sender) {
 
    //alert('initialize calendar');
$('#museumCalendarLoadingContainer').hide();
$('#museumCalendarLoadingContent').hide();
$(".timeListBox").attr('size', '1');
}
 
 
//Enable Times on date selected - OnDateSelected - this is not really working because of postback
function EnableTimes(sender, eventArgs) {
//  alert('enable times');
    //sender.set_autoPostBack(true);//Kind of works
    $('.timeListBox').prop('disabled', false).removeClass('disabled');
    $('table.RadCalendar_Special').hide();
}


Thanks,

Carlos
























Konstantin Dikov
Telerik team
 answered on 28 Jul 2014
4 answers
238 views
When the menu is in mobile render mode and we have sub menus, you have to tap the arrow to the right of the menu name to get the menu to expand. Is there a method to allow tapping anywhere on the sub-menu to have it expand ?
Dimitar
Telerik team
 answered on 28 Jul 2014
5 answers
245 views

Hi,

We are using RadEditors Enabled property to turn on and off the control. With the new Q3 2013 update this does no longer work and we getting the following error "Sys.ArgumentException: Value must not be null for Controls and Behaviors".

Currently we have found the following workaround:


//reNotesSystem.Enabled = !readOnly; // Does not work with Telerik Q3 2013!!!
//reNotesStation.Enabled = !readOnly;
if (readOnly)
{
    reNotesStation.EditModes = EditModes.Preview;
    reNotesSystem.EditModes = EditModes.Preview;
    reNotesStation.ToolbarMode = EditorToolbarMode.ShowOnFocus;
    reNotesSystem.ToolbarMode = EditorToolbarMode.ShowOnFocus;
}
else
{
    reNotesStation.EditModes = EditModes.All;
    reNotesSystem.EditModes = EditModes.All;
    reNotesStation.ToolbarMode = EditorToolbarMode.Default;
    reNotesSystem.ToolbarMode = EditorToolbarMode.Default;
}



The work arround is not optimal and we would like to have the old behaviour back.

Kind regards

Robert Warnestam

Ianko
Telerik team
 answered on 28 Jul 2014
4 answers
144 views
Hi,

In your online demo, do the following in IE11:
1. Set the cursor somewhere in the middle of the first block of text
2. Press the Bold button
3. Type some text
4. Unpress the bold button
5. Type some text
6. Repeat step 2-5 a few times

What happens is that sometimes the bold doesn't flip, if I was typing bold it continues with bold even if unchecking...
Can't reproduce this in the previous release, only in 2014 Q1!

Regards
Andreas
Ianko
Telerik team
 answered on 28 Jul 2014
19 answers
545 views
It seems there is a Problem with RadEditor for ASP.net AJAX in IE 11 EDGE Mode!?!
Since I had updated my OS to windows 8.1. nothing happens when i click on any Tool in RadEditor.
Any workaround for me? Adding metaTag to force rendering in IE9 or 10 mode wont work.
Ianko
Telerik team
 answered on 28 Jul 2014
2 answers
155 views
Hello,

I'm working on a project that has a RadWindow.
I have added controls dynamically inside the RadWindow.
I try to close the RadWindow by clicking on a button that is located inside the RadWindow.
However, code execution doesn’t reach the button clicking event.

VB.NET:
Dim btn_PopupAccept1 As New Button()
    
  
    Private Sub Page_Init(sender As Object, e As EventArgs) Handles Me.Init
        With btn_PopupAccept1
            .Text = "Accept"
        End With
  
  
        AddHandler btn_PopupAccept1.Click, AddressOf btn_PopupAccept1_Click
   
    End Sub
 
    Protected Sub RadTreeView1_NodeClick(sender As Object, e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles RadTreeView1.NodeClick
        Dim myLabel As Label = New Label()
        Dim myTextBox As TextBox = New TextBox()
        Dim myRadio As RadioButton = New RadioButton()
        Dim myCheckBox As CheckBox = New CheckBox()
        Dim spacer As LiteralControl = New LiteralControl(" ")
        Dim br As LiteralControl = New LiteralControl("<br />")
        Dim DivStart As LiteralControl = New LiteralControl("<div style=""padding:15px;""")
        Dim DivEnd As LiteralControl = New LiteralControl("</div>")
        myLabel.Text = "Control " & e.Node.Text
        myLabel.ID = "lbl_PopupControl" & e.Node.Value
        myTextBox.TextMode = TextBoxMode.Number
        myTextBox.ToolTip = "numeric"
  
        RadWindow1.VisibleOnPageLoad = True
        RadWindow1.ID = "RadWindow1"
        RadWindow1.Width = 500
        RadWindow1.Height = 300
        RadWindow1.Modal = True
        RadWindow1.CenterIfModal = True
  
        RadWindow1.ContentContainer.Controls.Add(DivStart)
  
        RadWindow1.ContentContainer.Controls.Add(myLabel)
        RadWindow1.ContentContainer.Controls.Add(spacer)
        RadWindow1.ContentContainer.Controls.Add(myTextBox)
  
        RadWindow1.ContentContainer.Controls.Add(br)
        RadWindow1.ContentContainer.Controls.Add(btn_PopupAccept1)
        RadWindow1.ContentContainer.Controls.Add(DivEnd)
  
    End Sub
 
    Protected Sub btn_PopupAccept1_Click(sender As Object, e As EventArgs)
  
        Dim script As String
    End Sub


ASPX:
<table cellpadding="0" cellspacing="0" class="auto-style1">
            <tr>
                <td class="auto-style2">
                    <telerik:RadTreeView ID="RadTreeView1" Runat="server">
                    </telerik:RadTreeView>
                </td>
                <td>
                     
                    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
                    </telerik:RadWindowManager>
  
               
  
                    <telerik:RadWindow ID="RadWindow1" runat="server">
                      
                    </telerik:RadWindow>
                </td>
            </tr>
        </table>


How can I accomplish this??

Thanks,
Daniel.

Daniel
Top achievements
Rank 1
 answered on 27 Jul 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?