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

I have a page that has a number of complicated radgrids on it - lots of template columns, lots of eval statements, custom controls binding to properties of properties, etc. I'm already using custom paging with this, and my page size is 60 records. The underlying data source is a list of objects. It's taking something like 6 or 7 seconds just to get from the Grid DataBinding event to the Grid DataBound event. This decreases as I remove columns from my grid. 

 - I know that Microsoft mentions that Eval can be slow because it uses reflection (http://msdn.microsoft.com/en-us/library/4hx47hfe(v=vs.110).aspx), so I'm trying to find ways to avoid that. Would I get any improvement by making the grid itself pretty simple with the data in individual GridBoundColumn columns, and then doing more complicated formatting/binding in the ItemDataBound event. 

- Some of my template columns contain custom controls that bind from an object. That object is a property of the object I'm binding to the grid. Would this cause performance issues? Should my datasource be very flat rather than having nested objects? Could I store the object in the DataKey collection? I can't imagine that populating the DataKey collection with a ton of data is a very good for performance.

- Other than values that have already been bound to the grid, the only way to access underlying data in the ItemDataBound event is by storing it in the DataKey collection, right? There's no way to access the underlying object I'm binding to, right?

For reference, here is an example of one the grids:

<rad:RadGrid ID="gridData" AllowFilteringByColumn="false" AllowSorting="false" runat="server"
    Ondate="GridData_DataBinding" OnNeedDataSource="GridData_NeedDataSource" OnItemDataBound="GridData_ItemDataBound"
    OnItemCommand="GridData_ItemCommand" OnUpdateCommand="GridData_ItemUpdated">
    <GroupingSettings CaseSensitive="false" />
    <ExportSettings ExportOnlyData="false" />
    <MasterTableView Name="Exceptions" EditMode="InPlace" EnableHeaderContextMenu="true" DataKeyNames="MurexMkt, PrimaryTicker">
        <Columns>
            <rad:GridTemplateColumn HeaderText="" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="10"
                HeaderStyle-Font-Bold="true" UniqueName="Approve" AllowFiltering="false">
                <HeaderTemplate>
                    <input type="checkbox" id="chkAll" onclick="CheckAll(this);" />
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:CheckBox ID="chkApprove" Style="margin-right: -6px;" runat="server" CssClass="GridApproveCheckbox" />
                </ItemTemplate>
            </rad:GridTemplateColumn>
            <rad:GridBoundColumn DataField="StagePriceExceptionId" ReadOnly="true" HeaderText="ExcID"
                AllowFiltering="false" HeaderStyle-Width="40" Display="false" />
            <rad:GridBoundColumn DataField="StagePriceId" ReadOnly="true" HeaderText="ID" AllowFiltering="false"
                Display="false" HeaderStyle-Width="40" />
            <rad:GridBoundColumn DataField="SecurityId" UniqueName="SecurityId" Display="false" HeaderText="Security Id" />
            <rad:GridBoundColumn DataField="PriceTypeId" UniqueName="PriceTypeId" Display="false" HeaderText="Price Type Id" />
            <rad:GridBoundColumn DataField="AsOfDate" ReadOnly="true" HeaderText="Date" DataFormatString="{0:MM/dd/yyyy}"
                ItemStyle-CssClass="GridColNumber" />
            <rad:GridTemplateColumn UniqueName="SecurityName" HeaderText="Security" ReadOnly="true" DataField="SecurityName">
                <ItemTemplate>
                    <asp:HyperLink ID="hl1" runat="server" NavigateUrl='<%# string.Format("~/SecurityXRef/SecurityXref.aspx?menuId=g2&search={0}", Eval("Ticker")) %>'>
                        <%# Eval("SecurityName") %>
                    </asp:HyperLink>
                </ItemTemplate>               
            </rad:GridTemplateColumn>
            <rad:GridBoundColumn DataField="SecurityName" UniqueName="SecurityNameSimple" HeaderText="Security" Display="false" />
            <rad:GridBoundColumn DataField="SecurityIsin" HeaderText="ISIN" Display="false" />
            <rad:GridBoundColumn DataField="Ticker" HeaderText="Ticker" ReadOnly="true" />           
            <rad:GridBoundColumn DataField="RIC" HeaderText="RIC" ReadOnly="true" /> 
            <rad:GridBoundColumn DataField="CurrencyCode" HeaderText="Currency" ReadOnly="true" />               
            <rad:GridBoundColumn UniqueName="PrimarySource" DataField="DataSourceShortName" ReadOnly="true" HeaderText="Primary Source" HeaderStyle-Wrap="true"/>
            <rad:GridBoundColumn DataField="PriceType" HeaderText="Price Type" ReadOnly="true" />         
            <rad:GridTemplateColumn HeaderText="Price" UniqueName="PriceCol" ItemStyle-CssClass="GridColNumber" DataField="PriceLast" SortExpression="PriceLast" >
                    <ItemTemplate>
                         <rad:RadToolTip ID="radToolTipPrice" runat="server" TargetControlID="lnkOverride">
                            <div style="text-align:left !important;">
                                <strong>Data Source: </strong> <%# Eval("DataSourceShortName")%><br />
                                <strong>Price Type: </strong> <%# Eval("PriceType")%> <br />
                                <strong>Field: </strong> <%# Eval("DataSourceFieldName")%> <br />
                                <strong>Comment: </strong> <%# Eval("Comments")%>
                            </div>                           
                        </rad:RadToolTip>
                        <asp:LinkButton ID="lnkOverride" runat="server" CommandName="Edit" DataTextFormatString="{0:0.000000}"/>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <div style="text-align:left !important;">
                            <strong>Override: </strong><br /><asp:TextBox ID="txtOverride" runat="server" Text='<%# Eval("PriceLast","{0:0.000000}") %>'/><br />
                            <strong>Comment: </strong><br /><asp:TextBox ID="txtComment" runat="server" TextMode="MultiLine" Text= '<%# Eval("Comments")%>' Rows="3" />
                            <p>
                                <asp:CheckBox ID="chkAddHAndPrice" runat="server" Text="Add Fixed Price" />
                            </p>
                            <asp:LinkButton ID="lnkSave" runat="server" CommandName="Update" Text="Update" />
                            <asp:LinkButton ID="lnkCancel" runat="server" CommandName="Cancel" Text="Cancel"/>
                        </div>
                    </EditItemTemplate>
                </rad:GridTemplateColumn>     
            <rad:GridBoundColumn DataField="JobName" HeaderText="Loader" UniqueName="Loader"
                Visible="false" />
            <rad:GridBoundColumn DataField="IsOverride" Visible="false" />
            <rad:GridBoundColumn DataField="PriceLast" Display="false" />
            <rad:GridTemplateColumn HeaderText="Bloomberg Price"  UniqueName="BloombergSource" AllowFiltering="false" ItemStyle-CssClass="GridColNumber" Display="false" HeaderStyle-Wrap="true" >
                    <ItemTemplate>
                        <%--<rad:RadToolTip ID="radToolTipBbg" runat="server" TargetControlID="lblBbgSource" >
                           <div style="text-align:left !important;">
                                <strong>Data Source:</strong> <%# Eval("BbgDataSource") %>
                                <br /><br />
                                <strong>Field:</strong> <%# Eval("BbgField") %> <br />
                                <strong>Loader:</strong> <%# Eval("BbgJob") %><br />
                                <strong>Loaded At:</strong> <%# Eval("BbgCreated") %>
                            </div>                           
                        </rad:RadToolTip>
                        <asp:Label ID="lblBbgSource" runat="server" Text='<%# Eval("BbgPrice","{0:0.000000}") %>' />--%>
                         <HMC:GridPrice Id="GridPriceBbg" runat="server" Price='<%# Eval("BbgPriceVO") %>' />
                    </ItemTemplate>
                </rad:GridTemplateColumn>    
                <rad:GridTemplateColumn HeaderText="" DataField="AltSource1" UniqueName="AltSource1" AllowFiltering="false" ItemStyle-CssClass="GridColNumber" Visible="false" HeaderStyle-Wrap="true" >
                    <ItemTemplate>
                        <HMC:GridPrice Id="GridPrice1" runat="server" Price='<%# Eval("AltSource1VO") %>' />
                    </ItemTemplate>
                </rad:GridTemplateColumn>           
                <rad:GridTemplateColumn HeaderText="Secondary Price" DataField="AltSource2" UniqueName="AltSource2" AllowFiltering="false" ItemStyle-CssClass="GridColNumber" Visible="false" HeaderStyle-Wrap="true" >
                    <ItemTemplate>
                        <HMC:GridPrice Id="GridPrice2" runat="server" Price='<%# Eval("AltSource2VO") %>' />
                    </ItemTemplate>
                </rad:GridTemplateColumn>
                <rad:GridTemplateColumn HeaderText="Tertiary Price" UniqueName="AltSource3" AllowFiltering="false" ItemStyle-CssClass="GridColNumber" Visible="false" HeaderStyle-Wrap="true" >
                    <ItemTemplate>
                        <HMC:GridPrice Id="GridPrice3" runat="server" Price='<%# Eval("AltSource2VO") %>' />
                    </ItemTemplate>
                </rad:GridTemplateColumn>
                <rad:GridTemplateColumn HeaderText="Fourth Price" DataField="AltSource4" UniqueName="AltSource4" AllowFiltering="false" ItemStyle-CssClass="GridColNumber" Visible="false" HeaderStyle-Wrap="true" >
                    <ItemTemplate>
                       <HMC:GridPrice Id="GridPrice4" runat="server" Price='<%# Eval("AltSource2VO") %>' />
                    </ItemTemplate>
                </rad:GridTemplateColumn>
                <rad:GridTemplateColumn HeaderText="Fifth Price" DataField="AltSource5" UniqueName="AltSource5" AllowFiltering="false" ItemStyle-CssClass="GridColNumber" Visible="false" HeaderStyle-Wrap="true" >
                    <ItemTemplate>
                        <HMC:GridPrice Id="GridPrice5" runat="server" Price='<%# Eval("AltSource2VO") %>' />
                    </ItemTemplate>
                </rad:GridTemplateColumn>
                <rad:GridTemplateColumn HeaderText="HMC Price" DataField="HMCPrice" UniqueName="HMCPrice" AllowFiltering="false" ItemStyle-CssClass="GridColNumber" Display="false" HeaderStyle-Wrap="true" >
                    <ItemTemplate>         
                         <rad:RadToolTip ID="radToolTipHMCPrice" runat="server" TargetControlID="lblHMCPrice">
                            <div style="text-align: left !important;">
                                <%# Eval("HMCPriceComment") %>
                            </div>
                        </rad:RadToolTip>          
                        <asp:Label ID="lblHMCPrice" runat="server" Text='<%# Eval("HMCPrice.Price","{0:0.000000}") %>' />
                    </ItemTemplate>
                </rad:GridTemplateColumn>
            <rad:GridTemplateColumn UniqueName="OpenWindow" AllowFiltering="false" HeaderStyle-Width="70"
                ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButton" runat="server" CommandName="OpenWindow" Text="View History"></asp:LinkButton>
                </ItemTemplate>
            </rad:GridTemplateColumn>
            <rad:GridTemplateColumn UniqueName="OpenWindow2" AllowFiltering="false" HeaderStyle-Width="70"
                ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButton2" runat="server" CommandName="OpenWindow" Text="View Futures Curve"></asp:LinkButton>
                </ItemTemplate>
            </rad:GridTemplateColumn>
            <rad:GridTemplateColumn DataField="ExceptionMessage" ReadOnly="true" UniqueName="ExceptionMessage" HeaderText="Error Description">
                    <ItemTemplate>
                        <rad:RadToolTip ID="radToolTipException" runat="server" TargetControlID="lblExceptionMessage">
                            <div style="text-align: left !important;">
                                <%# Eval("ExceptionMessage") %>
                            </div>
                        </rad:RadToolTip>
                        <asp:Label ID="lblExceptionMessage" runat="server" Text='<%# Eval("ShortErrorDescription") %>' />
                    </ItemTemplate>
                </rad:GridTemplateColumn>
            <rad:GridBoundColumn DataField="Comments" HeaderText="Comments" Display="false" />
            <rad:GridBoundColumn DataField="DataStatusCode" ReadOnly="true" HeaderText="Data Status" />
            <rad:GridBoundColumn DataField="ExceptionStatusCode" ReadOnly="true" HeaderText="Exception Status" Visible="false" />
        </Columns>
        <GroupByExpressions>
            <rad:GridGroupByExpression>
                <SelectFields>
                    <rad:GridGroupByField FieldName="MurexMkt" FieldAlias="MurexMkt" HeaderText="Murex Market" />
                     <rad:GridGroupByField Aggregate="Count" FieldName="StagePriceId" />
                </SelectFields>
                <GroupByFields>
                    <rad:GridGroupByField FieldName="MurexMkt" />
                </GroupByFields>
            </rad:GridGroupByExpression>
            <rad:GridGroupByExpression>
                <SelectFields>
                    <rad:GridGroupByField FieldName="PrimaryTicker" FieldAlias="PrimaryTicker" HeaderText="Primary Ticker" />
                     <rad:GridGroupByField Aggregate="Count" FieldName="StagePriceId" />
                </SelectFields>
                <GroupByFields>
                    <rad:GridGroupByField FieldName="PrimaryTicker" />
                </GroupByFields>
            </rad:GridGroupByExpression>
            <rad:GridGroupByExpression>
                    <SelectFields>                                   
                        <rad:GridGroupByField FieldName="ExceptionTypeCode" />                         
                        <rad:GridGroupByField Aggregate="Count" FieldName="StagePriceId" />                 
                    </SelectFields>
                    <GroupByFields>
                        <rad:GridGroupByField FieldName="ExceptionTypeCode" /> 
                    </GroupByFields>
                </rad:GridGroupByExpression>
        </GroupByExpressions>
    </MasterTableView>
</rad:RadGrid>



Jayesh Goyani
Top achievements
Rank 2
 answered on 01 Apr 2014
1 answer
207 views
Hi,
I try to set a search box from list

however when I put words into the search box it is not showed a drop-down (AutoComplete) list with a proper result

I'll be glad for your help

Daniel

ASPX:
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" >
           <telerik:RadSearchBox ID="RadSearchBox1" runat="server" Width="250"
               DataTextField="Text"
               DataValueField="ReportID"
               OnSearch="RadSearchBox1_Search"
                EnableAutoComplete="true">
               <DropDownSettings Height="150" Width="250" />
     
           </telerik:RadSearchBox>
       </telerik:RadAjaxPanel>
       <br />
       <br />
       <br />
       <br />
       <br />
       <br />
       <br />
       <br />
       <telerik:RadTreeView ID="RadTreeView1" Runat="server">
       </telerik:RadTreeView>



VB.NET
Imports Telerik.Web.UI
 
Public Class searchTest
    Inherits System.Web.UI.Page
 
 
    Dim listreports As New List(Of SiteDataItem)()
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            BindToIEnumerable(RadTreeView1)
 
            
           
        End If
        ' RadSearchBox1.DataTextField = "Text"
        ' RadSearchBox1.DataValueField = "ReportID"
        RadSearchBox1.DataSource = listreports
 
    End Sub
 
 
    Friend Class SiteDataItem
        Private text1 As String
        Private id1 As Integer
        Private parentId1 As Integer
        Private reportId1 As String
 
        Public Property Text() As String
            Get
                Return text1
            End Get
            Set(ByVal value As String)
                text1 = value
            End Set
        End Property
 
 
        Public Property ID() As Integer
            Get
                Return id1
            End Get
            Set(ByVal value As Integer)
                id1 = value
            End Set
        End Property
 
        Public Property ParentID() As Integer
            Get
                Return parentId1
            End Get
            Set(ByVal value As Integer)
                parentId1 = value
            End Set
        End Property
 
        Public Property ReportID() As String
            Get
                Return reportId1
            End Get
            Set(ByVal value As String)
                reportId1 = value
            End Set
        End Property
 
        Public Sub New(ByVal id As Integer, ByVal parentId As Integer, ByVal text As String, Optional ByVal reportId As String = "99")
            Me.id1 = id
            Me.parentId1 = parentId
            Me.text1 = text
            Me.reportId1 = reportId
 
        End Sub
    End Class
 
 
    Private Sub BindToIEnumerable(ByVal treeView As RadTreeView)
        Dim siteData As New List(Of SiteDataItem)()
 
        siteData.Add(New SiteDataItem(1, 0, "Location"))
        siteData.Add(New SiteDataItem(2, 0, "func 1"))
        siteData.Add(New SiteDataItem(3, 0, "func  behavior"))
        siteData.Add(New SiteDataItem(4, 0, "func 4"))
        siteData.Add(New SiteDataItem(5, 0, "Additional reports"))
        siteData.Add(New SiteDataItem(6, 0, "func 5 "))
        siteData.Add(New SiteDataItem(7, 0, "func 6"))
        siteData.Add(New SiteDataItem(8, 0, "example 5"))
        siteData.Add(New SiteDataItem(9, 0, "Raw events"))
        siteData.Add(New SiteDataItem(10, 0, "Care"))
        siteData.Add(New SiteDataItem(11, 0, "Raw events"))
        siteData.Add(New SiteDataItem(12, 0, "Working Reports", ))
        siteData.Add(New SiteDataItem(13, 12, "Sunday ", "101"))
        siteData.Add(New SiteDataItem(14, 12, "Monday", "102"))
        siteData.Add(New SiteDataItem(15, 12, "Summery", "103"))
        siteData.Add(New SiteDataItem(16, 12, "Friday", "104"))
        siteData.Add(New SiteDataItem(17, 0, "New MultiLanguea Report", "105"))
 
        treeView.DataTextField = "Text"
        treeView.DataFieldID = "ID"
        treeView.DataFieldParentID = "ParentID"
         
        treeView.DataValueField = "ReportID"
         
        treeView.DataSource = siteData
        treeView.DataBind()
        listreports = siteData
        
 
 
 
    End Sub
 
    
    Protected Sub RadTreeView1_NodeClick(sender As Object, e As RadTreeNodeEventArgs) Handles RadTreeView1.NodeClick
        Session("Report_ID") = e.Node.Value
    End Sub
 
   
    Protected Sub RadSearchBox1_Search(sender As Object, e As SearchBoxEventArgs) Handles RadSearchBox1.Search
        'setreport(e.Value)
    End Sub
End Class






Shinu
Top achievements
Rank 2
 answered on 01 Apr 2014
3 answers
381 views
Hi,
<telerik:RadGrid ID="rgCommnets" runat="server">
        <MasterTableView AutoGenerateColumns="false" CommandItemDisplay="None">
            <Columns>
                <telerik:GridBoundColumn DataField="Comment_ID" HeaderText="" UniqueName="Comment_ID" Display="false"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Attachment_ID" HeaderText="" UniqueName="Attachment_ID" Display="false"></telerik:GridBoundColumn>

                <telerik:GridTemplateColumn HeaderText="Title">
                    <ItemTemplate>
                        <asp:Label ID="Title" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"Title") %>'></asp:Label>
                        <asp:LinkButton runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"File_Name") %>' ID="lnkAttachment" OnClick="lnkAttachment_Click"></asp:LinkButton>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn DataField="Title" HeaderText="Title" UniqueName="Title"></telerik:GridBoundColumn>

                <telerik:GridBoundColumn DataField="Status" HeaderText="Status" UniqueName="Status"></telerik:GridBoundColumn>
            </Columns>
            <EditFormSettings>
                <FormTemplate >
               <div class="divNarrativeComment">
                            <label>
                                Comment Title:</label>
                            <asp:TextBox ID="textbox1" runat="server" Width="658px" Height="18px"></asp:TextBox>
                            <asp:TextBox ID="textbox2" runat="server" Width="754px" Height="50px" TextMode="MultiLine"
                                CssClass="mbm"></asp:TextBox>
                            <label>
                                Attachment:</label>
                            <br class="clearLeft" />
                            <label>
                                For:</label>
                            <asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatDirection="Horizontal"
                                CssClass="rblFor">
                                <asp:ListItem>Contractor</asp:ListItem>
                                <asp:ListItem>Internal</asp:ListItem>
                            </asp:RadioButtonList>
                            <br class="clearLeft" />
                            <label>
                                Actionable item?</label><asp:CheckBox ID="CheckBox1" runat="server" Text="Yes" CssClass="rblFor chkAttachment" /><br
                                    class="clearLeft" />
                            <label>
                                Choose role:</label><telerik:RadComboBox ID="RadComboBox2" runat="server" Skin="Metro"
                                    Width="300px" CssClass="left">
                                </telerik:RadComboBox>
                            <asp:Button ID="Button2" runat="server" Text="Save" CssClass="buttons btnSearch right" />
                            <a class="lnkClear right">Discard</a><br class="clearLeft" />
                        </div>
                </FormTemplate>
            </EditFormSettings>
        </MasterTableView>

    </telerik:RadGrid>


In above code i have add <telerik:RadGrid ID="rgCommnets" runat="server">
        <MasterTableView AutoGenerateColumns="false" CommandItemDisplay="None">
            <Columns>
                <telerik:GridBoundColumn DataField="Comment_ID" HeaderText="" UniqueName="Comment_ID" Display="false"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Attachment_ID" HeaderText="" UniqueName="Attachment_ID" Display="false"></telerik:GridBoundColumn>

                <telerik:GridTemplateColumn HeaderText="Title">
                    <ItemTemplate>
                        <asp:Label ID="Title" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"Title") %>'></asp:Label>
                        <asp:LinkButton runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"File_Name") %>' ID="lnkAttachment" OnClick="lnkAttachment_Click"></asp:LinkButton>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn DataField="Title" HeaderText="Title" UniqueName="Title"></telerik:GridBoundColumn>

                <telerik:GridBoundColumn DataField="Status" HeaderText="Status" UniqueName="Status"></telerik:GridBoundColumn>
            </Columns>
            <EditFormSettings>
                <FormTemplate >
               <div class="divNarrativeComment">
                            <label>
                                Comment Title:</label>
                            <asp:TextBox ID="textbox1" runat="server" Width="658px" Height="18px"></asp:TextBox>
                            <asp:TextBox ID="textbox2" runat="server" Width="754px" Height="50px" TextMode="MultiLine"
                                CssClass="mbm"></asp:TextBox>
                            <label>
                                Attachment:</label>
                            <br class="clearLeft" />
                            <label>
                                For:</label>
                            <asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatDirection="Horizontal"
                                CssClass="rblFor">
                                <asp:ListItem>Contractor</asp:ListItem>
                                <asp:ListItem>Internal</asp:ListItem>
                            </asp:RadioButtonList>
                            <br class="clearLeft" />
                            <label>
                                Actionable item?</label><asp:CheckBox ID="CheckBox1" runat="server" Text="Yes" CssClass="rblFor chkAttachment" /><br
                                    class="clearLeft" />
                            <label>
                                Choose role:</label><telerik:RadComboBox ID="RadComboBox2" runat="server" Skin="Metro"
                                    Width="300px" CssClass="left">
                                </telerik:RadComboBox>
                            <asp:Button ID="Button2" runat="server" Text="Save" CssClass="buttons btnSearch right" />
                            <a class="lnkClear right">Discard</a><br class="clearLeft" />
                        </div>
                </FormTemplate>
            </EditFormSettings>
        </MasterTableView>

    </telerik:RadGrid>

In above code i have add EditFormSettings for add and edit row and now i want to open it on asp button click.

Thanks
Manish
Konstantin Dikov
Telerik team
 answered on 31 Mar 2014
2 answers
510 views
I have a Radgrid with Inline Edit Mode. There are 8 columns in it, and if value of Product column is "XVZ", the edit button should not be visible. How can I achieve this?
RB
Top achievements
Rank 1
 answered on 31 Mar 2014
1 answer
199 views
We use the RadGrid extensively throughout our system, and, with simple datasets, it works great, even with a lot of data. However, we have one page with a series of complicated radgrids - lots of data, lots of template columns, lots of eval statements, and a number of custom controls that bind data from an object property. We're experiencing major performance problems with these grids. I added a number of debug statements and it's taking 6-7 or even 10+ seconds to bind the grid (timestamps between the Grid DataBinding and DataBound events). We're already using custom paging, and our page size is 60 records. I'm trying to find ways to improve this performance, and would welcome any suggestions:

- Would it be better to bind to a flat collection of data? That is, rather than passing an object property using eval to a custom control which then pulls out properties of that object, flatten each property in the underlying data item. So instead of 5 AlternateSource objects, flatten it to AlternateSource1DataSource, AlternateSource1Price, AlternateSource2DataSource, AlternateSource2Price, etc. Basically binding to a DataRow rather than a custom object.

- Microsoft says that the Eval Method can slow performance because it reflection at run time (http://msdn.microsoft.com/en-us/library/4hx47hfe(v=vs.110).aspx). Should I use as many GridBoundColumns as I can and bind data in the template columns on the ItemDataBound event, rather than using Eval in the aspx file? This means I would need a bunch of GridBoundColumns set to display hidden to get the data in the event, which is tedious. Or stuff the data into the DataKey collection. It also means I can't do much binding with a sub-object in the itemdatabound event.

- What's the performance impact of putting a lot of data into the DataKey collection? Is there any other way to access to the direct directly in the ItemDataBound event. I'm fairly certain you can't access the underlying data object in the ItemDataBound event. Is that correct?


For reference, here's an example of one of our grids:

<rad:RadGrid ID="gridData" AllowFilteringByColumn="false" AllowSorting="false" runat="server"
     OnNeedDataSource="GridData_NeedDataSource" OnItemDataBound="GridData_ItemDataBound"
    OnItemCommand="GridData_ItemCommand" OnUpdateCommand="GridData_ItemUpdated" OnInit="GridData_PreRender">
    <GroupingSettings CaseSensitive="false" />
    <ExportSettings ExportOnlyData="false" />
    <MasterTableView Name="Exceptions" EditMode="InPlace" EnableHeaderContextMenu="true" DataKeyNames="MurexMkt, PrimaryTicker">
        <Columns>
            <rad:GridTemplateColumn HeaderText="" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="10"
                HeaderStyle-Font-Bold="true" UniqueName="Approve" AllowFiltering="false">
                <HeaderTemplate>
                    <input type="checkbox" id="chkAll" onclick="CheckAll(this);" />
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:CheckBox ID="chkApprove" Style="margin-right: -6px;" runat="server" CssClass="GridApproveCheckbox" />
                </ItemTemplate>
            </rad:GridTemplateColumn>
            <rad:GridBoundColumn DataField="StagePriceExceptionId" ReadOnly="true" HeaderText="ExcID"
                AllowFiltering="false" HeaderStyle-Width="40" Display="false" />
            <rad:GridBoundColumn DataField="StagePriceId" ReadOnly="true" HeaderText="ID" AllowFiltering="false"
                Display="false" HeaderStyle-Width="40" />
            <rad:GridBoundColumn DataField="SecurityId" UniqueName="SecurityId" Display="false" HeaderText="Security Id" />
            <rad:GridBoundColumn DataField="PriceTypeId" UniqueName="PriceTypeId" Display="false" HeaderText="Price Type Id" />
            <rad:GridBoundColumn DataField="AsOfDate" ReadOnly="true" HeaderText="Date" DataFormatString="{0:MM/dd/yyyy}"
                ItemStyle-CssClass="GridColNumber" />
            <rad:GridTemplateColumn UniqueName="SecurityName" HeaderText="Security" ReadOnly="true" DataField="SecurityName">
                <ItemTemplate>
                    <asp:HyperLink ID="hl1" runat="server" NavigateUrl='<%# string.Format("~/SecurityXRef/SecurityXref.aspx?menuId=g2&search={0}", Eval("Ticker")) %>'>
                        <%# Eval("SecurityName") %>
                    </asp:HyperLink>
                </ItemTemplate>               
            </rad:GridTemplateColumn>
            <rad:GridBoundColumn DataField="SecurityName" UniqueName="SecurityNameSimple" HeaderText="Security" Display="false" />
            <rad:GridBoundColumn DataField="SecurityIsin" HeaderText="ISIN" Display="false" />
            <rad:GridBoundColumn DataField="Ticker" HeaderText="Ticker" ReadOnly="true" />           
            <rad:GridBoundColumn DataField="RIC" HeaderText="RIC" ReadOnly="true" /> 
            <rad:GridBoundColumn DataField="CurrencyCode" HeaderText="Currency" ReadOnly="true" />               
            <rad:GridBoundColumn UniqueName="PrimarySource" DataField="DataSourceShortName" ReadOnly="true" HeaderText="Primary Source" HeaderStyle-Wrap="true"/>
            <rad:GridBoundColumn DataField="PriceType" HeaderText="Price Type" ReadOnly="true" />         
            <rad:GridTemplateColumn HeaderText="Price" UniqueName="PriceCol" ItemStyle-CssClass="GridColNumber" DataField="PriceLast" SortExpression="PriceLast" >
                    <ItemTemplate>
                         <rad:RadToolTip ID="radToolTipPrice" runat="server" TargetControlID="lnkOverride">
                            <div style="text-align:left !important;">
                                <strong>Data Source: </strong> <%# Eval("DataSourceShortName")%><br />
                                <strong>Price Type: </strong> <%# Eval("PriceType")%> <br />
                                <strong>Field: </strong> <%# Eval("DataSourceFieldName")%> <br />
                                <strong>Comment: </strong> <%# Eval("Comments")%>
                            </div>                           
                        </rad:RadToolTip>
                        <asp:LinkButton ID="lnkOverride" runat="server" CommandName="Edit" DataTextFormatString="{0:0.000000}"/>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <div style="text-align:left !important;">
                            <strong>Override: </strong><br /><asp:TextBox ID="txtOverride" runat="server" Text='<%# Eval("PriceLast","{0:0.000000}") %>'/><br />
                            <strong>Comment: </strong><br /><asp:TextBox ID="txtComment" runat="server" TextMode="MultiLine" Text= '<%# Eval("Comments")%>' Rows="3" />
                            <p>
                                <asp:CheckBox ID="chkAddHAndPrice" runat="server" Text="Add Fixed Price" />
                            </p>
                            <asp:LinkButton ID="lnkSave" runat="server" CommandName="Update" Text="Update" />
                            <asp:LinkButton ID="lnkCancel" runat="server" CommandName="Cancel" Text="Cancel"/>
                        </div>
                    </EditItemTemplate>
                </rad:GridTemplateColumn>     
            <rad:GridBoundColumn DataField="JobName" HeaderText="Loader" UniqueName="Loader"
                Visible="false" />
            <rad:GridBoundColumn DataField="IsOverride" Visible="false" />
            <rad:GridBoundColumn DataField="PriceLast" Display="false" />
            <rad:GridTemplateColumn HeaderText="Bloomberg Price"  UniqueName="BloombergSource" AllowFiltering="false" ItemStyle-CssClass="GridColNumber" Display="false" HeaderStyle-Wrap="true" >
                    <ItemTemplate>
                        <%--<rad:RadToolTip ID="radToolTipBbg" runat="server" TargetControlID="lblBbgSource" >
                           <div style="text-align:left !important;">
                                <strong>Data Source:</strong> <%# Eval("BbgDataSource") %>
                                <br /><br />
                                <strong>Field:</strong> <%# Eval("BbgField") %> <br />
                                <strong>Loader:</strong> <%# Eval("BbgJob") %><br />
                                <strong>Loaded At:</strong> <%# Eval("BbgCreated") %>
                            </div>                           
                        </rad:RadToolTip>
                        <asp:Label ID="lblBbgSource" runat="server" Text='<%# Eval("BbgPrice","{0:0.000000}") %>' />--%>
                         <HMC:GridPrice Id="GridPriceBbg" runat="server" Price='<%# Eval("BbgPriceVO") %>' />
                    </ItemTemplate>
                </rad:GridTemplateColumn>    
                <rad:GridTemplateColumn HeaderText="" DataField="AltSource1" UniqueName="AltSource1" AllowFiltering="false" ItemStyle-CssClass="GridColNumber" Visible="false" HeaderStyle-Wrap="true" >
                    <ItemTemplate>
                        <HMC:GridPrice Id="GridPrice1" runat="server" Price='<%# Eval("AltSource1VO") %>' />
                    </ItemTemplate>
                </rad:GridTemplateColumn>           
                <rad:GridTemplateColumn HeaderText="Secondary Price" DataField="AltSource2" UniqueName="AltSource2" AllowFiltering="false" ItemStyle-CssClass="GridColNumber" Visible="false" HeaderStyle-Wrap="true" >
                    <ItemTemplate>
                        <HMC:GridPrice Id="GridPrice2" runat="server" Price='<%# Eval("AltSource2VO") %>' />
                    </ItemTemplate>
                </rad:GridTemplateColumn>
                <rad:GridTemplateColumn HeaderText="Tertiary Price" UniqueName="AltSource3" AllowFiltering="false" ItemStyle-CssClass="GridColNumber" Visible="false" HeaderStyle-Wrap="true" >
                    <ItemTemplate>
                        <HMC:GridPrice Id="GridPrice3" runat="server" Price='<%# Eval("AltSource2VO") %>' />
                    </ItemTemplate>
                </rad:GridTemplateColumn>
                <rad:GridTemplateColumn HeaderText="Fourth Price" DataField="AltSource4" UniqueName="AltSource4" AllowFiltering="false" ItemStyle-CssClass="GridColNumber" Visible="false" HeaderStyle-Wrap="true" >
                    <ItemTemplate>
                       <HMC:GridPrice Id="GridPrice4" runat="server" Price='<%# Eval("AltSource2VO") %>' />
                    </ItemTemplate>
                </rad:GridTemplateColumn>
                <rad:GridTemplateColumn HeaderText="Fifth Price" DataField="AltSource5" UniqueName="AltSource5" AllowFiltering="false" ItemStyle-CssClass="GridColNumber" Visible="false" HeaderStyle-Wrap="true" >
                    <ItemTemplate>
                        <HMC:GridPrice Id="GridPrice5" runat="server" Price='<%# Eval("AltSource2VO") %>' />
                    </ItemTemplate>
                </rad:GridTemplateColumn>
                <rad:GridTemplateColumn HeaderText="HMC Price" DataField="HMCPrice" UniqueName="HMCPrice" AllowFiltering="false" ItemStyle-CssClass="GridColNumber" Display="false" HeaderStyle-Wrap="true" >
                    <ItemTemplate>         
                         <rad:RadToolTip ID="radToolTipHMCPrice" runat="server" TargetControlID="lblHMCPrice">
                            <div style="text-align: left !important;">
                                <%# Eval("HMCPriceComment") %>
                            </div>
                        </rad:RadToolTip>          
                        <asp:Label ID="lblHMCPrice" runat="server" Text='<%# Eval("HMCPrice.Price","{0:0.000000}") %>' />
                    </ItemTemplate>
                </rad:GridTemplateColumn>
            <rad:GridTemplateColumn UniqueName="OpenWindow" AllowFiltering="false" HeaderStyle-Width="70"
                ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButton" runat="server" CommandName="OpenWindow" Text="View History"></asp:LinkButton>
                </ItemTemplate>
            </rad:GridTemplateColumn>
            <rad:GridTemplateColumn UniqueName="OpenWindow2" AllowFiltering="false" HeaderStyle-Width="70"
                ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButton2" runat="server" CommandName="OpenWindow" Text="View Futures Curve"></asp:LinkButton>
                </ItemTemplate>
            </rad:GridTemplateColumn>
            <rad:GridTemplateColumn DataField="ExceptionMessage" ReadOnly="true" UniqueName="ExceptionMessage" HeaderText="Error Description">
                    <ItemTemplate>
                        <rad:RadToolTip ID="radToolTipException" runat="server" TargetControlID="lblExceptionMessage">
                            <div style="text-align: left !important;">
                                <%# Eval("ExceptionMessage") %>
                            </div>
                        </rad:RadToolTip>
                        <asp:Label ID="lblExceptionMessage" runat="server" Text='<%# Eval("ShortErrorDescription") %>' />
                    </ItemTemplate>
                </rad:GridTemplateColumn>
            <rad:GridBoundColumn DataField="Comments" HeaderText="Comments" Display="false" />
            <rad:GridBoundColumn DataField="DataStatusCode" ReadOnly="true" HeaderText="Data Status" />
            <rad:GridBoundColumn DataField="ExceptionStatusCode" ReadOnly="true" HeaderText="Exception Status" Visible="false" />
        </Columns>
        <GroupByExpressions>
            <rad:GridGroupByExpression>
                <SelectFields>
                    <rad:GridGroupByField FieldName="MurexMkt" FieldAlias="MurexMkt" HeaderText="Murex Market" />
                     <rad:GridGroupByField Aggregate="Count" FieldName="StagePriceId" />
                </SelectFields>
                <GroupByFields>
                    <rad:GridGroupByField FieldName="MurexMkt" />
                </GroupByFields>
            </rad:GridGroupByExpression>
            <rad:GridGroupByExpression>
                <SelectFields>
                    <rad:GridGroupByField FieldName="PrimaryTicker" FieldAlias="PrimaryTicker" HeaderText="Primary Ticker" />
                     <rad:GridGroupByField Aggregate="Count" FieldName="StagePriceId" />
                </SelectFields>
                <GroupByFields>
                    <rad:GridGroupByField FieldName="PrimaryTicker" />
                </GroupByFields>
            </rad:GridGroupByExpression>
            <rad:GridGroupByExpression>
                    <SelectFields>                                   
                        <rad:GridGroupByField FieldName="ExceptionTypeCode" />                         
                        <rad:GridGroupByField Aggregate="Count" FieldName="StagePriceId" />                 
                    </SelectFields>
                    <GroupByFields>
                        <rad:GridGroupByField FieldName="ExceptionTypeCode" /> 
                    </GroupByFields>
                </rad:GridGroupByExpression>
        </GroupByExpressions>
    </MasterTableView>
</rad:RadGrid>




Ashley
Top achievements
Rank 1
 answered on 31 Mar 2014
4 answers
218 views
Hi,

I am using RadEditor to display my content from database. On a client side button click event, i should know whether the content in the editor been modified or not. I have used the following code which is working when user tries to add/modify the content using key input. But same was not  working when user drags and drops the content in the editor. I have used mousedown event but it is not firing.

I have taken variable"hdnIsContentChange" which is initially set to false, when user tries to modify the data i am comparing the intial content of the editor with new value which i put in hidden variables.

"onkeyup" is the only event is working, the rest are all not working.

var hdnIsContentChange = false;
function Editor_OnClientLoad(Editor, args)
{
        Editor.attachEventHandler ("onmouseup", ContentChange);  //not working
        Editor.attachEventHandler ("onmousedown", ContentChange);//not working
        Editor.attachEventHandler ("ondrag", ContentChange);//not working
        Editor.attachEventHandler ("onchange", ContentChange);//not working
        Editor.attachEventHandler ("onkeyup", ContentChange);//working
       
        function ContentChange()
        {
            $get("hdnNewContent").value = radEditor.get_html();
            
             if($get("hdnInitialContent").value != $get("hdnNewContent").value)
                    get("hdnIsContentChange").value = true;
       }
 }

Please let me whether this approach is correct or already is there any way to know the content been modified by using editor's built-in functions or properties.
Marin Bratanov
Telerik team
 answered on 31 Mar 2014
4 answers
135 views
Hi,

I currently have the ASP.NET version of the RadSpell, which uses the Telerik.Web.UI.dll. This is currently used in an exsiting website.

The site is in the process of being upgraded to use MVC, and we want to use the RadSpell functionality.

I have created an .ascx to contain the RadSpellChecker and made some modiications to the web.config file which you can see below. The ascx loads fine in a Html.Partial().

However when javascript hits the startSpellCheck(); I get the following error :

Object doesn't support this property or method

How can I get this working?

ASCX file:
<%@ Control CodeBehind="spellcheck.ascx.cs" Language="C#" AutoEventWireup="true" Inherits="TargetedEmailMVC.Web.Views.BroadcastTemplate.spellcheck" %>
<%@ Register TagPrefix="telerik" Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" %>
 
<script type="text/javascript" language="javascript">
    function spellCheck() {
        var spell = $('#<%= RadSpellChecker1.ClientID %>');
        if (spell != null) {
            spell.startSpellCheck();
        }
    }
</script>
 
<telerik:RadScriptManager ID="RadScriptManager1" runat="server"/>
<telerik:RadSpell id="RadSpellChecker1" runat="server" buttontype="None" IsClientID="true" HandlerUrl="~/Telerik.Web.UI.DialogHandler.axd"/> 

My web.config contains the following:

HttpHandlers:
<httpHandlers>
  <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/>
  <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false"/>
  <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false"/>
</httpHandlers>

Handlers:
<handlers>
  <remove name="UrlRoutingHandler"/>
  <remove name="WebServiceHandlerFactory-Integrated"/>
  <remove name="ScriptHandlerFactory"/>
  <remove name="ScriptHandlerFactoryAppServices"/>
  <remove name="ScriptResource"/>
  <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode"/>
  <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode"/>
  <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode"/>
  <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  <add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  <add name="UrlRoutingHandler" verb="*" path="UrlRouting.axd" preCondition="integratedMode" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</handlers>

Thanks
Jeffrey
Top achievements
Rank 1
 answered on 31 Mar 2014
2 answers
145 views

I'm having an issue with multi-day appointments that span the date on which Greenwich Mean Time (GMT) changes to British Summer Time (BST).

The attached screenshots show:

  1. The creation of an all day appointment which starts on 24th March 2014 and ends on 6th April 2014
  2. A Week view for the Week Commencing 24th March
  3. A Week view for the Week Commencing 31st March
  4. A Month View for March
  5. A Month View for April
  6. The record from the Appointments table (in SQL)

GMT changes to BST on Sunday 30th March.

Note that, in the Week view for the Week Commencing 24th March, the appointment does not display for Sunday 30th March but in the Month View for March, it does.

The RadScheduler control is defined as follows in the markup:

            <telerik:RadScheduler ID="RadScheduler1" runat="server" DataSourceID="AppointmentsDataSource" DataKeyField="ID" DataSubjectField="Subject" DataDescriptionField="Description" DataStartField="Start" DataEndField="End" Culture="en-GB" FirstDayOfWeek="Monday" LastDayOfWeek="Sunday" SelectedView="WeekView" DisplayRecurrenceActionDialogOnMove="false" EnableExactTimeRendering="True" MinutesPerRow="150" TimeZoneID="GMT Standard Time" DayStartTime="08:00:00" DayEndTime="18:00:00" WorkDayStartTime="08:00:00" WorkDayEndTime="18:00:00" EnableDescriptionField="True" HoursPanelTimeFormat="HH:mm" OverflowBehavior="Expand" RenderMode="Auto" StartInsertingInAdvancedForm="True" DataReminderField="Reminder" ResolvedRenderMode="Classic" Localization-ContextMenuAddAppointment="New Absence or On Call Entry" ShowFooter="False" AppointmentStyleMode="Default" RowHeight="35px" CustomAttributeNames="CreatedBy, CreatedDate, LastModifiedBy, LastModifiedDate" TimeZoneOffset="01:00:00">

                <ExportSettings>

                    <Pdf PageBottomMargin="1in" PageLeftMargin="1in" PageRightMargin="1in" PageTopMargin="1in" />

                </ExportSettings>

                <AdvancedForm Modal="True" TimeFormat="HH:mm" DateFormat="dd/MM/yyyy" Width="90%"></AdvancedForm>

                <WeekView DayStartTime="08:00:00" DayEndTime="18:00:00" WorkDayStartTime="08:00:00" WorkDayEndTime="18:00:00" EnableExactTimeRendering="True" ColumnHeaderDateFormat="dddd dd MMMM yyyy"></WeekView>

                <DayView DayStartTime="08:00:00" DayEndTime="18:00:00" WorkDayStartTime="08:00:00" WorkDayEndTime="18:00:00" EnableExactTimeRendering="True"></DayView>

                <MultiDayView DayStartTime="08:00:00" DayEndTime="18:00:00" WorkDayStartTime="08:00:00" WorkDayEndTime="18:00:00" EnableExactTimeRendering="True" />

                <MonthView HeaderDateFormat="MMMM, yyyy" FirstDayHeaderDateFormat="dd MMMM" AdaptiveRowHeight="True" VisibleAppointmentsPerDay="25"></MonthView>

                <TimelineView UserSelectable="False" />

                <AgendaView UserSelectable="True" ResourceMarkerType="None" ReadOnly="True" ShowResourceHeaders="False" />

                <TimeSlotContextMenus>

                    <telerik:RadSchedulerContextMenu>

                        <Items>

                            <telerik:RadMenuItem Text="New Absence or On Call Entry" Value="CommandAddAppointment"></telerik:RadMenuItem>

                            <telerik:RadMenuItem Text="Go to Today" Value="CommandGoToToday"></telerik:RadMenuItem>

                        </Items>

                    </telerik:RadSchedulerContextMenu>

                </TimeSlotContextMenus>

                <ResourceTypes>

                    <telerik:ResourceType KeyField="ID" Name="Category" TextField="Category" ForeignKeyField="CategoryID" DataSourceID="CategoriesDataSource"></telerik:ResourceType>

                </ResourceTypes>

                <AppointmentTemplate>

                    <div style="position:relative;top:4px">

                        <%# Eval("Subject") & " (" & Eval("Category.Text") & ")"%>

                    </div>

                </AppointmentTemplate>

                <AdvancedEditTemplate>

                    <scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Edit" Subject='<%# Bind("Subject") %>' Description='<%# Bind("Description") %>' Start='<%# Bind("Start") %>' End='<%# Bind("End") %>' CategoryID='<%# Bind("Category") %>' />

                </AdvancedEditTemplate>

                <AdvancedInsertTemplate>

                    <scheduler:AdvancedForm runat="server" ID="AdvancedInsertForm1" Mode="Insert" Subject='<%# Bind("Subject") %>' Start='<%# Bind("Start") %>' End='<%# Bind("End") %>' Description='<%# Bind("Description") %>' CategoryID='<%# Bind("Category") %>' />

                </AdvancedInsertTemplate>

                <TimeSlotContextMenuSettings EnableDefault="true"></TimeSlotContextMenuSettings>

                <AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings>

            </telerik:RadScheduler>

Please could you advise what the problem might be.

Boyan Dimitrov
Telerik team
 answered on 31 Mar 2014
1 answer
279 views
I have a page that sits inside a master page so I do not have a body to do an onload statement, by research everyone says use the registerstartUpscript and it will work, however it is not.  How can I call a radwindow on page load from a page nested in a master site.  Thanks


function SelectInfo() {
            $find('<%=rwInfo.ClientID%>').show();
       }
 
 
<telerik:RadWindow ID="rwInfo" runat="server" Modal="true" NavigateUrl="Info.aspx" Width="1000px" Height="800px" OnClientClose="closeWindow"></telerik:RadWindow>
 
 
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
      If Not IsPostBack Then
          Dim userlogon As String = Split(Current.User.Identity.Name, "\")(1)
          HFUserId.Value = GetUserId(userlogon)
 
          If CheckIMOs(userlogon) = True Then
              Dim page As Label = CType(Master.FindControl("lblPage"), Label)
              page.Text = " - Move Add Change"
              ScriptManager.RegisterStartupScript(page, page.GetType(), "SomestartupScript", "SelectInfo();", True)
          Else
              Response.Redirect("~/ErrorPages/AdminError.aspx")
          End If
      End If
  End Sub
Marin Bratanov
Telerik team
 answered on 31 Mar 2014
1 answer
118 views
I'm excited to see what we are going to be able to do with this control in the future, but it seems like it needs a bit of refinement to make it to prime time.

I am wondering how to disable the creation and use of the freaking LoadingPanel.  I am using ImageGallery with LoopItems="true", and have nice animations defined, but the transitions are absolutely jarring because a LoadingPanel appears for a split second before every animation. Since the gallery is set to loop, and it has loaded all of it's images, there is absolutely no reason for a loading panel to be displayed at all. Since I didn't add it, I don't see why it would be there at all, either. The panel is displayed momentarily if you press the next or previous image buttons, as well. You can actually see it on your demo pages quite clearly.

As far as I'm concerned, the fact that it tries to show the LoadingPanel for an image that is available is a bug.

I tried setting RadImageGallery.LoadingPanel.Enabled = false, but that doesn't do anything. Setting RadImageGallery.LoadingPanel.Visiable = false breaks the slideshow altogether.  I tried RadImageGallery.LoadingPanel.Controls.Clear() and that does nothing ether. How can I get rid of it?

Joel
Kostadin
Telerik team
 answered on 31 Mar 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?