Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
153 views
Hello,

I am currently getting a strange error. Throughout our application we are using the GetRadwindow Function to find the currently opened RadWindow, then closing it after a button submit.

function GetRadWindow() {
           var oWindow = null;
 
           if (window.radWindow) {
               oWindow = window.radWindow;
           }
           else if (window.frameElement.radWindow) {
               oWindow = window.frameElement.radWindow;
           }
 
           return oWindow;
       }
 
       function returnToParent(ID) {
           //create the argument that will be returned to the parent page
           var oArg = new Object();
           oArg.ID = ID;
 
           //get a reference to the current RadWindow
           var oWnd = GetRadWindow();
 
           oWnd.Close();
       }

When It calls this function I am getting the following error:

Unable to get value of the property 'offsetWidth': object is null

I am stumped to what could be causing this, because we weren't getting this error before. We recently updated our telerik controls, so maybe this as something to do with it? Any help would be appreciated.

Thanks,

Ashlee




Dobromir
Telerik team
 answered on 04 Jun 2013
2 answers
157 views
Hello,

Using web application, i need to draw BAR chart.
I have the following details in database

EmployeeId Score Result Date

E001            20      Fail     01-05-2012
E002            80      Pass     01-05-2012
E003            85       Pass       02-05-2012
E001             60      Pass       03-05-2012
E001             86       Pass      01-06-2012  
E002            80      Pass     01-06-2012
E003            85       Pass       01-06-2012

need to prepare bar chart for the above employees.
There may be many employees but each employees bar should be displayed with unique colors. Also Legend should display Employee Id with its respective bar color.
Eg: E001 as Red, E002 as Pink, E003 as Blue .........

Its urgent.
Thank you
jayanthi
jayanthi
Top achievements
Rank 1
 answered on 04 Jun 2013
3 answers
198 views
Hi,

I have a radtextbox and from server code I want to trim a list of characters from the end. How to accomplish?

Thanks,
Antony.
Shinu
Top achievements
Rank 2
 answered on 04 Jun 2013
1 answer
366 views
I'm getting an error whenever I try to change the page or filter a RadGrid inside a RadPageView (which in itself is in an UpdatePanel). I only have the one control named "Audits" (the name of the PageView, not the grid) and it doesn't matter if I rename the control.

An outline of my setup is below:
<asp:UpdatePanel ID="pnl_mainUpdate" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
  <telerik:RadMultiPage ID="rdmp_pages" runat="server" SelectedIndex="0" CssClass="tabbedPage">
            <telerik:RadPageView ID="Audits" runat="server" CssClass="overflowTab">
                <telerik:RadGrid ID="rdgAudits" runat="server" AutoGenerateColumns="false" Skin="WebBlue" AllowPaging="True" PageSize="10" Width="95%" OnNeedDataSource="RdgAuditsNeedDataSource" CssClass="centreAlign" EnableHeaderContextFilterMenu="true" EnableHeaderContextMenu="true" EnableAjax="true"   >
                    <MasterTableView AllowFilteringByColumn="true" CommandItemDisplay="None" Font-Names="'Ubuntu', sans serif" IsFilterItemExpanded="false" DataKeyNames="Id"  >
                        <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false" />
                        <NoRecordsTemplate>
                            No audit history recorded
                        </NoRecordsTemplate>
                        <Columns>
                            <telerik:GridBoundColumn HeaderText="Field" DataField="Field" />
                            <telerik:GridBoundColumn HeaderText="Original Value" DataField="From" />
                            <telerik:GridBoundColumn HeaderText="New Value" DataField="To" />
                            <telerik:GridBoundColumn HeaderText="Changed By" DataField="UserName" />
                            <telerik:GridBoundColumn HeaderText="Changed" DataField="Changed" />
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>
            </telerik:RadPageView>
        </telerik:RadMultiPage>
                        <asp:UpdateProgress ID="UpdateProgressIcon" runat="server" DisplayAfter="0" AssociatedUpdatePanelID="pnl_mainUpdate">
                            <ProgressTemplate>
                                <div class="loadingPopup">
                                    <asp:Image ID="img_spinner" runat="server" ImageUrl="~/Images/spinner.gif" CssClass="loadingSpinner" />
                                </div>
                            </ProgressTemplate>
                        </asp:UpdateProgress>
                    </ContentTemplate>
                </asp:UpdatePanel>

The full error is as below:
Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Multiple controls with the same ID 'Audits' were found. FindControl requires that controls have unique IDs.
Any suggestions?
Shinu
Top achievements
Rank 2
 answered on 04 Jun 2013
2 answers
306 views
I have a grid bound to a sql data source. there are gridbound columns and gridtemplatecolumns. an example of each column is shown below. in this example, the drag and drop grouping will work for the AddressLine2 gridboundcolumn but not for the City gridtemplatecolumn.  As you can see, Groupable is set true and the template column has a GroupByExpression of City but when I drop it, no grouping occurs. what else do I need to do to make this work?

                        <telerik:GridBoundColumn DataField="AddressLine2" HeaderText="AddressLine2" SortExpression="AddressLine2" 
                            UniqueName="AddressLine2" AutoPostBackOnFilter="True"> 
                        </telerik:GridBoundColumn> 
                        <telerik:GridTemplateColumn HeaderText="City" DataField="City" SortExpression="City" 
                            Groupable="true" GroupByExpression="City" UniqueName="CityColumn" AutoPostBackOnFilter="True"> 
                            <EditItemTemplate> 
                                <telerik:RadComboBox ID="CityEditControl" runat="server" Skin="Web20" DataSourceID="lkpCities" 
                                    DataTextField="City" DataValueField="UID" SelectedValue='<%# Bind("lkpCitiesID")%>' 
                                    MarkFirstMatch="true" AppendDataBoundItems="true"> 
                                    <Items> 
                                        <telerik:RadComboBoxItem Text="Select" Value="0" /> 
                                    </Items> 
                                </telerik:RadComboBox> 
                            </EditItemTemplate> 
                            <ItemTemplate> 
                                <%#Eval("City")%> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 

Shantanu
Top achievements
Rank 2
 answered on 04 Jun 2013
3 answers
228 views
Similar to what is offered with the RadGrid, I want to be able to visualy group columns headers with the TreeList.
Unfortunately, it seems that this feature is not proposed out-of-box and I don't manage to find a way to enligh my quest.

I tried to customize the treelist. I inherit from it. I override the method RenderBeginTag of the class TreeListHeaderItem to add my own html table row above the generated header row.
But after this, RadTreeList.get_columns() doesn't work anymore, indeed it bases its logic on this newly added row.

Is there another way to customize the Treelist headers and allow column spanning?

Rgds,
Robert
Marin
Telerik team
 answered on 04 Jun 2013
3 answers
146 views
My VS2012 Install is completely hosed and everything points back to Telerik. Here is one of the event log entries for this error:

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Exception
Stack:
   at System.Windows.Application.LoadComponent(System.Object, System.Uri)
   at Telerik.VSX.Shell.Xaml.CommonXaml.InitializeComponent()
   at Telerik.VSX.Shell.VSWindow..ctor()
   at Telerik.VSX.Forms.BaseNotificationForm..ctor(System.IServiceProvider)
   at Telerik.VSX.Helpers.NotificationManager..ctor(System.IServiceProvider)
   at Telerik.KendoUI.Mvc.VSPackage.VsPackage.GetUpgradeAvailabilityMonitor()
   at Telerik.VSX.VSPackage.PackageBase+<>c__DisplayClass5.<OnSolutionOpened>b__2()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)


What could be causing this and how do I fix it?
Chavdar Dimitrov
Telerik team
 answered on 04 Jun 2013
1 answer
84 views
HI,

i am pasting bellow content in RadEditor's  through OnClientPasteHtml function,
hello<br><br><a href="http://www.gmail.com">gmail</a><br><br><a href="http://www.facebook.com">facebook</a><br><br><br>If you no longer wish to receive these emails, simply click on the following link:<a href="[!RPLINK:GLOBALUNSUBSCRIBE!]">Unsubscribe</a>

after pasting the data displaying as
hello&lt;br&gt;&lt;br&gt;&lt;a href="<a href='http://www.gmail.com">gmail</a><br><br><a'>http://www.gmail.com"&gt;gmail&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;a</a> href="<a href='http://www.facebook.com">facebook</a><br><br><br>If'>http://www.facebook.com"&gt;facebook&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;If</a> you no longer wish to receive these emails, simply click on the following link:&lt;a href="[!RPLINK:GLOBALUNSUBSCRIBE!]"&gt;Unsubscribe&lt;/a&gt;

checkout anchor tag structure is not in proper in content after pasting.

Editor properties, 
<telerik:RadEditor ID="textRadEditor" EditModes="Design" runat="server" Width="100%"
    EnableResize="false" OnClientLoad="GetContentLength" OnClientPasteHtml="OnClientPasteHtmlToText" 
    Height="550px">
    <Tools>
        <telerik:EditorToolGroup>
            <telerik:EditorTool Name="convertToTEXT" Text="Convert HTML to TEXT" ShowText="true"
                ShowIcon="false" />
            <telerik:EditorSeparator />
            <telerik:EditorTool Name="InsertEditorLinks" ShowIcon="false" ShowText="true" Text="Insert Link" />
        </telerik:EditorToolGroup>
    </Tools>
    <CssFiles>
        <telerik:EditorCssFile Value="~/Editor/RadEditorTools/EditorContentArea.css" />
    </CssFiles>
</telerik:RadEditor>

Script,
function OnClientPasteHtmlToText(sender, args) {
            //debugger;           
            var val = args.get_value();
            var name = args.get_name();
            if (name == "Paste") {
                //debugger;
                var editor = $find("<%=textRadEditor.ClientID%>")
                if (document.getElementById("hdTextPaste").value != "true") {
                    var oSelElem1 =val ;
                    var pattern = /<a[^>]*>(.*?)<\/a>/gi
                    var code = oSelElem1.match(pattern);
                    if (code != null) {
                        for (i = 0; i < code.length; i++) {
                            var url = code[i].match(/href=\"(.*?)\"/)[1];
                            var text = code[i].match(/<a[^>]*>(.*?)<\/a>/)[1];
                            if (text.toLowerCase().search("<img") >= 0)
                                oSelElem1 = oSelElem1.replace(code[i], url);
                            else
                                oSelElem1 = oSelElem1.replace(code[i], text + ':' + url);
                        }
                        editor.pasteHtml(oSelElem1);
                        var plainText = editor.get_text();
                        editor.set_html("");
                        plainText = plainText.replace(/((\r\n|\r|\n)\s*)\2/g, "$2");
                        plainText = plainText.replace(/\t/g, '    ').replace(/  /g, '&nbsp; ').replace(/\r\n|\n|\r/g, '<br />');
                        editor.set_html(plainText);
                        document.getElementById('<%= hdCampEditorTab2.ClientID %>').value = "1";                        
                    }


                }

            }
        }

any idea?

Regards,
Anwar
Danail Vasilev
Telerik team
 answered on 04 Jun 2013
1 answer
80 views
Hi,

I have a client requirement that a radio button called "Minutes"(similar to Hourly) needs to be added in the Recurrence control of the Rad scheduler.

I tried searching, but couldn't find anything on the Recurrence rule for minutes.

Could somebody help me??  
Plamen
Telerik team
 answered on 04 Jun 2013
3 answers
114 views
Hello,

Is there a way to know for which column a data cell is related to. Because I have to save a row, then put the next row in edit mode and give the focus to the cell which is in the same column than it was in the last selection. From now I almost made it but I can't find anyway to find the column index of the current selected cell.

Thanks 
Pierre
 
Princy
Top achievements
Rank 2
 answered on 04 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?