Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
190 views
I have an aspx web application develop with the Telerik ajax control suite version 2012.2.812.40 which is running on a Win2003 server and IIS version 6.

When the app is deployed under a virtual directory off one of the existing web sites it runs correctly, but when it is deployed on its own site, the Telerik controls are rendered with a different look and do not function properly.  The textbox control is used on the login page and in the latter case the width is smaller and the control always return a blank string to the logic, regardless of what is entered (the app therefore can't get past the login page).  See the attachments below; the urls for the sites are as follows:

Main Site: www.happc360.com
Virtual Directory Site: www.westernesse.com/happc360

Both deployments are pointing to the SAME location on the web server and therefore are running exactly the same code, style sheets, config, etc.  They are also running in the same application pool.

I have gone over the IIS properties of the main site and the virtual directory with a fine tooth comb, but can't see any significant differences.

What would be causing this?




Richard
Top achievements
Rank 1
 answered on 30 Mar 2014
0 answers
67 views
I need to make an empty RadGrid so that a user can click on add button  or remove button and start adding or deleting his information to the RadGrid and insert those information into a sql server table.( I just want to manipulate the data of that sql server table but I don't want to show the data of the table in the RadGrid)   I have tried all the example but it doesn't work for me. Please help me to find my way in this concept.
shemein
Top achievements
Rank 1
 asked on 30 Mar 2014
0 answers
47 views
I would like to find & compare an earlier row item during the dataBind on my grid.  Here's a partial code I'm hoping to complete:

protected void RadGridX_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridDataItem)
    {
        GridDataItem item = e.Item as GridDataItem;
        if (item["Name"].Text == "RowIWant")
        {
            foreach(string colName in colNames)
            {
                //get this row's value
                int thisValue = Convert.ToInt32(item[colname].Text);

                // get the value from the RowToCompare
                int earlierValue = ???

            }
        }
    }
}



Scott
Top achievements
Rank 1
 asked on 30 Mar 2014
2 answers
453 views
Hi
Anybody can help me how to change combobox selected value from another combobox selected value when click button (Copy from Mailing). I would like to publish my code and attached with image what i want to do. Appreciate for any help.

Client Side
(
 function bindEventHandlers() {
            $telerik.$('#btnCopyFromBilling').unbind('click').bind('click', function () {
                oncopyfrombilling('COPYBILLING');
            });
            $telerik.$('#btnCopyFromMailing').unbind('click').bind('click', function () {
                oncopyfrombilling('COPYMAILING');
            });
        }
function selectRadComboboxByValue(radcombo, value) {
            radcombo.set_selectedIndex(value);
            debugger
        }
        function oncopyfrombilling(args) {
            var txtAreaBillingAddress = $get('<%=txtAreaBillingAddress.ClientID%>');
            var ddlBillingRegion = $find('<%=ddlBillingRegion.ClientID%>');
            var ddlBillingCity = $find('<%=ddlBillingCity.ClientID%>');
            var txtBillingPostal = $get('<%=txtBillingPostal.ClientID%>');
            var ddlBillingCountry = $find('<%=ddlBillingCountry.ClientID%>');
            
            var txtAreaMailingAddress = $get('<%=txtAreaMailingAddress.ClientID%>');
            var ddlMailingRegion = $find('<%=ddlMailingRegion.ClientID%>');
            var ddlMailingCity = $find('<%=ddlMailingCity.ClientID%>');
            var txtMailingPostal = $get('<%=txtMailingPostal.ClientID%>');
            var ddlMailingCountry = $find('<%=ddlMailingCountry.ClientID%>');
            
            if (args === 'COPYMAILING') {
                alert(args);
                txtAreaBillingAddress.value = txtAreaMailingAddress.value;
                ddlBillingRegion.set_value(ddlMailingRegion.get_value());
                ddlBillingCity.set_value(ddlMailingCity.get_value());
                txtBillingPostal.value = txtMailingPostal.value;
                ddlBillingCountry.set_value(ddlMailingCountry.get_value());
            }
 else if (args === 'COPYBILLING') {
                txtAreaMailingAddress.value = txtAreaMailingAddress.value;
                ddlMailingRegion.set_value(ddlBillingRegion.get_value());
                ddlMailingRegion.set_value(ddlBillingCity.get_value());
                ddlMailingRegion.value = txtBillingPostal.value;
                ddlMailingRegion.set_value(ddlBillingCountry.get_value());
            }
)

ASPX
(
<div class="divStatusAddressFieldSet" id="BillingMailing">
                        <div class="divEmptyRow">
                        </div>
                        <fieldset class="longestFieldset">
                            <legend>
                                <u>5</u>. Billing Address
                            </legend>
                            <div class="divFormControls">
                                <div class="divText">
                                </div>
                                <div class="divInput">
                                    <input type="button" id="btnCopyFromMailing" value="Copy from Mailing (X) " />
                                </div>
                            </div>
                            <div class="divLongFormControls">
                                <div class="divText">
                                    <label>
                                        Address
                                    </label>
                                </div>
                                <div class="divInput">
                                    <textarea id="txtAreaBillingAddress" runat="server" style="height: 95%; width: 96%"></textarea>
                                </div>
                            </div>
                            <div class="divFormControls">
                                <div class="divText">
                                    <label>
                                        Region
                                    </label>
                                </div>
                                <div class="divInput">
                                    <telerik:RadComboBox ID="ddlBillingRegion" runat="server" Skin="Default" ShowDropDownOnTextboxClick="true"
                                                         EmptyMessage="Region" Width="100%" Font-Size="11px" EnableLoadOnDemand="true">
                                        <HeaderTemplate>
                                            <asp:Label ID="lblRegion" runat="server" Text="Region" Font-Bold="true" Font-Size="11px"></asp:Label>
                                        </HeaderTemplate>
                                    </telerik:RadComboBox>
                                   <%-- <telerik:RadDropDownList ID="ddlBillingRegion" runat="server"></telerik:RadDropDownList>--%>
                                </div>
                            </div>
                            <div class="divFormControls">
                                <div class="divText">
                                    <label>
                                        City
                                    </label>
                                </div>
                                <div class="divInput">
                                   <telerik:RadComboBox ID="ddlBillingCity" runat="server" Skin="Default" ShowDropDownOnTextboxClick="true"
                                                         EmptyMessage="City" Width="100%" Height="300px" Font-Size="11px" EnableLoadOnDemand="true">
                                        <HeaderTemplate>
                                            <asp:Label ID="lblBillingCity" runat="server" Text="City" Font-Bold="true" Font-Size="11px"></asp:Label>
                                        </HeaderTemplate>
                                    </telerik:RadComboBox>
                                    <%-- <telerik:RadDropDownList ID="ddlBillingCity" runat="server"></telerik:RadDropDownList>--%>
                                </div>
                            </div>
                            <div class="divFormControls">
                                <div class="divText">
                                    <label>
                                        Postal/Zip code
                                    </label>
                                </div>
                                <div class="divInput">
                                    <input type="text" id="txtBillingPostal" runat="server" />
                                </div>
                            </div>
                            <div class="divFormControls">
                                <div class="divText">
                                    <label>
                                        Country
                                    </label>
                                </div>
                                <div class="divInput">
                                  <telerik:RadComboBox ID="ddlBillingCountry" runat="server" Skin="Default" ShowDropDownOnTextboxClick="true"
                                                         EmptyMessage="Country" Width="100%" Font-Size="11px" EnableLoadOnDemand="true">
                                        <HeaderTemplate>
                                            <asp:Label ID="lblGuestCountry" runat="server" Text="Nationality" Font-Bold="true"
                                                       Font-Size="11px"></asp:Label>
                                        </HeaderTemplate>
                                    </telerik:RadComboBox>
                                    <%--  <telerik:RadDropDownList ID="ddlBillingCountry" runat="server" ></telerik:RadDropDownList>--%>
                                </div>
                            </div>
                        </fieldset>
                        <div class="divEmptyRow">
                        </div>
                        <fieldset class="longestFieldset">
                            <legend>
                                <u>6</u>. Mailing Address
                            </legend>
                            <div class="divFormControls">
                                <div class="divText">
                                </div>
                                <div class="divInput">
                                    <input type="button" id="btnCopyFromBilling" value="Copy from billing (Y) " />
                                </div>
                            </div>
                            <div class="divLongFormControls">
                                <div class="divText">
                                    <label>
                                        Address
                                    </label>
                                </div>
                                <div class="divInput">
                                    <textarea id="txtAreaMailingAddress" runat="server" style="height: 95%; width: 96%"></textarea>
                                </div>
                            </div>
                            <div class="divFormControls">
                                <div class="divText">
                                    <label>
                                        Region
                                    </label>
                                </div>
                                <div class="divInput">
                                    <telerik:RadComboBox ID="ddlMailingRegion" runat="server" Skin="Default" ShowDropDownOnTextboxClick="true"
                                                         EmptyMessage="Region" Width="100%" Font-Size="11px" EnableLoadOnDemand="true">
                                        <HeaderTemplate>
                                            <asp:Label ID="lblRegion" runat="server" Text="Region" Font-Bold="true" Font-Size="11px"></asp:Label>
                                        </HeaderTemplate>
                                    </telerik:RadComboBox>
                                </div>
                            </div>
                            <div class="divFormControls">
                                <div class="divText">
                                    <label>
                                        City
                                    </label>
                                </div>
                                <div class="divInput">
                                    <telerik:RadComboBox ID="ddlMailingCity" runat="server" Skin="Default" ShowDropDownOnTextboxClick="true"
                                                         EmptyMessage="City" Width="100%" Font-Size="11px" EnableLoadOnDemand="true">
                                        <HeaderTemplate>
                                            <asp:Label ID="lblMainlingCity" runat="server" Text="City" Font-Bold="true" Font-Size="11px"></asp:Label>
                                        </HeaderTemplate>
                                    </telerik:RadComboBox>
                                </div>
                            </div>
                            <div class="divFormControls">
                                <div class="divText">
                                    <label>
                                        Postal/Zip code
                                    </label>
                                </div>
                                <div class="divInput">
                                    <input type="text" id="txtMailingPostal" runat="server" />
                                </div>
                            </div>
                            <div class="divFormControls">
                                <div class="divText">
                                    <label>
                                        Country
                                    </label>
                                </div>
                                <div class="divInput">
                                    <telerik:RadComboBox ID="ddlMailingCountry" runat="server" Skin="Default" ShowDropDownOnTextboxClick="true"
                                                         EmptyMessage="Country" Width="100%" Height="300px" Font-Size="11px" EnableLoadOnDemand="true">
                                        <HeaderTemplate>
                                            <asp:Label ID="lblMailingCountry" runat="server" Text="Nationality" Font-Bold="true"
                                                       Font-Size="11px"></asp:Label>
                                        </HeaderTemplate>
                                    </telerik:RadComboBox>
                                </div>
                            </div>
                        </fieldset>
                    </div>
)
 
Myo
Top achievements
Rank 1
 answered on 30 Mar 2014
6 answers
613 views
Hi
I am a newbie so please excuse if this is too easy!

I am using a RadGrid and want to catch a double click on a row and then process a VB code routine I have to setup some data values, update a table and pass control over to another page to display a report. All the code in the VB is fine and works if I just press a button and catch the click. I just need the grid double click to do the same.

I have trawled the forums for hours and tried various code snippets from different posts but none of them seem to work. What I have is this

ASPX
<script type="text/javascript">
    function RowDoubleClick(index) {
        __doPostBack("<%= grdDashboards.UniqueId %>", "RowDblClicked:" + this.Rows[index].ItemIndex);
    }
    </script>


Also in the ASPX are a couple of Grid client settings
<telerik:RadGrid ID="grdDashboards" runat="server">
   <ClientSettings EnableRowHoverStyle="true">
     <ClientEvents OnRowDblClick="RowDoubleClick"></ClientEvents>
   </ClientSettings>
 </telerik:RadGrid>


Then in the VB behind I have
Protected Overrides Sub RaisePostBackEvent(ByVal source As IPostBackEventHandler, ByVal eventArgument As String)
       MyBase.RaisePostBackEvent([source], eventArgument)
 
       If ([source] Is grdDashboards) And (eventArgument.IndexOf("RowDblClicked") <> -1) Then
           Dim item As GridDataItem = grdDashboards.Items(Integer.Parse(eventArgument.Split(":"c)(1)))
 
           Response.Write([String].Format("ReportID:{0}", item.GetDataKeyValue("ReportID")))
 
       End If
   End Sub

This never seems to get called as a breakpoint nevers gets processed.

Where my test VB  code above has the Response.Write debug output I just want to call my Sub that does all the work of passing on to the next page.

All the code has been copy/pasted from examples in here.

Problem is, double clicking on the RadGrid (grdDashboards) has no effect. Nothing is firing off.

Any help much appreciated as a deadline is looming!!

Just to be clear, I am using VS2010, Framework 4, VB.NET code behind with the following Imports at the head of the VB page

Imports System.Data
Imports System.Data.SqlClient
Imports Telerik.Web.UI

Many thanks
Mark
Silvio Silva Junior
Top achievements
Rank 2
 answered on 29 Mar 2014
2 answers
153 views
Okay, something changed in the most recent version. We used to be able to use the advanced editor as follows.

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">   
    
    <%-- register the RadWindow for the Advanced Editing --%>
    <telerik:RadWindow runat="server" ID="RadWindowAdvEditor" NavigateUrl="~/RegisterPro/radeditorwindow.aspx" EnableEmbeddedBaseStylesheet="true" VisibleTitlebar="true" OnClientShow="SetDialogContent" OnClientPageLoad="SetDialogContent" Behaviors="Maximize,Close,Move" Width="800px" Modal="true" Height="700px" />

<fieldset id="FieldSetMain" class="ui-widget ui-widget-content ui-corner-all" style="padding: 10px; width: 960px;">
        <legend id="LegendEventManager" class="ui-widget-header ui-corner-all">  Events Manager  </legend>
        <%-- Grid for add/edit/delete events (master and sub) --%>
        <div style="float: left;">
            <%-- script for the RadWindow --%>
            <telerik:RadScriptBlock ID="RadScriptBlockEditor" runat="server">
                <script type="text/javascript">
                    //![CDATA[
 
                    var myEditorContent = null;
                    var myMessageType = "CommandExecute?";
                    var myEditor;
 
                    jQuery(function () {
                        if (typeof (RadEditorCommandList) != "undefined") {
                            Telerik.Web.UI.Editor.CommandList["RichEditor"] = function (commandName, editor, args) {
                                myEditor = editor;                                      // set editor object so we can use it from window return - SetEditorContent
                                myEditorContent = editor.get_html(true);              //get RadEditor content
                                $find("<%= RadWindowAdvEditor.ClientID%>").show();     //open RadWindow
                                    }
                                }
                            })
 
                            function SetEditorContent(content) {
                                //set content to RadEditor on the main page from RadWindow                                               
                                myEditor.set_html(content);
                            }
 
                            function SetDialogContent(oWnd) {
                                var myContentWindow = oWnd.get_contentFrame().contentWindow;
                                if (myContentWindow && myContentWindow.setContent) {
                                    window.setTimeout(function () {
                                        //pass and set the content from the mane page to RadEditor in RadWindow                                                       
                                        myContentWindow.setContent(myEditorContent);
                                    }, 500);
                                }
                            }

<telerik:RadGrid runat="server" ID="RadGridEventMaster" Height="100%" Width="97%" AllowMultiRowSelection="false" AutoGenerateColumns="True" ShowHeader="False" AllowAutomaticUpdates="false" AllowAutomaticInserts="false">
                        <MasterTableView CommandItemDisplay="Top" NoMasterRecordsText="There are no events to display..." DataKeyNames="EventMasterId" EditMode="EditForms" AllowAutomaticUpdates="false" AllowAutomaticInserts="false">
                            <CommandItemTemplate>
 
 
                            <%-- Edit form master event template --%>
                            <EditFormSettings EditFormType="Template">
                                <FormTemplate>
 
                                        <telerik:RadGrid runat="server" ID="RadGridEventSub" Height="100%" Width="100%" AllowMultiRowSelection="false" AutoGenerateColumns="false" OnItemCommand="RadGridEventSub_ItemCommand" OnDeleteCommand="RadGridEventSub_DeleteCommand" OnInsertCommand="RadGridEventSub_InsertCommand" OnUpdateCommand="RadGridEventSub_UpdateCommand" OnNeedDataSource="RadGridEventSub_NeedDataSource"
                                            OnItemDataBound="RadGridEventSub_ItemDataBound" OnItemCreated="RadGridEventSub_ItemCreated" AllowAutomaticUpdates="true" AllowAutomaticInserts="true">
                                            <MasterTableView CommandItemDisplay="Top" NoMasterRecordsText="There are no events to display..." DataKeyNames="EventMasterId, EventSubId, GroupId, Name, EventTypeId, BoardPositionId" EditMode="EditForms">
                                                <CommandItemSettings AddNewRecordText="Add a new sub event" ShowRefreshButton="false" />
 
 
 
                                                                                    <div>
                                                                                        <telerik:RadEditor runat="server" ID="RadEditorEmailNotificationMsg" ToolsWidth="100%" Height="200px" Width="100%" EnableResize="false" ContentAreaMode="Div" Content='<%# Eval("EmailNotificationMsg") %>'>
                                                                                            <Tools>
                                                                                                <telerik:EditorToolGroup>
                                                                                                    <telerik:EditorTool Name="RichEditor" Text="Open Advanced Editor" />
                                                                                                    <telerik:EditorTool Name="Bold" />
                                                                                                    <telerik:EditorTool Name="Italic" />
                                                                                                    <telerik:EditorTool Name="Underline" />
                                                                                                    <telerik:EditorTool Name="Cut" />
                                                                                                    <telerik:EditorTool Name="Copy" />
                                                                                                    <telerik:EditorTool Name="Paste" />
                                                                                                    <telerik:EditorTool Name="FontName" />
                                                                                                    <telerik:EditorTool Name="RealFontSize" />
                                                                                                </telerik:EditorToolGroup>
                                                                                            </Tools>
                                                                                        </telerik:RadEditor>
                                                                                    </div>

                                    </div>
                                </FormTemplate>
                            </EditFormSettings>
                            <%-- Edit form template --%>
                        </MasterTableView>
                    </telerik:RadGrid>
                </div>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
</telerik:RadGrid>


Okay instead of putting 10000 lines of code i took pieces out to show what we are doing and was working. 

We declare a RadWindow at the beginning of code (line 150) - "RadWindowAdvEditor"
We set code for the Editor before the Grid (which worked (line 208) - moving after the grid didnt matter (line 1472)) - "RadScriptBlockEditor"

We have 2 Grids, 1 Grid holds a master record (line 259) and when in edit mode it shows another Grid (line 466) which hold sub items of the master record. So you edit one of the sub items from the sub grid and it shows 3 editors and lots of other stuff. All in a EditFormSettings->FormTemplate of the sub grid. 

The user, before the update Q1 2014, was able to click on the RichEditor icon and open up the RadWindow to edit and it sent back the content and updated the RadEditor embedded in the EditForm correctly. This worked for years, we were on a 2013 version. You can see from the last code snippet that the RadEditors are indeed embedded in 2 grids.

Now we tried to change it around, put the script at the end. We cant put it after the RadEditor object declare due to it being in a Edit form. The reason is all of a sudden the clients are getting the dreaded "The command RichEditor is not implemented yet."   

We have other forms w/o the Grids and Edit Forms - just laying on a WebForm and it works fine. The code is BEFORE the declaration of the RadEditor and we dont have a problem.

Please advise! We have clients who can not use the advanced editor for the their registration emails that we provide for them.

Thanks Telerik!







SDI
Top achievements
Rank 1
 answered on 29 Mar 2014
3 answers
117 views
Hi, 

Is it possible to show an empty label when the column has a zero value? I've tried DataFormatString="{0:#}" but it doesn't work.



<telerik:RadHtmlChart runat="server" ID="RadHtmlChart1" Height="550px" Style="left: 10px; right: 10px;"  >
    <PlotArea>
        
        <Series>
            <telerik:ColumnSeries DataFieldY="AcumuladoAnt"  Name="<%$Resources:htmlChartAnterior %>" >
               <LabelsAppearance DataFormatString="{0:#}"></LabelsAppearance>
                
            </telerik:ColumnSeries>
            <telerik:ColumnSeries DataFieldY="AcumuladoAct" Name="<%$Resources:htmlChartActual %>">
                 <LabelsAppearance DataFormatString="{0:#}" ></LabelsAppearance>
            </telerik:ColumnSeries>
        </Series>
        <XAxis DataLabelsField="Mes">
            <TitleAppearance Text="<%$Resources:htmlChartMes %>">
                <TextStyle Margin="20" />
            </TitleAppearance>
            <MajorGridLines Visible="false" />
            <MinorGridLines Visible="false" />
        </XAxis>
        <YAxis>
            <TitleAppearance Text="<%$Resources:htmlChartImporte %>">
                <TextStyle Margin="20" />
            </TitleAppearance>
              
            <MinorGridLines Visible="false" />
        </YAxis>
    </PlotArea>
    <ChartTitle Text="<%$Resources:htmlChartTitle %>">
    </ChartTitle>
    <Legend>
        <Appearance BackgroundColor="White" Position="Bottom">
            <TextStyle Bold="false" FontFamily="Helvetica" Italic="false" Color="Black" FontSize="12"
                Margin="0" Padding="0" />
        </Appearance>
    </Legend>
</telerik:RadHtmlChart>

Here is a screenshot of the graph.

Thank you
Roberto

Jim
Top achievements
Rank 1
 answered on 28 Mar 2014
3 answers
100 views
Hello,
I have a 3 Tabs on my page(Tab1, Tab2, Tab3)
Let say if user click on the Tab2 and page got loaded. If User clicks on the same Tab2 again.. i want to reload the the page again

how can i do this?

Thank You
Venkata
Top achievements
Rank 1
 answered on 28 Mar 2014
1 answer
66 views
I have several textBoxes in a template edit form that I need to validate. The value could be null (no input) otherwise a number with max value 100. Moreover, I need to show/format the number with % but, being the db column an int, I do not have to write the % but only show it in the text box. How can I do the above?
Thanks,
Felice
<EditFormSettings EditFormType="Template">
  <EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn1 column">  </EditColumn>
     <FormTemplate>
          <table>
            <tr>
             <td> </td>
             <td>
              <asp:Label ID="Label1" runat="server" Text="Margins:"></asp:Label>
              </td>
              <td>
               <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind( "margins" ) %>'></asp:TextBox>
Felice
Top achievements
Rank 1
 answered on 28 Mar 2014
2 answers
65 views
Hello all,

I have a radGrid1 showing basic customer information and another RadGrid2 showing customer contacts, when I select a customer in Radgrid1 their contacts are shown in radGrid2, I put a button in RadGrid1 to edit the information of the customer and another button in RadGrid2 to edit the information of the contact, when the button is clicked, the Editform is shown, but if a select another customer the EditForm is still visible in the RadGrid1, and the same happens when I edit a contact in RadGrid2.

What I need is that the EditForm of RadGrid1 close or hide when another row is selected in RadGrid1 or when you click the edit button of RadGrid2 

Sorry about my spelling,
Regards
Gaby Miranda
Gabriela
Top achievements
Rank 1
 answered on 28 Mar 2014
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?