Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
108 views
Hello,

I am working on developing a Visual Web Part for SharePoint 2010, which creates a custom user control and deploys it to SharePoint. My scenario is almost identical to the scenario at: 

http://demos.telerik.com/aspnet-ajax/htmlchart/examples/drilldownchart/defaultcs.aspx 

My code is working great as a standalone website, but when I deploy as a custom user control and webpart, I get this error when I try to click on a chart series for a drill down:

  1. Uncaught Sys.InvalidOperationException: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'ctl00_m_g_cc567be1_ebdc_434d_9f34_8b649e4824a6_ctl00_ctl00_m_g_cc567be1_ebdc_434d_9f34_8b649e4824a6_ctl00_RadHtmlChart1Panel'. If it is being updated dynamically then it must be inside another UpdatePanel. ScriptResource.axd:5
    1. Error.invalidOperationScriptResource.axd:5
    2. Sys.WebForms.PageRequestManager._onFormSubmitCompletedScriptResource.axd:5
    3. (anonymous function)ScriptResource.axd:5
    4. (anonymous function)ScriptResource.axd:5
    5. Sys.Net.WebRequest.completedScriptResource.axd:5
    6. _onReadyStateChange


Based on my research, this error seems to be related to the way my RadAjaxManager works. My guess is that there must be some conflict with the SharePoint environment and how it controls webparts. If I had to guess, I would say that SharePoint is creating some kind of an ajax update container around the entire web part, and then my RadAjaxManager is creating another one, which is giving me this nested update panel error.

Here is the relevant code:

<telerik:RadButton runat="server" Icon-PrimaryIconUrl="/_layouts/images/back.gif" ID="Refresh"
    Text="Restore Original Chart" OnClick="Refresh_Click">
</telerik:RadButton>
<telerik:RadCodeBlock ID="codeBlock" runat="server">
    <script type="text/javascript">
        function pageLoad(sender, eventArgs) {
            if (!eventArgs.get_isPartialLoad()) {
                //$find("<%--RadAjaxManager.GetCurrent(this).ClientID --%>").ajaxRequest("InitialPageLoad");
            }
        }
        function OnClientSeriesClicked(sender, args) {
            //console.log(args.get_category());
            if (args.get_seriesName() != "seriesPlanMemberCount") $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest(args.get_category());
        }
    </script>
</telerik:RadCodeBlock>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadHtmlChart1" LoadingPanelID="LoadingPanel1">
                </telerik:AjaxUpdatedControl>
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="Refresh">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadHtmlChart1" LoadingPanelID="LoadingPanel1">
                </telerik:AjaxUpdatedControl>
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadHtmlChart ID="RadHtmlChart1" Skin="Sitefinity" DataSourceID="SqlDataSource1" runat="server" Height="600px"
    Width="600px" OnClientSeriesClicked="OnClientSeriesClicked">
    <ChartTitle Text="OCERS Members By Employer">
        <Appearance Align="Center" BackgroundColor="White" Position="Top">
        </Appearance>
    </ChartTitle>
    <PlotArea>
        <Series>
            <telerik:ColumnSeries DataFieldY="MEMBERCOUNT" Name="seriesMemberCount">
            </telerik:ColumnSeries>
        </Series>
        <XAxis DataLabelsField="EMPLOYER_NAME">
            <LabelsAppearance Visible="true" RotationAngle="90">
            </LabelsAppearance>
            <MinorGridLines Visible="false" />
        </XAxis>
        <YAxis>
            <LabelsAppearance DataFormatString="{0}" Visible="true">
            </LabelsAppearance>
            <MinorGridLines Visible="false" />
        </YAxis>
    </PlotArea>
    <Legend>
        <Appearance Visible="false">
        </Appearance>
    </Legend>
</telerik:RadHtmlChart>

and in the code behind:

protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            if (e.Argument == "InitialPageLoad")
            {
                Refresh_Click(sender, e);
            }
            else
            {
                if (RadHtmlChart1.PlotArea.Series[0].Name == "seriesMemberCount")
                {
                    SqlDataSource2.SelectParameters[0].DefaultValue = e.Argument;
                    RadHtmlChart1.PlotArea.XAxis.DataLabelsField = "PLAN_NAME";
                    RadHtmlChart1.PlotArea.Series[0].DataFieldY = "MEMBERCOUNT";
                    RadHtmlChart1.PlotArea.Series[0].Name = "seriesPlanMemberCount";
                    RadHtmlChart1.Skin = "Office2010Blue";
                    RadHtmlChart1.ChartTitle.Text = e.Argument + " Plan Members By Plan Type";
                    RadHtmlChart1.DataSourceID = "SqlDataSource2";
                    //Refresh.Visible = true;
                }
            }
        }

Danail Vasilev
Telerik team
 answered on 24 Jun 2013
9 answers
146 views
hi
i am using the gird with fixed header in rtl mode 

in ie9 its ok 
in chrome the header is not aligned with the data column

i attached 2 images - chrome and ie 

how can i fix this 

thanks
Maria Ilieva
Telerik team
 answered on 24 Jun 2013
1 answer
70 views
I used the following code to avoid postback of my button(btnS), and it works. When we click on the button, a radwindow which contains a repeater repR will show up:

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="True">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="btnS">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="repR" />
                </UpdatedControls>
            </telerik:AjaxSetting>  
        </AjaxSettings>        
    </telerik:RadAjaxManager>

However, if I have another button (btnW) which is within a repeater, and I used the following code. it didn't work. If i click on the button btnW, a radwindow which contains a repeater repV will show up, but still cause postback.

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="True">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="btnS">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="repR" />
                </UpdatedControls>
            </telerik:AjaxSetting>  
               
            <telerik:AjaxSetting AjaxControlID="btnW">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="repV" />
                </UpdatedControls>
            </telerik:AjaxSetting>  
        </AjaxSettings>     

    </telerik:RadAjaxManager>

Can anybody tell me how i can avoid the postback in this case?

Thanks
Kostadin
Telerik team
 answered on 24 Jun 2013
3 answers
166 views
Hey there

I am using RadCaptcha and my implementation is like that ;

<telerik:RadCaptcha ID="RadCaptcha1" runat="server" ErrorMessage="Wrong code "
                          ValidatedTextBoxID="txtCode" EnableRefreshImage="true" CaptchaLinkButtonText="Show again" CaptchaImage-TextChars="Numbers" CaptchaAudioLinkButtonText="Listen security code ">
                          <CaptchaImage BackgroundColor="White" UseAudioFiles="True" AudioFilesPath="~/App_Data/RadCaptcha" TextColor="Black" RenderImageOnly="True" EnableCaptchaAudio="True"></CaptchaImage>
 
                      </telerik:RadCaptcha>



When i click to the play audio button , page doesnt play and shows me a download option named like ; 

RadCaptcha_Audio_10773f58.wav when i open that file its correctly reading the numbers . 

All i want to do is play it automatically inside of the site
Halit
Top achievements
Rank 1
 answered on 24 Jun 2013
1 answer
79 views
Hello,

Is it possible to adjust size of the Filter windows? With Metro Touch the controls don't fit in the window and scrolling is requiered in order to view/press OK/Cancel buttons, select conditions, etc...

Regards
Blas
Venelin
Telerik team
 answered on 24 Jun 2013
3 answers
103 views
Hello,

This code below is from one of demo code from

TreeList - Forum with External Edit Form

ExpandItemToLevel() is using 50 which seems a random number!!
is there a way to find how many the level a item has to expand??

Thanks!!
case
 RadTreeList.ExpandCollapseCommandName:
//if the command is fired for a root item by the LinkButton inside it, all child items should be expanded
if ((e.Item as TreeListDataItem).HierarchyIndex.NestedLevel == 0 && e.CommandArgument.ToString() == "ExpandAll")
        {
            e.Canceled = true;
            if (!(e.Item as TreeListDataItem).Expanded)
             {
              ForumBoard.ExpandItemToLevel((e.Item as TreeListDataItem), 50);
  // 50 is a random number as Level to exand all I assume
  // is there a way to find how many level it has to expand??
               }
               else
                {
                 ForumBoard.CollapseAllItems();
                 }
           }
            EditFormPanel.Visible = false;
            break
Eyup
Telerik team
 answered on 24 Jun 2013
3 answers
123 views
I have some pages where only part of a control appears. For example, I have a grid where I only see the first 3 or 4 rows and the grid is very tall.  How can I set the loading panel position so it is center if I view the entire grid but in view if I can only see part of it. In this case I would want it to be show centered in the part of the grid I can view. If none of the grid was visible I would not need to see it.

Could there be a property like  BackgroundPosition="Center" and BackgroundPositionKeepInView="true"

This must be a common issue?
Thanks,
Marty
Kostadin
Telerik team
 answered on 24 Jun 2013
1 answer
111 views
Hi,

I have an issue with radgrid of telerik control in our application. When I try to open radgrid's records to view their full detail (In Edit Mode) I am unable to tap on any rows, it's the same on iPad/iPhone in Chrome and safari browsers.

To open Radgrid's recored in Edit Mode I use the client side rowclick event of radgrid. I also use ajax on this page.

My RowSelecting event is as follows :-

function RowSelecting(sender, eventArgs) {

            var grid = $find("<%= RadGrid1.ClientID %>");
            if (eventArgs.get_tableView().get_name() == "RadGrid") {
                if (!grid.get_masterTableView().get_dataItems()[eventArgs.get_itemIndexHierarchical()].get_isInEditMode()) {
                    grid.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
                }
            }
        } 

Can Anyone solve this problem?



Angel Petrov
Telerik team
 answered on 24 Jun 2013
1 answer
110 views
Hi,

I have scheduler in my asp.net application and having more than 200 assignments 
due to that it is very slow while moving assignments from date to another date.
I have TimeSlotCreated and AppointmentDataBound events in my page.
The AppointmentDataBound event fires as the number of times as the number of assignments .
and TimeSlotCreated event also fires on every AppointmentDataBound event.
do I have any other way to improve the  performance of my application. Pleas give me solution it is very urgent.

Thanks,
Plamen
Telerik team
 answered on 24 Jun 2013
1 answer
170 views
Hi,

   I have already sent mail regarding Rad chart copy and paste option code. But you do not reply me.  Can you reply me for Rad chart copy and paste option client side code?

Regards
Palaniappan R
Rosko
Telerik team
 answered on 24 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?