Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
148 views

I have three radgrids on one aspx page.

If you click on a row in RadGrid1 it will update the results in Radgrid2, and if you click on a row in Radgrid2 it will update the results in Radgrid3. 

 

In RadGrid3 I have a GridTemplateColumn with an ImageButton that opens a new page using the RadWindowManager.  This works great and the window opens, but only for the first row in RadGrid3.  If I click on any other row I get the following JavaScript error.

 

Get_masterTableView(0.get_dataItems()[…] is null or not an object.

 

I have used the same code for other pages and it works flawlessly.  The only difference here is I am using multiple grids vs. one grid on the page. 

 

I think since RadGrid1 had only one row the RadWindowManager is pointing to it, I need the RadWindowManager to use the results from RadGrid3


Code for WindowManager and AjaxManager
 <telerik:RadWindowManager ID="RadWindowManager1" Style="z-index: 8000" Skin="Telerik" 
           VisibleOnPageLoad="false" runat="server">  
           <Windows> 
               <telerik:RadWindow Skin="Office2007" ID="Nomination" runat="server" Title="Modify Nomination" 
                   Height="300px" Width="450px" Left="150px" ReloadOnShow="true" Modal="true" /> 
           </Windows> 
       </telerik:RadWindowManager>       
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="ButtonSearch">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                        <telerik:AjaxUpdatedControl ControlID="RadGrid2" LoadingPanelID="RadAjaxLoadingPanel1"/>  
                        <telerik:AjaxUpdatedControl ControlID="RadGrid3" LoadingPanelID="RadAjaxLoadingPanel1"/>  
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="RadGrid1">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadGrid2" LoadingPanelID="RadAjaxLoadingPanel1"/>  
                        <telerik:AjaxUpdatedControl ControlID="RadGrid3" LoadingPanelID="RadAjaxLoadingPanel1"/>  
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="RadGrid2">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadGrid3" LoadingPanelID="RadAjaxLoadingPanel1"/>  
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="RadGrid3">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadGrid3" LoadingPanelID="RadAjaxLoadingPanel1"/>  
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager>      
         <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Transparency="30" BackColor="#E0E0E0">  
            <img src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading6.gif") %>' alt="Searching..." style="border: 0; margin-top: 100px;" /> 
        </telerik:RadAjaxLoadingPanel> 
Mike
Top achievements
Rank 1
 answered on 31 Mar 2010
1 answer
300 views
Hi,
      I am trying to export one of the Nested grid which is shown when expanding the parent grid meanwhile I am getting the following error 

System.InvalidCastException: Unable to cast object of type 'Telerik.Web.Apoc.Layout.BlockArea' to type 'Telerik.Web.Apoc.Layout.AreaContainer'.
  at Telerik.Web.Apoc.Fo.Flow.BlockContainer.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area, Region region)
  at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Pagination.PageSequence.Format(AreaTree areaTree)
  at Telerik.Web.Apoc.StreamRenderer.Render(PageSequence pageSequence)
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.EndElement()
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.SystemException: System.InvalidCastException: Unable to cast object of type 'Telerik.Web.Apoc.Layout.BlockArea' to type 'Telerik.Web.Apoc.Layout.AreaContainer'.
  at Telerik.Web.Apoc.Fo.Flow.BlockContainer.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area, Region region)
  at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Pagination.PageSequence.Format(AreaTree areaTree)
  at Telerik.Web.Apoc.StreamRenderer.Render(PageSequence pageSequence)
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.EndElement()
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SystemException: System.InvalidCastException: Unable to cast object of type 'Telerik.Web.Apoc.Layout.BlockArea' to type 'Telerik.Web.Apoc.Layout.AreaContainer'.
   at Telerik.Web.Apoc.Fo.Flow.BlockContainer.Layout(Area area)
   at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
   at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area, Region region)
   at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area)
   at Telerik.Web.Apoc.Fo.Pagination.PageSequence.Format(AreaTree areaTree)
   at Telerik.Web.Apoc.StreamRenderer.Render(PageSequence pageSequence)
   at Telerik.Web.Apoc.Fo.FOTreeBuilder.EndElement()
   at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)]
   Telerik.Web.Apoc.ApocDriver.FireApocError(String message) +122
   Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader) +951
   Telerik.Web.Apoc.ApocDriver.Render(XmlReader inputReader, Stream outputStream) +293
   Telerik.Web.Apoc.ApocDriver.Render(TextReader inputReader, Stream outputStream) +61
   Telerik.Web.UI.Grid.Export.TableViewExporter.PdfExportRenderForm(HtmlTextWriter nullWriter, Control form) +2018
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +8673113
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +51
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
   Telerik.Web.UI.Grid.Export.TableViewExporter.PdfExportRenderPage(HtmlTextWriter nullWriter, Control page) +161
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +825
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266

I tested with only one column in my nested grid, eventhough i am getting the error.
<telerik:RadGrid ID="RadCustomer" runat="server"   
                                        AutoGenerateColumns="false" AllowSorting="true" Skin="Vista" EnableLinqExpressions="false" 
                                        Width="100%"  OnItemDataBound="RadCustomer_ItemDataBound" OnNeedDataSource="RadCustomer_NeedDataSource" OnItemCreated="RadCustomer_ItemCreated" OnItemCommand="RadCustomer_ItemCommand">  
                                        <ExportSettings IgnorePaging="True" OpenInNewWindow="True">  
                                            <Pdf AllowCopy="True" PageTitle="PostingNotice Billing Report" Keywords="None" Subject="RadGrid Export" 
                                                Author="Anonymous" PageHeight="8.5in" PageWidth="14in" Title="PostingNotice Billing Report" /> 
                                        </ExportSettings> 
                                        <PagerStyle Mode="NumericPages"></PagerStyle> 
                                        <SortingSettings EnableSkinSortStyles="false" />                                          
                                        <ClientSettings AllowColumnHide="True" AllowRowHide="True" AllowColumnsReorder="True" 
                                            ReorderColumnsOnClient="True">  
                                            <Resizing EnableRealTimeResize="True" ResizeGridOnColumnResize="True" AllowColumnResize="true" 
                                                ClipCellContentOnResize="false"></Resizing> 
                                        </ClientSettings> 
                                        <MasterTableView TableLayout="Fixed" Name="Forms" GroupLoadMode="Client" EnableHeaderContextMenu="true" 
                                            AllowSorting="true" AllowMultiColumnSorting="True" AllowCustomSorting="false" CommandItemDisplay="Top">  
                                            <HeaderStyle CssClass="HeaderStyle" /> 
                                            <%--<ItemStyle CssClass="ItemStyle" /> 
                                            <AlternatingItemStyle CssClass="AlternatingItemStyle" />--%> 
                                            <NoRecordsTemplate> 
                                                <div style="background-color: Silver; height: 20px; color: Red; text-align: center;  
                                                    font-size: 10pt; font-family: Verdana; font-weight: bold;"> 
                                                    <i>No forms defined for this application.</i> 
                                                </div> 
                                            </NoRecordsTemplate> 
                                            <CommandItemTemplate> 
                                                <table width="100%" class="RadCommandTable" style="padding: 0px;">  
                                                    <tr> 
                                                        <td align="center">  
                                                            <asp:Button ID="btnFormsExport" CommandName="lnkFormsExport" runat="server" Text="FExport" /> 
                                                        </td> 
                                                    </tr> 
                                                </table> 
                                            </CommandItemTemplate> 
                                            <Columns>                        
                                              
                                                <telerik:GridTemplateColumn HeaderText="Jurisdiction" SortExpression="Name" 
                                                    DataField="Name" GroupByExpression="Name Group By Name" 
                                                    UniqueName="Jurisdiction">  
                                                    <ItemTemplate> 
                                                        <asp:Label ToolTip='<%# Eval("Name") %>' Text='<%# Eval("Name") %>' ID="lblJuris" runat="server"></asp:Label> 
                                                    </ItemTemplate> 
                                                </telerik:GridTemplateColumn>                                                                                            
                                                                                                                                             
                                            </Columns> 
                                        </MasterTableView> 
                                     </telerik:RadGrid> 

My CS code is
 protected void RadCustomer_ItemCommand(object source, GridCommandEventArgs e)  
    {  
        RadGrid selGrid = (RadGrid)source;  
        if (e.Item is GridCommandItem)  
        {  
            //ExportPDF button clicks  
            if (e.CommandName == "lnkCustExport")  
            {  
                //Setting the PDF flag to true  
                isPdfExport = true;  
                ConfigureSelectFormsPDFExport(selGrid);  
                selGrid.MasterTableView.ExportToPdf();  
                e.Item.OwnerTableView.Rebind();  
            }  
        } 
So guide me to solve the issue

-Thanks
Bruno
Top achievements
Rank 2
 answered on 31 Mar 2010
1 answer
92 views
Hi!
I have a few comboboxes with load on demand and wihte "contain" filter property.
This comboboxes have database information like countries, states, etc
There is a way to configure the comboboxes with this info in a  cache object ?

Thanks and sorry for my english!
lhalfon
Top achievements
Rank 1
 answered on 31 Mar 2010
1 answer
47 views
i have radgrid and its data source is linqdatasource.datasource binding with  view

i dont know how can i change datasource of radgrid to table when updating radgrid.
Daniel
Telerik team
 answered on 31 Mar 2010
1 answer
120 views
DataSet dsAdminEventInvites = new DataSet();  
EventInvite.GetEventInvites(databaseName, eventID, ref dsAdminEventInvites, ref errorMsg);  
rgInvitesExport.DataSource = dsAdminEventInvites;  
rgInvitesExport.DataBind();  
 
rgInvitesExport.ExportSettings.OpenInNewWindow = true;  
rgInvitesExport.ExportSettings.ExportOnlyData = true;  
rgInvitesExport.ExportSettings.IgnorePaging = true;  
rgInvitesExport.ExportSettings.FileName = "EventAttendees_Report";  
 
rgInvitesExport.MasterTableView.ExportToExcel(); 

That is my export code....   here is the grid:

<telerik:RadGrid ID="rgInvitesExport" runat="server" > 
            <MasterTableView> 
                <Columns> 
                    <telerik:GridBoundColumn DataField="EventID" HeaderText="Event ID" UniqueName="EventID" /> 
                    <telerik:GridBoundColumn DataField="InviteID" HeaderText="Invite ID" UniqueName="InviteID" /> 
                    <telerik:GridBoundColumn DataField="ProfessionalID" HeaderText="Professional ID" UniqueName="ProfessionalID" /> 
                    <telerik:GridBoundColumn DataField="Title" HeaderText="Title" UniqueName="Title" /> 
                    <telerik:GridBoundColumn DataField="Affiliation" HeaderText="Affiliation" UniqueName="Affiliation" /> 
                    <telerik:GridBoundColumn DataField="Degrees" HeaderText="Degrees" UniqueName="Degrees" /> 
                    <telerik:GridBoundColumn DataField="Specialty" HeaderText="Specialty" UniqueName="Specialty" /> 
                    <telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name" UniqueName="FirstName" /> 
                    <telerik:GridBoundColumn DataField="MiddleName" HeaderText="Middle Name" UniqueName="MiddleName" /> 
                    <telerik:GridBoundColumn DataField="LastName" HeaderText="Last Name" UniqueName="LastName" /> 
                    <telerik:GridBoundColumn DataField="City" HeaderText="City" UniqueName="City" /> 
                    <telerik:GridBoundColumn DataField="State" HeaderText="State" UniqueName="State" /> 
                    <telerik:GridBoundColumn DataField="Province" HeaderText="Province" UniqueName="Province" /> 
                    <telerik:GridBoundColumn DataField="PostalCode" HeaderText="Zip" UniqueName="Zip" /> 
                    <telerik:GridBoundColumn DataField="OfficePhone" HeaderText="OfficePhone" UniqueName="OfficePhone" /> 
                    <telerik:GridBoundColumn DataField="OfficePhoneExt" HeaderText="OfficePhoneExt" UniqueName="OfficePhoneExt" /> 
                    <telerik:GridBoundColumn DataField="CellPhone" HeaderText="CellPhone" UniqueName="CellPhone" /> 
                    <telerik:GridBoundColumn DataField="Fax" HeaderText="Fax" UniqueName="Fax" /> 
                    <telerik:GridBoundColumn DataField="Email" HeaderText="Email" UniqueName="Email" /> 
                    <telerik:GridBoundColumn DataField="DietaryNeed" HeaderText="Dietary Need" UniqueName="DietaryNeed" /> 
                    <telerik:GridBoundColumn DataField="DietaryNeedOther" HeaderText="Dietary Need Other" UniqueName="DietaryNeedOther" /> 
                    <telerik:GridBoundColumn DataField="BestContact" HeaderText="Best Contact" UniqueName="BestContact" /> 
                    <telerik:GridBoundColumn DataField="BestContactOther" HeaderText="Best Contact Other" UniqueName="BestContactOther" /> 
                    <telerik:GridBoundColumn DataField="ResponseDateTime" HeaderText="Registered Date and Time" UniqueName="ResponseDateTime" /> 
                    <telerik:GridBoundColumn DataField="Status" HeaderText="Status" UniqueName="Status" /> 
                </Columns>                          
            </MasterTableView> 
        </telerik:RadGrid> 

When I export the grid that full dataset is attached after the grid data as extra columns!!!  Help!
Daniel
Telerik team
 answered on 31 Mar 2010
7 answers
217 views
Hi,

I was experimenting with the samples of RadMenu and was testing the sample in which the menu items are made of only images. What I noticed is that when I hover my mouse over various items, their onHover image gets loaded at that particular time which causes some delay before reflecting that the menu item has been selected. It is due to the time it takes to load the state images.

I would like to suggest could you please make the menu Preload images before the menu gets rendered on screen. That is the images of the states should not be loaded at the time of hovering, instead in the beginning of the page, and the various states should be reflected at the same time. This is annoying infact to have to wait until the item image loads, which can take some time based on the size of the file, and I feel that it takes away the professional touch.

Thank you.
Ryan Mariotti
Top achievements
Rank 1
 answered on 31 Mar 2010
3 answers
355 views
I see that the file explorer allows files to be checked by their file extension. Is it possible to check files based on mime type?
Dobromir
Telerik team
 answered on 31 Mar 2010
3 answers
259 views
Hi,

is it possible to select a directory instead a file?
Dobromir
Telerik team
 answered on 31 Mar 2010
1 answer
88 views
Hi all,


         I am ned to find a solution for the following poblem.

Problem:

       I am using a Scheduler. When i click Update in edit appointment mode i used a checking. from the result i want to decide whether
i display an error message(in Required Field Validator or Label).

     I did it But before the display message the page comes out of Edit mode and comes to Scheduler.

So i wanna do is Stick the page control the edit page itself.
I tried Return; But it did not Work.


I am using ascx page while edit.


So pls any one help me....


Regards,
Leo.
Olivier Cotasson
Top achievements
Rank 1
 answered on 31 Mar 2010
1 answer
120 views
Hello,

I am planning to substitute the calendar in my website with the Scheduler control. Would it be possible to remove the "editing" function of the control (like a property that I need to toggle) when viewed by the public and have instead an admin page that has the edit control placed behind authenticated pages?
Greg
Top achievements
Rank 2
 answered on 31 Mar 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?