Telerik Forums
UI for ASP.NET AJAX Forum
12 answers
993 views
Hi,

I'm having troubles using the export on my detail tables. In my page I've placed one RagGrid with a MasterTableView, in it is a detailTable and in there is another detailTable. I've set some export settings in the grid, like IgnorePaging = "true", and enabled the commandItemDisplay for the masterViewTable and for both detailTables.

The export of the Master works as expected, only the master table data ingnoring paging. However when pressing one of the export buttons on one of the two detail grids, the settings are ignored and the export only contains the visible records of the detailpage. This is the code (there is no code behind for the export).

<telerik:RadGrid GridTableView="true" ID="grdBuyer" runat="server" Visible="false"
            AutoGenerateColumns="false"
            AllowPaging="true"
            PageSize="10"
            AllowSorting="true"
 
            PagerStyle-AlwaysVisible="true"
 
            OnNeedDataSource="grdBuyer_NeedDataSource"
            OnItemCommand="grdGeneral_ItemCommand"
            OnDetailTableDataBind="grdBuyer_DetailTableDataBind"
          >
  
            <ExportSettings IgnorePaging="true" OpenInNewWindow="true" ExportOnlyData="true" HideStructureColumns="true" />
            <MasterTableView DataKeyNames="buyer_member_id" CommandItemDisplay="Top">
              <CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true" ShowExportToCsvButton="true" ShowExportToPdfButton="true" ShowAddNewRecordButton="false" ShowRefreshButton="false"/>
              <Columns>
                <telerik:GridBoundColumn DataField="buyer_member" HeaderText="Buyer" />
                <telerik:GridButtonColumn DataTextField="revenue" HeaderText="Revenue" CommandName="show_stats_rev" DataTextFormatString="$ {0:n2}">
                  <ItemStyle Width="150" />
                </telerik:GridButtonColumn>
                <telerik:GridButtonColumn DataTextField="imps" HeaderText="Impressions" CommandName="show_stats_imps" DataTextFormatString="{0:n0}">
                  <ItemStyle Width="150" />
                </telerik:GridButtonColumn>
                <telerik:GridButtonColumn DataTextField="ecpm" HeaderText="eCPM" CommandName="show_stats_ecpm" DataTextFormatString="$ {0:n2}">
                  <ItemStyle Width="100" />
                </telerik:GridButtonColumn>
              </Columns>
               
              <DetailTables>
                <telerik:GridTableView DataKeyNames="buyer_member_id,country" Name="country" PageSize="5" CommandItemDisplay="Top" CanRetrieveAllData="true">
                  <CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true" ShowExportToCsvButton="true" ShowExportToPdfButton="true" ShowAddNewRecordButton="false" ShowRefreshButton="false"/>
                  <Columns>
                    <telerik:GridBoundColumn DataField="name" HeaderText="Country" />
                    <telerik:GridButtonColumn DataTextField="revenue" HeaderText="Revenue" CommandName="show_stats_country_rev" DataTextFormatString="$ {0:n2}">
                      <ItemStyle Width="150" />
                    </telerik:GridButtonColumn>
                    <telerik:GridButtonColumn DataTextField="imps" HeaderText="Impressions" CommandName="show_stats_country_imps" DataTextFormatString="{0:n0}">
                      <ItemStyle Width="150" />
                    </telerik:GridButtonColumn>
                    <telerik:GridButtonColumn DataTextField="ecpm" HeaderText="eCPM" CommandName="show_stats_country_ecpm" DataTextFormatString="$ {0:n2}">
                      <ItemStyle Width="100" />
                    </telerik:GridButtonColumn>
                  </Columns>
                  <DetailTables>
                    <telerik:GridTableView DataKeyNames="buyer_member_id,country,size" Name="size" PageSize="5" CommandItemDisplay="Top">
                      <CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true" ShowExportToCsvButton="true" ShowExportToPdfButton="true" ShowAddNewRecordButton="false" ShowRefreshButton="false"/>
                      <Columns>
                        <telerik:GridBoundColumn DataField="size" HeaderText="Size" /> 
                        <telerik:GridButtonColumn DataTextField="revenue" HeaderText="Revenue" CommandName="show_stats_country_size_rev" DataTextFormatString="$ {0:n2}">
                          <ItemStyle Width="150" />
                        </telerik:GridButtonColumn>
                        <telerik:GridButtonColumn DataTextField="imps" HeaderText="Impressions" CommandName="show_stats_country_size_imps" DataTextFormatString="{0:n0}">
                          <ItemStyle Width="150" />
                        </telerik:GridButtonColumn>
                        <telerik:GridButtonColumn DataTextField="ecpm" HeaderText="eCPM" CommandName="show_stats_country_size_ecpm" DataTextFormatString="$ {0:n2}">
                          <ItemStyle Width="100" />
                        </telerik:GridButtonColumn>
                      </Columns>
                    </telerik:GridTableView>
                  </DetailTables>
                </telerik:GridTableView>
              </DetailTables>
 
            </MasterTableView>
          </telerik:RadGrid>

Could someone please help me how to use these export settings for the detailtables?

Thanks,
Danny
Shinu
Top achievements
Rank 2
 answered on 07 Apr 2014
1 answer
182 views
Hi, 

We are using the rad scheduler for appointments.  If the user want's to delete the appointment, it is displaying "Are you sure you want to delete the appointment".

But we need custom message based on the appointment type. 

 For Example: 
1.  Appointment Type #1 :  Message #1 
2.  Appointment Type #2 :  Message #2.


Please help me.

Thanks,
Praveen
Plamen
Telerik team
 answered on 07 Apr 2014
1 answer
93 views
I have a radgrid which has a mastertableview, with editmode is set to ‘batch’, in one column I have a GridTemplateColumn with an EditItemTemplate.  The EditItemTemplate has a button that displays a popup RadWidow from which the user can search and select the value for the column. The problem I am having is that when a new row is added the search button is displayed but when it is selected and the poup widow is displayed all new rows disappear, including any values entered in other columns. 

Is there a way to display a popup RadWindow from which a value can be selected without losing the new row?
Terry
Top achievements
Rank 1
 answered on 07 Apr 2014
3 answers
124 views
I have created a Nested grid having MasterTableView and one DetailTable. I am using BatchEdit functionality. I used Telerik.Web.UI.dll version "2013.2.611.45" earlier when created it. It was working fine but when I upgraded my Telerik.Web.UI.dll to version "2013.2.717.45" , when I click on row for editing it I gets error:
Error: Unable to get property '_data' of undefined or null reference.

Please get this issue resolved.

Thanks.
Imran
Angel Petrov
Telerik team
 answered on 07 Apr 2014
4 answers
90 views
Hello,
I'm using a ajax radgrid with an edit form (templated) into a popup (EditMode="PopUp"). Recently we updated our website from .NET 3.5 to .NET 4.0 so lots of configuration have changed (application pool, etc). My new radgrid is perfectly working on our test platform, but on another server the popup is not showing when I click on "Add new record" button.

I tried to switch to EditMode="EditForms", to see if it changed anything on this server. When clicking on the add button, the form is displayed apparently correctly on the top of the radgrid. But I noticed that the validators controls didn't perform client side validation.

When looking at the response of the server (with firebug) when clicking on the add button, it seems that some code is missing at the end of the response : the code that perform the client side validation. Could this explain why the popup is not showing in EditMode="PopUp" mode ? Some missing javascript code ?

Please note that the radgrid is working correctly on another server, so I'm pretty sure this is a telerik configuration issue. But I don't know where and what to check.
I'm available if you need another details about the problem. Thanks in advance for your help.
Angel Petrov
Telerik team
 answered on 07 Apr 2014
1 answer
130 views
I added Rad Content Menu to Rad grid but when i right click on Grid rows i don't see the menu coming up. Do i have to enable anything ? Please let me know.

Here is my code:

<script type="text/javascript">
         function RowContextMenu(index, e)
         {
           
             
             var menu = $find("<%=RadMenu1.ClientID %>");
             
              var evt = eventArgs.get_domEvent();
             var menuItem = menu.findItemByText("View");
            menuItem.set_navigateUrl("SalesDashboard.aspx?userType=VP&amp;MetricYear=2014&amp;SalesPerson=IACORP\Jeff.Rodgers");
            menu.show(evt);
            }
     </script>
                                                    

  <telerik:RadGrid ID="RadGrid1" Width="60.5%" runat="server" OnNeedDataSource="radGrid_NeedDataSource"            
                         AutoGenerateColumns="false" GroupingSettings-GroupByFieldsSeparator="" AllowMultiRowEdit="true" OnItemDataBound="RadGrid1_ItemDataBound" OnPreRender="RadGrid1_PreRender" ClientSettings-ClientEvents-OnColumnContextMenu="true" >
            <MasterTableView ShowGroupFooter="false" EditMode="InPlace" DataKeyNames="SalesPerson">
                                  
                <Columns>              
                            
                 <telerik:GridBoundColumn UniqueName="Jt.Calls" DataField="Jt. Calls" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"  ColumnGroupName="Monthly Activity" HeaderText="Jt. Calls" />
                 <telerik:GridBoundColumn UniqueName="Demos" DataField="Demos" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"  ColumnGroupName="Monthly Activity" HeaderText="Demos" />
                 
                </Columns>

                </MasterTableView>
          <ClientSettings>
            <ClientEvents OnRowContextMenu="RowContextMenu" />           
            <Selecting AllowRowSelect="true" />
        </ClientSettings>
        </telerik:RadGrid>
   
 <telerik:RadContextMenu ID="RadMenu1" runat="server" Skin="Vista" EnableRoundedCorners="true" EnableShadows="true" OnItemClick="RadMenu1_ItemClick">
        <Targets>
               <telerik:ContextMenuControlTarget ControlID="RadGrid1" />
          </Targets>
            <Items>
             <telerik:RadMenuItem Text="View"  />
     
            </Items>
</telerik:RadContextMenu>                        






Plamen
Telerik team
 answered on 07 Apr 2014
1 answer
89 views
hey every one
i am using web http://demos.telerik.com/aspnet-ajax/webmail problem is that if net connection not availble the whole website has been crashed . In an Attachment is the output of crash web, how to fix this. please help me 

thanks in advance.
Plamen
Telerik team
 answered on 07 Apr 2014
6 answers
312 views
Hi,

I'm running in some trouble with the Sceduler when using the EnableExactTimeRendering="true" option.

I'm using the Telerik version  Q1 2011.

The error only occurs when the exact rendering is set tot True and it seems to happen when the following appointment is created:
2010-12-03 08:30:00.000 till 2010-12-03 13:10:00.000

The complete error message:

Height must be non negative.
Parameter name: value 
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.ArgumentOutOfRangeException: Height must be non negative.
Parameter name: value
  
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: 
  
  
[ArgumentOutOfRangeException: Height must be non negative.
Parameter name: value]
   System.Web.UI.WebControls.Style.set_Height(Unit value) +8673920
   System.Web.UI.WebControls.WebControl.set_Height(Unit value) +30
   Telerik.Web.UI.AppointmentControl.CalculateSize() +376
   Telerik.Web.UI.DayViewAppointmentControl.CalculateSize() +83
   Telerik.Web.UI.Scheduler.Views.RowBuilder..ctor(IList`1 slotList, Int32 maxColumnWidth) +1121
   Telerik.Web.UI.Scheduler.Views.Week.RendererBase.CreateViewRows(IList`1 slotLists) +290
   Telerik.Web.UI.Scheduler.Views.Week.RendererBase.CreateInnerContentTable(Control container, IList`1 slotLists) +138
   Telerik.Web.UI.Scheduler.Views.Week.Renderer.GetInnerContent() +245
   Telerik.Web.UI.Scheduler.Views.Week.Renderer.GetContent() +127
   Telerik.Web.UI.RadScheduler.CreateContent() +221
   Telerik.Web.UI.RadScheduler.CreateChildControls(Boolean bindFromDataSource) +195
   Telerik.Web.UI.RadScheduler.CreateChildControls() +34
   System.Web.UI.Control.EnsureChildControls() +87
   System.Web.UI.Control.PreRenderRecursiveInternal() +44
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
  
  

Markup:
<telerik:RadScheduler ID="rs_Planner" runat="server" Culture="Dutch (Netherlands)"
    DataKeyField="ID" DataStartField="datumtijdvan" DataEndField="datumtijdtot" DataSubjectField="TypeOmschrijving"
    EnableExactTimeRendering="true" HoursPanelTimeFormat="HHtt" LastDayOfWeek="Sunday"
    FirstDayOfWeek="Monday" OverflowBehavior="Expand" Width="100%">
    <WeekView ColumnHeaderDateFormat="ddd, d MMM" HeaderDateFormat="d-MMM-yyyy" />
    <Localization AdvancedAllDayEvent="All day" AdvancedCalendarCancel="Annuleren" AdvancedCalendarToday="Vandaag"
        HeaderDay="Dag" HeaderMonth="Maand" HeaderToday="Vandaag"></Localization>
    <ResourceStyles>
        <telerik:ResourceStyleMapping Type="TypeOmschrijving" Text="Ziek" ApplyCssClass="rsCategoryPink" />
        <telerik:ResourceStyleMapping Type="TypeOmschrijving" Text="Verwijderd" ApplyCssClass="rsCategoryOrange" />
        <telerik:ResourceStyleMapping Type="TypeOmschrijving" Text="Present" ApplyCssClass="rsCategoryGreen" />
        <telerik:ResourceStyleMapping Type="TypeOmschrijving" Text="Absent" ApplyCssClass="rsCategoryRed" />
        <telerik:ResourceStyleMapping Type="TypeOmschrijving" Text="Te laat" ApplyCssClass="rsCategoryYellow" />
        <telerik:ResourceStyleMapping Type="TypeOmschrijving" Text="Regulier absent" ApplyCssClass="rsCategoryGrey" />
    </ResourceStyles>
    <AdvancedForm DateFormat="d-M-yyyy" TimeFormat="H:mm" Modal="true"></AdvancedForm>
</telerik:RadScheduler>

VB.NET code:
Sub SetUpPlanningScheduler()
    ' set up views 
    rs_Planner.SelectedView = SchedulerViewType.WeekView 
    rs_Planner.MonthView.UserSelectable = False '
    rs_Planner.WeekView.UserSelectable = True
    rs_Planner.TimelineView.UserSelectable = False
    rs_Planner.DayView.UserSelectable = False
    ' appearance 
    rs_Planner.DayView.HeaderDateFormat = "dddd, dd MMMM yyyy"
    rs_Planner.ShowFooter = False
    rs_Planner.ShowAllDayRow = False
    rs_Planner.MinutesPerRow = 15
    rs_Planner.HoursPanelTimeFormat = "HH:mm"
    rs_Planner.FirstDayOfWeek = System.DayOfWeek.Monday
    rs_Planner.LastDayOfWeek = System.DayOfWeek.Friday
    rs_Planner.RowHeight = New Unit(16, UnitType.Pixel)
    ' set up data source 
    rs_Planner.DataKeyField = "ID"
    rs_Planner.DataStartField = "datumtijdvan"
    rs_Planner.DataEndField = "datumtijdtot"
    rs_Planner.DataSubjectField = "TypeOmschrijving"
    rs_Planner.DataDescriptionField = "Omschr"
    ' set up Resources 
    rs_Planner.ResourceTypes.Clear()
    Dim rt As New ResourceType("TypeOmschrijving")
    rt.KeyField = "TypeOmschrijving"
    rt.ForeignKeyField = "TypeOmschrijving"
    rt.TextField = "TypeOmschrijving"
    rs_Planner.ResourceTypes.Add(rt)
    rs_Planner.Resources.Add(New Resource("TypeOmschrijving", "Ziek", "Ziek"))
    rs_Planner.Resources.Add(New Resource("TypeOmschrijving", "Present", "Present"))
    rs_Planner.Resources.Add(New Resource("TypeOmschrijving", "Verwijderd", "Verwijderd"))
    rs_Planner.Resources.Add(New Resource("TypeOmschrijving", "Absent", "Absent"))
    rs_Planner.Resources.Add(New Resource("TypeOmschrijving", "Regulier absent", "Regulier absent"))
    rs_Planner.Resources.Add(New Resource("TypeOmschrijving", "Te laat", "Te laat"))
    rs_Planner.AllowDelete = False
    rs_Planner.AllowEdit = False
    rs_Planner.AllowInsert = False
    rs_Planner.ReadOnly = True 'dissallows moving
End Sub

Data that is loaded into the sceduler:
TypeOmschrijving    datumtijdvan    datumtijdtot
Te laat 2010-11-29 09:15:00.000 2010-11-29 09:24:00.000
Present 2010-11-29 09:24:00.000 2010-11-29 09:25:00.000
Verwijderd  2010-11-29 09:25:00.000 2010-11-29 10:00:00.000
Present 2010-11-29 10:25:00.000 2010-11-29 11:10:00.000
Present 2010-11-29 12:25:00.000 2010-11-29 13:55:00.000
Present 2010-11-29 14:10:00.000 2010-11-29 14:55:00.000
Present 2010-11-30 08:30:00.000 2010-11-30 09:15:00.000
Present 2010-11-30 09:15:00.000 2010-11-30 10:00:00.000
Present 2010-11-30 10:25:00.000 2010-11-30 11:46:00.000
Verwijderd  2010-11-30 11:46:00.000 2010-11-30 11:55:00.000
Present 2010-11-30 12:25:00.000 2010-11-30 13:55:00.000
Present 2010-11-30 14:10:00.000 2010-11-30 14:55:00.000
Present 2010-12-01 09:15:00.000 2010-12-01 10:00:00.000
Present 2010-12-01 10:25:00.000 2010-12-01 11:10:00.000
Present 2010-12-01 11:10:00.000 2010-12-01 11:55:00.000
Present 2010-12-01 12:25:00.000 2010-12-01 13:10:00.000
Present 2010-12-01 13:10:00.000 2010-12-01 14:55:00.000
Present 2010-12-02 08:30:00.000 2010-12-02 09:15:00.000
Present 2010-12-02 10:25:00.000 2010-12-02 11:55:00.000
Present 2010-12-02 13:10:00.000 2010-12-02 13:55:00.000
Present 2010-12-03 08:30:00.000 2010-12-03 13:10:00.000
Present 2010-12-06 09:15:00.000 2010-12-06 10:00:00.000
Present 2010-12-06 10:25:00.000 2010-12-06 11:10:00.000
Te laat 2010-12-06 12:25:00.000 2010-12-06 12:30:00.000
Present 2010-12-06 12:30:00.000 2010-12-06 13:55:00.000
Plamen
Telerik team
 answered on 07 Apr 2014
3 answers
105 views
Hi,
In our project we are working on a page built using vb.net, asp.net, telerik contorls. In this we have used 8 Telerik grids which are depended on each other. If we change some value in a row the others grids need to refresh with changed value. Below are the keyponints which we have done so far on this page:

Use lot of custom css for the whole page and grids in it.
Frozen coloums feature has been applied on all grids
Grids are dependent, so need to render the all gird if user change some value in row of a grid and save it. (Lot of Ajaxifying)
When user does a minor operation like edit a rown of a grid, there is a lot of DOM  manipulation.
Browser we are using to run the app is IE 8 with compatibility mode(IE7 Doc standards)
Complex buisiness logic written for the grids on server as well as client side.
8 radgrid on the page.
When user does any partial postback like save/delete/edit/add in a grid it takes around 3, 4 seconds to render the page (Request-Response-Rendering time).
Columns width are changed at runtime by javascript for all grids.
All grids have view state enabled.
Everything is on one page, didn't use user control. vb.net file is around 30K LOC(Maintained in Partial Classes), HTML page is around 4K LOC, javascript file is around 5K LOC.
RadCompression is applied.
All scripts are added in the RadScriptManager->Scripts collection.

I know that looking at the number of lines and complexe business logic it wont be possible for anyone to just guess what could be done.
But I am asking this because the 4-5 seconds time is taken for any partial postback done. So I think there might be some tweaks that could be done on the server code to improve the server response.
I would really appreciate if anyone has any suggestions on how to improve the page performace. The expected time is from 1 to 1.5 seconds.






Princy
Top achievements
Rank 2
 answered on 07 Apr 2014
9 answers
1.5K+ views
Hi
I have a radgridview with multiple rows selected.
How can I get the current selected row index in gridview selectedIndexChanged event?
Princy
Top achievements
Rank 2
 answered on 07 Apr 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?