Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
696 views
Hi,

I have a page with a repeater inside a Panel. Inside the repeater, there's a radiobuttonlist and depends on what the user clicks, I have to add new rows to the repeater. The problem is I'm getting this error:

Value cannot be null.
Parameter name: page


My aspx page is like this:
 <asp:Panel runat="server" ID="updPnlQuestionnaire">
                    <%--<ContentTemplate>--%>
                         <asp:Repeater ID="rptrQuestion" runat="server" OnItemDataBound="rptrQuestion_OnItemDataBound" OnItemCreated="rptrQuestion_OnItemCreated" ClientIDMode="AutoID">
                                <ItemTemplate>
                                    <table class='questions-table'>
                                            <tr class='datarow'>
                                                <td><asp:Label ID="lblQuestion" Text='<%# Eval("Question") %>' runat="server"></asp:Label>
                                                    <asp:HiddenField ID="hdnQuestionType" runat="server" Value='<%# Eval("QuestionType") %>'/>
                                                    <asp:HiddenField ID="hdnQuestionID" runat="server" Value='<%# Eval("QuestionID") %>'/>
                                                </td>
                                            </tr>
                                     </table>
                                     <table class="questions-table">
                                        <tr class="datarow">
                                            <td>
                                                <asp:RadioButtonList ID="rblListAnswers" runat="server" OnSelectedIndexChanged="rblListAnswers_OnSelectedIndexChanged" AutoPostBack="true"></asp:RadioButtonList>
                                            </td>
                                        </tr>
                                       
                                    </table>
                                
                                </ItemTemplate>
                            </asp:Repeater>
                        
                    </asp:Panel>

While in my Item_Created, I'm adding the ajaxsettings:
 protected void rptrQuestion_OnItemCreated(object sender, RepeaterItemEventArgs e)
        {
            RadioButtonList rblListAnswers = (RadioButtonList)e.Item.FindControl("rblListAnswers");
            var ajaxManager = RadAjaxManager.GetCurrent(this.Page);
                ajaxManager.AjaxSettings.AddAjaxSetting(rblListAnswers, updPnlQuestionnaire);
        }

I've read somewhere that adding ClientIDMode="AutoID" solves this problem, but I'm still having this issue. Even adding the ajaxsettings in OnItemDataBound still gives this error.

Any help would be greatly appreciated. Thanks!
Konstantin Dikov
Telerik team
 answered on 23 Oct 2013
3 answers
176 views
Have an application where a user will step through the wizard like process and when they are satisfied they can click a button to get the results.  I would like for results that will be loaded into a RadGrid to be loaded into the RadWindow.  I have used it where I would open up an external page but this will not load an external page.  How do I get the button to work?

<telerik:RadButton ID="_btnUpdateResults" runat="server" Text="Update Results"></telerik:RadButton>


<telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true" Modal="true" Behaviors="Close"
                                    width="500px" Height="325px" ReloadOnShow="True" Animation="None" VisibleStatusbar="false" >
    <Windows>
        <telerik:RadWindow ID="RadWinResults" runat="server"
            ReloadOnShow="true" ShowContentDuringLoad="false"
            Visible="false" Overlay="true" VisibleOnPageLoad="true" style="display: inline; overflow:hidden;">
            <ContentTemplate>
                <telerik:RadGrid ID="_SearchResults" runat="server"
                    AllowPaging="True" CellSpacing="0"
                    GridLines="None" ShowGroupPanel="True"
                    AllowSorting="True" PageSize="25" Width="100%" Height="700px"
                    AllowFilteringByColumn="True">
                    <GroupingSettings CaseSensitive="False" />
                    <ExportSettings IgnorePaging="True" OpenInNewWindow="True"
                        ExportOnlyData="True" FileName="CUCustomSearch">
                        <Excel AutoFitImages="True" Format="ExcelML" />
                        <Pdf PageHeight="210mm" PageWidth="297mm" DefaultFontFamily="Arial Unicode MS" PageTopMargin="45mm"
                            BorderStyle="Medium" BorderColor="#666666">
                        </Pdf>
                    </ExportSettings>
                    <ClientSettings AllowDragToGroup="True" AllowColumnsReorder="True"
                        ReorderColumnsOnClient="True">
                        <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                    </ClientSettings>
                    <MasterTableView CommandItemDisplay="Top" InsertItemDisplay="Bottom" TableLayout="Fixed">
                    <CommandItemSettings ShowAddNewRecordButton="False"
                        ShowExportToCsvButton="False" ShowExportToExcelButton="true" ShowRefreshButton="False" ShowExportToPdfButton="True" />
                        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"
                            Visible="True">
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"
                            Visible="True">
                        </ExpandCollapseColumn>
                        <EditFormSettings>
                            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                            </EditColumn>
                        </EditFormSettings>
                    </MasterTableView>
                    <FilterMenu EnableImageSprites="False">
                    </FilterMenu>
                </telerik:RadGrid>
            </ContentTemplate>
        </telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>
Marin Bratanov
Telerik team
 answered on 23 Oct 2013
1 answer
123 views
EDIT: Sorry, as I typed this I got the answer...
Om
Top achievements
Rank 1
 answered on 23 Oct 2013
2 answers
170 views
Hi *,

I have a Webpage that contains a RadOrgChart and RadToolTip-Manager. The Content of the ToolTip is based on the ID given from the RadOrgChart. It works fine until... the session times out.

The Response as soon as the Session times out is:
RadToolTipManager response error: Exception=Sys.WebForms.PageRequestManagerServerErrorException: Value cannot be null. Parameter name: source

I've already added an check that the control should not load then the Value is null.

public void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs e)
{
    if (e.Value != null)
    {
        Control ctrl = Page.LoadControl("OrgChartUserDetail.ascx");
        ctrl.ID = Guid.NewGuid().ToString();
 
        e.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrl);
        OrgChartUserDetail details = (OrgChartUserDetail)ctrl;
        details.ID = e.Value;
    }
}
 
void orgUserOrgChart_GroupItemDataBound(object sender, Telerik.Web.UI.OrgChartGroupItemDataBoundEventArguments e)
{
    var panel = (Panel)e.Item.FindControl("Panel1");
    RadToolTipManager2.TargetControls.Add(panel.ClientID, e.Item.ID, true);
}

<telerik:RadOrgChart ID="orgUserOrgChart" runat="server" ClientIDMode="Static" OnNodeDataBound="orgUserOrgChart_NodeDataBound" GroupColumnCount="2" Skin="Silk">
<ItemTemplate>
      <asp:Panel runat="server" ID="Panel1">
           <span class="pseudoImage" style="background-image: url('<%# DataBinder.Eval(Container.DataItem, "PictureString") %>')"></span>
               <a href="<%# String.Format("mailto:{0}", DataBinder.Eval(Container.DataItem, "eMail"), "", "")%>" class="tooltipLinks">
            <img src="images/mail.png" width="25px" alt="Send Email"></a>
        </asp:Panel>
      </ItemTemplate>
      <RenderedFields>
            <NodeFields>
                   <telerik:OrgChartRenderedField DataField="Description" Label="" />
               </NodeFields>
       </RenderedFields>
</telerik:RadOrgChart>
 
 
<telerik:RadToolTipManager runat="server" ID="RadToolTipManager2" Skin="Default" OnAjaxUpdate="OnAjaxUpdate"
          Position="BottomRight" OffsetX="16" OffsetY="16" EnableShadow="false" Width="195" Height="135" HideEvent="LeaveTargetAndToolTip" />

There are no MS AJAX update panels on the side - I use the RadAjaxManager instead. The GroupItemDataBound-Event is added in the Page_Load and the UserControl loads the Content based on the ID (it loads nothing if no ID is available).
It is no big deal if the Session times out and the ToolTip-Content is not correctly loaded but I need to get rid of the error message and somehow I can't manage that.

Any help would be appreciated. I don't want to hack a 'Session-Keep-alive' or something.

Regards,
Gaby
Gabriele
Top achievements
Rank 1
 answered on 23 Oct 2013
1 answer
81 views
Hi,

   I am looking for a control like asp:Repeater but with right to left support.

   Currently, in all such controls (Repeater, DataList etc)  the first item comes on the top left, and then on the right side (or first in second row), but i want it to have first item appear on the rop right side and then on the left of it. and so on.

    So basically, it should render items in reverse orders. Is that possible? Does any telerik control support such thing?

     thanks,
     Sameers
Shinu
Top achievements
Rank 2
 answered on 23 Oct 2013
5 answers
205 views
Hi,
I tried to use the RadAjaxManager with the wizard control but there are some things I do not really understand.
1. Does the configuration dialog for the AjaxManager only work in the currently selected WizardStep?
2. If you declare some new AjaxSettings for controls in other wizard steps is it possible that those controls are not rendered correctly because the AjaxManager creates Panels around them which do not have the same settings as the controls?

Would help me a lot to know that.

Best regards
Ferdinand
Maria Ilieva
Telerik team
 answered on 23 Oct 2013
3 answers
86 views
Hi ,
We used radTooltip in Rad Grid ItemTemplate , the issue here if we load more data on grid we are getting below error in IE8 only.
"Stop running the script"
 <telerik:GridTemplateColumn DataField="Mon6" UniqueName="Mon6" Visible="false" ItemStyle-CssClass="account_Headcol">
   <ItemTemplate>
<asp:HyperLink ID="Mon6HLnk" runat="server" Visible="false"></asp:HyperLink>
<asp:Label runat="server" Text="" ID="Mon6Lbl"></asp:Label>
 <telerik:RadToolTip runat="server" ID="radTooltip6"  ShowEvent="OnMouseOver"  HideEvent="LeaveToolTip"  IsClientID="true" >
 <asp:Label runat="server" ID="lblTooltipText6"></asp:Label>
  </telerik:RadToolTip>
  </ItemTemplate>
</telerik:GridTemplateColumn>

And Binding Tooltip data in ItemDataBound event of RadGrid like below

Dim lab As Label = CType(gridDataItem("Mon" & i).FindControl("lblTooltipText" & i), Label)
lab.text="<htm><table><tr><td>data 1</td></tr><tr><td>data 2</td></tr></table></html>"

but if won't use RadTooltip i am not getting the issue,Please help me how to fix the issue with RadTooltips


Marin Bratanov
Telerik team
 answered on 23 Oct 2013
1 answer
118 views

Hi


I use the DataNavigateUrlField property to transfer users to Another page when they click a node in the tree, is there Another way to do that using JavaScript instead, for example I use this exsisting JavaScript..



<script type="text/javascript">
 
 
    function onNodeClicked(sender, args) {
        var node = args.get_node();
        node.set_expanded(!node.get_expanded());
    }
 
    function nodeClicking(sender, args) {
 
        var nodeAtt = args.get_node().get_attributes().getAttribute("toClick");
        if (nodeAtt == "NotClickable") {
            args.set_cancel(true);
            var node = args.get_node();
            node.set_expanded(!node.get_expanded());
        }
    }
</script>




Can this be modified to transfer the user to the page that is defined using the DataNavigateUrlField property?









Kate
Telerik team
 answered on 23 Oct 2013
2 answers
150 views
Hi telerik team,

I am using telerik
Version=2011.1.426.35

and got the error in IE9 or 10 can you provide any fix for this ASAP 


The code which i am using is--

</a><span><a href="javascript:;" onclick="return OpenWindow(0);">Request Demo</a>
</a><span><a href="javascript:;" onclick="return OpenWindow(1);">Watch vedio</a>

<telerik:RadWindowManager Behaviors="Close" ID="RadWindowManager" runat="server"
        VisibleStatusbar="false" VisibleOnPageLoad="false">
        <Windows>
            <telerik:RadWindow ID="winRequestDemo" VisibleOnPageLoad="false" Title="Request a Demo or more Information"
                NavigateUrl="~/PopupRequestDemo.aspx" runat="server" Width="850px" Height="640px"
                Modal="true" ReloadOnShow="true">
            </telerik:RadWindow>
            <telerik:RadWindow ID="winPopupVideoPlayer" VisibleOnPageLoad="false" Title="Product Video"
                NavigateUrl="~/PopupVideoPlayer.aspx" runat="server" Width="600px" Height="575px"
                Modal="true" ReloadOnShow="true">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>


<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script language="javascript" type="text/javascript">
            function OpenWindow(windowIndex) {
                //get the current windows collection
                var manager = $find("<%=RadWindowManager.ClientID %>");
                var windows = manager.get_windows();
                var win = windows[windowIndex];

                if (!win.isVisible()) {
                    win.show();
                    win.center();
                }
                return false;
            }
        </script>
    </telerik:RadCodeBlock>

Thanks
Pankaj
Pankaj
Top achievements
Rank 1
 answered on 23 Oct 2013
0 answers
62 views
This issue is fixed in Q1 2013 SP1.

In Q3 2013 Firefox and Chrome freeze when a container with a select element is made visible with JavaScript and RadFormDecorator is present on the page. You can follow the issue's progress here.

The issue will be fixed for the upcoming Q3 2013 SP1. For the time being possible workarounds are:
  • Setting the ControlsToSkip property of the RadFormDecorator to "Select".
  • OR placing the provided JavaScript code from the attached archive below the declaration of the RadFormDecorator.

Sample scenarios that reproduce the issue are:
  • Expanding an inner item from a RadPanelBar. The RadPanelBar has multiple Items that contain select elements and a RadFormDecorator is present on the page.
  • JavaScript is used to set the display property of a container with a select element to "block" for example, multiple containers with select elements are present on the page and RadFormDecorator is used. For example:

JavaScript:

<script type="text/javascript">
    function pageLoad() {
        $get("div1").style.display = "block";
    }
</script>
ASPX:
<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All" />
<div id="div1" style="display: none;">
    <select>
        <option>text1</option>
        <option>text2</option>
        <option>text3</option>
    </select>
</div>
<div id="div2" style="display: none;">
    <select>
        <option>text1</option>
        <option>text2</option>
        <option>text3</option>
    </select>
</div>


Telerik Admin
Top achievements
Rank 1
Iron
 asked on 23 Oct 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
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
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?