Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
106 views
Using the Hay skin causes all axis labels to disappear. 

Forest:
<text fill="#3c4c30" style="font: 16px Arial,Helvetica,sans-serif" transform="translate(-6,6) rotate(-90,25.5,193.25)" fill-opacity="1" y="200" x="10">KGs</text>

Hay:
<text fill="WHITE" style="font: 16px Arial,Helvetica,sans-serif" transform="translate(-6,6) rotate(-90,25.5,193.25)" fill-opacity="1" y="200" x="10">KGs</text>

You can see this by going to your demo page and selecting the Hay skin.
http://demos.telerik.com/aspnet-ajax/htmlchart/examples/overview/defaultvb.aspx

Any work around available?
Danail Vasilev
Telerik team
 answered on 03 Apr 2013
6 answers
174 views
I have the following problem when using compatibility mode in IE9 (so possibly an IE7 problem).

If you paste the following text into the HTML view:

<p>This<o:p></o:p></p>
<p>Is<o:p></o:p></p>
<p>Broken<o:p></o:p></p>

Click design and it looks as expected, however then click html and following html is created:

This<o:p _rdeditor_exists="1"></o:p>Is<o:p _rdeditor_exists="1"></o:p>Broken<o:p _rdeditor_exists="1"></o:p>

Which has removed all <p> tags. This doesn't happen in Chrome, Firefox, Opera, or IE9 in standard mode.

Thanks.
Rumen
Telerik team
 answered on 03 Apr 2013
1 answer
47 views
Hi All,

When i try to get value from "RadGrid.MasterTableView.FilterExpression.ToString()" then it show as below:

(iif(ToolRequestName == null, "", ToolRequestName).ToString().ToUpper().Contains("test".ToUpper()))

but i want as:

([ToolRequestName] like "%test%")

please can anybody solve it?
MK
Top achievements
Rank 1
 answered on 03 Apr 2013
1 answer
427 views
I am using a RadTreeViewContextMenu in a RadTreeView like so:

ASP.NET Code:

<telerik:RadTreeView ID="RadTreeView1" runat="server" OnClientContextMenuShowing="ContextMenuShowing">
    <ContextMenus>
        <telerik:RadTreeViewContextMenu ID="RadTreeViewContextMenu1" CssClass="context-menu">
            <Items>                   
                <telerik:RadMenuItem Text="Item1" Value="1">
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text="Item One" />
                        <%-- Some other controls here --%>
                    </ItemTemplate>
                </telerik:RadMenuItem>
            </Items>
        </telerik:RadTreeViewContextMenu>
    </ContextMenus>
</telerik:RadTreeView>


CSS Code:

.context-menu .rmText
{
    font-size: 0.9em;
}
 
.context-menu .rmDisabled
{
    color: #aaa !important;
    background-color: transparent !important;
}
 
.context-menu .rmItem:hover,
.context-menu .rmFirst:hover,
.context-menu .rmLast:hover
{
    cursor: default !important;
    background-color: #FF9900 !important;
}
 
.context-menu .rmSeparator:hover
{
    background-color: transparent !important;
}

When I disable a context menu item (using the OnClientContextMenuShowing event) I am having problems getting the menu item to not be highlighted on mouse over. However, I can get the text color to change (shown in css code as .context-menu .rmDisabled
). I've also tried adding the rmDisabled css class to the disabled li tag element in my JavaScript event handler for OnClientContextMenuShowing event like so:

function ContextMenuShowing(sender, args) {
    var menuItems = args.get_menu().get_items();
    var isNodeEnabled = treeNode.get_attributes().getAttribute("isEnabled");
    for (var i = 0; i < menuItems.get_count(); i++) {
        var menuItem = menuItems.getItem(i);
        menuItem.set_enabled(isNodeEnabled == "True");
        if (!menuItem.get_enabled()) {
            $(menuItem.get_element()).addClass("rmDisabled");
     }
    }
}

But this only works when I remove the !important declaration from the context-menu .rmItem:hover, .context-menu .rmFirst:hover and, .context-menu .rmLast:hover class definitions, which in turn causes the first and last items to not be highlighted on mouse over (hover). How can I get the menu item to not be highlighted on mouse over?
Boyan Dimitrov
Telerik team
 answered on 03 Apr 2013
2 answers
67 views
I have a form with a checkbox and a table, the table has several rows, each with a label and text box and 1 row has a dropdown list.  The table is hidden using 'style="display:none;"' on page load and the checkbox is checked.

When I uncheck the checkbox, a javascript function is called to change the display mode of the table to 'style="display:block;"' and it works just fine, EXCEPT, the dropdown list does not get styled by the FormDecorator.  If change it so that the table is visible on load, it gets styled normally.

The only way to get around this was to change my checkbox to call server side code on a postback to show/hide the table instead of javascript.  But I hate performing a postback and executing code server side for something that can be handled client side.

Changing "OnClick='ShowHideShipping()'" to "OnCheckedChanged='chkShippingInfo_CheckedChanged' AutoPostBack='true'" gets me around the issue but why should I do a server side postback for something that only affects the client?

Anyone else run into this?  Any ideas?

The markup:
<asp:CheckBox runat="server" ID="chkShippingInfo" Text="  Use my billing address (below)"  Checked="true" OnClick="ShowHideShipping()" />
<table id="tblShippingInfo" class="AddressInfoTable" runat="server" style="display: none;">
    <tr class="xmp-form-row">
        <td align="right" class="xmp-form-label-cell">
            <label class="xmp-form-label" id="lblShipTo_Name">
                <span class="red"> * </span>Name: </label>
        </td>
        <td align="left">
            <telerik:RadTextBox ID="txtShipTo_Name" runat="server"   />
        </td>
        <td align="left">
            <asp:RequiredFieldValidator ID="valRequired_ShipTo_Name" runat="server"
                Text="  * Required" Display="Dynamic" Enabled="false"
                ErrorMessage="The Ship To Name field is required." Font-Bold="True"
                ForeColor="Red" ControlToValidate="txtShipTo_Name"   />
        </td>
    </tr>
    <tr class="xmp-form-row">
        <td align="right" class="xmp-form-label-cell">
            <label class="xmp-form-label" id="lblShipTo_Address">
                <span class="red"> * </span>Address: </label>
        </td>
        <td align="left">
            <telerik:RadTextBox ID="txtShipTo_Address" runat="server"   />
        </td>
        <td align="left">
            <asp:RequiredFieldValidator ID="valRequired_ShipTo_Address" runat="server"
                Text ="  * Required" Display="Dynamic" Enabled="false"
                ErrorMessage="The Ship To Address field is required." Font-Bold="True"
                ForeColor="Red" ControlToValidate="txtShipTo_Address"   />
        </td>
    </tr>
    <tr class="xmp-form-row">
        <td align="right" class="xmp-form-label-cell">
            <label class="xmp-form-label" id="lblShipTo_City">
                <span class="red"> * </span>City: </label>
        </td>
        <td align="left">
            <telerik:RadTextBox ID="txtShipTo_City" runat="server"   />
        </td>
        <td align="left">
            <asp:RequiredFieldValidator ID="valRequired_ShipTo_City" runat="server" Display="Dynamic"
                Text ="  * Required" ErrorMessage="The Ship To City is required."
                Font-Bold="True" ForeColor="Red" ControlToValidate="txtShipTo_City" Enabled="false" />
        </td>
    </tr>
    <tr class="xmp-form-row" style="display: none;">
        <td align="right" class="xmp-form-label-cell">
            <label class="xmp-form-label" id="lblShipTo_Country">
                <span class="red"> * </span>Country: </label>
        </td>
        <td align="left">
            <asp:DropDownList ID="cmbShipTo_Country" runat="server" AutoPostBack="True" Width="160px" onselectedindexchanged="cmbShipTo_Country_SelectedIndexChanged">
                <asp:ListItem Text="US" Value="US" />
                <asp:ListItem Text="Other" Value="Other" />
            </asp:DropDownList>
        </td>
        <td align="left">
        </td>
    </tr>
    <tr class="xmp-form-row">
        <td align="right" class="xmp-form-label-cell">
            <label class="xmp-form-label" id="lblShipTo_State">
                <span class="red"> * </span>State/Prov.: </label>
        </td>
        <td align="left">
            <asp:DropDownList ID="cmbShipTo_State" runat="server" AutoPostBack="false" Width="160px" />
        </td>
        <td align="left">
            <asp:RequiredFieldValidator ID="valRequired_ShipTo_State" runat="server"
                Text ="  * Required" Display="Dynamic" Enabled="false"
                ErrorMessage="The Ship To State field is required." Font-Bold="True"
                ForeColor="Red" ControlToValidate="cmbShipTo_State"   />
        </td>
    </tr>
    <tr class="xmp-form-row">
        <td align="right" class="xmp-form-label-cell">
            <label class="xmp-form-label" id="lblShipTo_ZipCode">
                <span class="red"> * </span>Zip Code: </label>
        </td>
        <td align="left">
            <telerik:RadMaskedTextBox ID="txtShipTo_ZipCode" runat="server" Mask="#####" PromptChar="_" HideOnBlur="True" RequireCompleteText="True" ResetCaretOnFocus="True" />
        </td>
        <td align="left">
            <asp:RequiredFieldValidator ID="valRequired_ShipTo_Zip" runat="server"
                Text ="  * Required" Display="Dynamic" Enabled="false"
                ErrorMessage="The Ship To Zip Code field is required." Font-Bold="True"
                ForeColor="Red" ControlToValidate="txtShipTo_ZipCode"   />
        </td>
    </tr>
</table>

The javascript being used to show/hide the table:
var sShippingCheckBoxID = "<%=chkShippingInfo.ClientID %>";
var valShipNameID = "<%=valRequired_ShipTo_Name.ClientID %>";
var valShipAddressID = "<%=valRequired_ShipTo_Address.ClientID %>";
var valShipCityID = "<%=valRequired_ShipTo_City.ClientID %>";
var valShipStateID = "<%=valRequired_ShipTo_State.ClientID %>";
var valShipZipID = "<%=valRequired_ShipTo_Zip.ClientID %>";
var sShippingTableID = "<%=tblShippingInfo.ClientID %>";
  
/// <summary>
/// Hides/shows the shipping information area.
/// </summary>
function ShowHideShipping() {
    var tblShip = document.getElementById(sShippingTableID);
    var chkShip = document.getElementById(sShippingCheckBoxID);
    var valShipName = document.getElementById(valShipNameID);
    var valShipAddress = document.getElementById(valShipAddressID);
    var valShipCity = document.getElementById(valShipCityID);
    var valShipState = document.getElementById(valShipStateID);
    var valShipZip = document.getElementById(valShipZipID);
  
    var bShowShipping = false;
  
    if (chkShip != null)
        bShowShipping = !chkShip.checked;
  
     if (tblShip != null)
     {
    
if (bShowShipping)
            tblShip.style.display = "block";
  else
tblShip.style.display = "none";
    }
  
    if (valShipName != null)
        valShipName.Enabled = bShowShipping;
  
    if (valShipAddress != null)
        valShipAddress.Enabled = bShowShipping;
  
    if (valShipCity != null)
        valShipCity.Enabled = bShowShipping;
  
    if (valShipState != null)
        valShipState.Enabled = bShowShipping;
  
    if (valShipZip != null)
        valShipZip.Enabled = bShowShipping;
}

The "fix" - use post back instead of javascript:
protected void chkShippingInfo_CheckedChanged(object sender, EventArgs e)
{
    tblShippingInfo.Style["display"] = (chkShippingInfo.Checked ? "none" : "block");
 
    valRequired_ShipTo_Name.Enabled = !chkShippingInfo.Checked;
    valRequired_ShipTo_Address.Enabled = !chkShippingInfo.Checked;
    valRequired_ShipTo_City.Enabled = !chkShippingInfo.Checked;
    valRequired_ShipTo_State.Enabled = !chkShippingInfo.Checked;
    valRequired_ShipTo_Zip.Enabled = !chkShippingInfo.Checked;
}
J
Top achievements
Rank 1
 answered on 03 Apr 2013
1 answer
156 views
We are using the RedEditor control to print letters from our ASP.NET application.  We have a client side event on a Print button as follows:
function radButtonPrint_ClientClicked() {
    var editor = $find('radEditor');
    editor.fire("Print");
}

When the user clicks the Print button, the print dialog appears and we can select the desired printer and print the letter (the HTML contents of the RadEditor control).

Is there a way to get the return codes from the Print Dialog via this "fire" command?  We're trying to handle the case where the user has clicked Print to open the Print Dialog and then clicked Cancel on the dialog so that ultimately we can take further action (redirect appropriately, etc)
Rumen
Telerik team
 answered on 03 Apr 2013
1 answer
199 views
It appears that the latest release of Telerik DLL's is no longer finring the OnClientPasteHtml event for the DocumentManager tool in RadEditor.  We have some logic coded for this event, which has been working until we upgraded the DLL's to the latest release. 
1. Does anyone know why this event was removed from the DocumentManager tool?
2. Is there a workaround or fix for this so that we don't have to completely change the logic that is currently working in our production environment?

Thank you for your assistance,
Ed Sudit
Rumen
Telerik team
 answered on 03 Apr 2013
2 answers
113 views
Hi,

1. In our application we are using radGrid control with 8 combobox ,many textbox controls and hiddens fileds inside it. Based on the selection we show/hide combobox on grid.When edit button is pressed, we are filing and showing up comboboxes - When rows > 15 grid takes on average 20sec to come to edit mode.If rows are less still it takes 5-10sec. 

2. Based on button click we are adding the new row to radgrid from server side code, when again if rows >5 take 5-15 sec to a load.

3. On IE10(In one of the compatible mode) radCombobox width increases to the inner width of page.

4. RadWindow do not work on IE10(non -compatible mode), on button click we shows radwindow. Which workes properly on IE7/8/9

As of today many customers are using IE7/IE8.
Basically what I see is Telerik controls especially radGrid takes more time to render on IE-Browser.
If I run my page on Crome or Firefox, performance is very fast compared to IE7/8/9/10.
We tried the performance optimization suggested on your website, but still perofomance is very slow.

We are using Version : 2012.2.724.40.

If you have any suggestions, please reply.


-Sunil
Sunil
Top achievements
Rank 1
 answered on 03 Apr 2013
1 answer
175 views
Hi

I have a pre render event to scan the header and turn off the select all checkbox.

My pre render code looks like this:
Protected Sub rgProcedures_PreRender(sender As Object, e As EventArgs) Handles rgProcedures.PreRender
 
    For Each HeaderItem As Telerik.Web.UI.GridHeaderItem In rgProcedures.MasterTableView.GetItems(Telerik.Web.UI.GridItemType.Header)
        Dim chkSelectAll As CheckBox = DirectCast(HeaderItem("colClientSelect").Controls(0), CheckBox)
        chkSelectAll.Visible = False
    Next
 
 
End Sub


I have just added a <columnGroup> to combine a header over 2 columns and get the following error:

Specified argument was out of the range of valid values.
Parameter name: index


At this line in my Pre render: Dim chkSelectAll As CheckBox = DirectCast(HeaderItem("colClientSelect").Controls(0), CheckBox)

Any Ideas
Andrey
Telerik team
 answered on 03 Apr 2013
1 answer
152 views
I have a page that contains a RadToolTip.  The ToolTip shows a User Control based dialog when activated. The dialog contains two RadComboBoxes and a Grid. There is also a RadAjaxProxy that controls updateing the interactions between these three controls. This is all working fine.

On the page that contains the ToolTip, I am trying to add a new Grid. However, when I add the grid, the Ajax between the controls stops working. 

Here's the Grid I'm trying to add.  Is there a setting in this grid that is interfering with the AJAX in the user control?

            <div style="width: 900px;">
                        <fieldset style="width: 90%">
                            <p>                                                            
                                <asp:Label ID="lblNoteError" runat="server" EnableViewState="False" Font-Bold="True"
                                    ForeColor="#FF8080"></asp:Label>
                                <asp:Label ID="lblNoteMessage" runat="server" EnableViewState="False" Font-Bold="True"
                                    ForeColor="#00C000"></asp:Label>
                                <telerik:RadGrid ID="NotesGrid" AllowAutomaticUpdates="True" AllowAutomaticDeletes="True"
                                    Width="700px" AllowPaging="False" runat="server" PageSize="20" AllowAutomaticInserts="True"
                                    OnItemDeleted="NotesGrid_ItemDeleted" OnItemUpdated="NotesGrid_ItemUpdated" OnItemInserted="NotesGrid_ItemInserted"
                                    CellSpacing="0" GridLines="None" DataSourceID="odsNotes">
                                    <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
                                    <MasterTableView Width="100%" CommandItemDisplay="Top" DataKeyNames="NotesId"
                                        AutoGenerateColumns="False" DataSourceID="odsNotes">
                                        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                                        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                                        </RowIndicatorColumn>
                                        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                                        </ExpandCollapseColumn>
                                        <Columns>
                                            <telerik:GridBoundColumn DataField="NoteText" FilterControlAltText="Filter Note column" HeaderStyle-Width="700px"
                                                HeaderText="Note" SortExpression="NoteText" UniqueName="NoteText" ItemStyle-HorizontalAlign="Left">
                                            </telerik:GridBoundColumn>
                                           <telerik:GridBoundColumn DataField="CreatedBy" FilterControlAltText="Filter Created By column"
                                                HeaderText="Created By" SortExpression="CreatedBy" UniqueName="CreatedBy" ItemStyle-HorizontalAlign="Left">
                                            </telerik:GridBoundColumn>
                                           <telerik:GridBoundColumn DataField="CreatedOn" FilterControlAltText="Filter Created Date column"
                                                HeaderText="Created Date" SortExpression="CreatedOn" UniqueName="CreatedOn" ItemStyle-HorizontalAlign="Left">
                                            </telerik:GridBoundColumn>
                                           <telerik:GridBoundColumn DataField="ModifiedBy" FilterControlAltText="Filter Modified By column"
                                                HeaderText="Modified By" SortExpression="ModifiedBy" UniqueName="ModifiedBy" ItemStyle-HorizontalAlign="Left">
                                            </telerik:GridBoundColumn>
                                           <telerik:GridBoundColumn DataField="ModifiedOn" FilterControlAltText="Filter Modified Date column"
                                                HeaderText="Modified Date" SortExpression="ModifiedOn" UniqueName="ModifiedOn" ItemStyle-HorizontalAlign="Left">
                                            </telerik:GridBoundColumn>
                                        </Columns>
                                        <EditFormSettings EditFormType="Template">
                                            <FormTemplate>
                                            <asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind("NoteText") %>' Rows="4" Width="800px">
                                            </asp:TextBox>
                                            </FormTemplate>
                                        </EditFormSettings>
                                        <CommandItemTemplate>
                                            <div style="padding: 5px 5px;">
                                                <asp:LinkButton ID="btnEditNoteSelected" runat="server" CommandName="EditSelected" Visible='<%# NotesGrid.EditIndexes.Count == 0 %>'><img style="border:0px;vertical-align:middle;" alt="" src="../Images/Edit.gif"/>Edit selected</asp:LinkButton>&nbsp;&nbsp;
                                                <asp:LinkButton ID="btnUpdateEdited" runat="server" CommandName="UpdateEdited" Visible='<%# NotesGrid.EditIndexes.Count > 0 %>'><img style="border:0px;vertical-align:middle;" alt="" src="../Images/Update.gif"/>Update</asp:LinkButton>&nbsp;&nbsp;
                                                <asp:LinkButton ID="btnNoteCancel" runat="server" CommandName="CancelAll" Visible='<%# NotesGrid.EditIndexes.Count > 0 || NotesGrid.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="../Images/Cancel.gif"/>Cancel editing</asp:LinkButton>&nbsp;&nbsp;
                                                <asp:LinkButton ID="btnInsertNote" runat="server" CommandName="InitInsert" Visible='<%# !NotesGrid.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="../Images/AddRecord.gif"/>Add new</asp:LinkButton>&nbsp;&nbsp;
                                                <asp:LinkButton ID="btnSaveInsert" runat="server" CommandName="PerformInsert" Visible='<%# NotesGrid.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="../Images/Insert.gif"/> Save</asp:LinkButton>&nbsp;&nbsp;
                                                <asp:LinkButton ID="btnDeleteNote" OnClientClick="javascript:return confirm('Delete selected Asset Type?')"
                                                   runat="server" CommandName="DeleteSelected"><img style="border:0px;vertical-align:middle;" alt="" src="../Images/Delete.gif"/>Delete selected</asp:LinkButton>&nbsp;&nbsp;
                                            </div>
                                        </CommandItemTemplate>
                                    </MasterTableView>
                                    <ClientSettings>
                                        <Selecting AllowRowSelect="True"></Selecting>
                                        <Scrolling AllowScroll="True" EnableVirtualScrollPaging="True" UseStaticHeaders="True"
                                            SaveScrollPosition="True" />
                                    </ClientSettings>
                                    <FilterMenu EnableImageSprites="False">
                                    </FilterMenu>
                                </telerik:RadGrid>
                                <asp:ObjectDataSource ID="odsNotes" runat="server" TypeName="AssetVue.BLL.Entities.Note"
                                    DataObjectTypeName="AssetVue.BLL.Entities.Note" SelectMethod="getAllNotes"
                                    InsertMethod="addNote" UpdateMethod="updateNote" DeleteMethod="deleteNote" 
                                    OnInserting="odsNotes_Inserting" OnSelecting="odsNotes_Selecting">
                                    <SelectParameters>
                                        <asp:Parameter Name="parentId" Type="String" />
                                    </SelectParameters>
                                    <InsertParameters>
                                        <asp:Parameter Name="parentId" Type="String" />
                                        <asp:Parameter Name="parentType" Type="String" />
                                    </InsertParameters>
                               </asp:ObjectDataSource>
                            </p>
                        </fieldset>
                    </div>
Maria Ilieva
Telerik team
 answered on 03 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?