Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
226 views
Hi,

In my current project, I have written a web page containing a Hierarchical RadGrid.

On each data row of the grid, there are 3 CheckBoxes set to edit mode.

The users are able to check or uncheck any of the CheckBoxes and click the Submit button to save the data on the back-end.

The data displayed on the grid are stored on a DataSet.

All operations on the web page are done on the server-side.

The development and testing stages have been completed, and the project is in the UAT stage right now.

However, there seems to be a performance problem with the web page when there are many data rows.

It is very slow to perform the following operations:
- to open up a tree level (by clicking the <)
- to check or uncheck the CheckBox

The screenshot of the web page can be found here.

The ASPX source code can be found here while the ASPX.CS source code can be found here.

When I did a View Source on the browser, the file is pretty huge and can be found here.

Can you please help me with the following:
- how to improve the performance for the operations above.
- how to reduce the size of code (in particular the ViewState).
- if there is any problem or weaknesses in my approach as shown in the source code.

Regards,
Herman
Pavlina
Telerik team
 answered on 23 Mar 2011
3 answers
123 views
I use Table template in font of RadCombobox.
How can I get Product Name & Product Price which Product ID value had been input.
Thank
<telerik:RadComboBox ID="cboProducts" runat="server" Skin="Windows7" Font-Names ="Tahoma" Font-Size ="13px"
    Width="500px" Height="150px" CollapseDelay="0" EmptyMessage="-- Select --" CausesValidation="false" EnableLoadOnDemand="true"
    EnableItemCaching="true" ExpandDelay="0" MarkFirstMatch="true" HighlightTemplatedItems="true" ShowMoreResultsBox="true" EnableVirtualScrolling="true" ShowToggleImage="false">
<ExpandAnimation Duration="0" Type="None" />
<CollapseAnimation Duration="0" Type="None" />
    <HeaderTemplate>
    <table style="width: 500px" cellspacing="0" cellpadding="0">
        <tr>
            <td style="width: 100px;">
                Product ID</td>
            <td style="width: 330px;">
                Product Name</td>
            <td style="width: 70px;">
                Product Price</td>
        </tr>
    </table>
</HeaderTemplate>
<ItemTemplate>
    <table style="width: 465px" cellspacing="0" cellpadding="0">
  <tr>
<td style="width: 90px;">
<%# DataBinder.Eval(Container, "ProductID")%>
</td>
   <td style="width: 300px;">
<%# DataBinder.Eval(Container, "Attributes['ProductName']")%>
</td>
<td style="width: 70px;" align="right">
   <%# DataBinder.Eval(Container, "Attributes['ProductPrice']")%>
</td>
  </tr>
    </table>
</ItemTemplate>
</telerik:RadComboBox>
s
Veronica
Telerik team
 answered on 23 Mar 2011
2 answers
123 views

I have simple page:

1 grid with many rows (for scrolling), formdecorator and a checkbox on each row.

When you make a scroll and click at checkbox or radio button then page make scrolling or disappears.

If I avoid them from decorating everything is OK.

P.S For another controls this not happens

Here is the code:

ASPX

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
    <style runat="server">
        html, body, form
        {
            overflow:hidden;
            height:100%;
        }
        .scroll
        {
            overflow:scroll;
            height:100%;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="True">
    </telerik:RadSkinManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All" />
    </div>
    <div class="scroll">
    <telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" GridLines="None" OnNeedDataSource="RadGrid1_NeedDataSource">
        <MasterTableView>
            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridTemplateColumn HeaderText="Checkox">
                <ItemTemplate>
                <asp:CheckBox ID="chk" runat="server" />
                </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn DataField="text" FilterControlAltText="Filter column1 column"
                    HeaderText="Text" UniqueName="column1">
                </telerik:GridBoundColumn>
            </Columns>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        </HeaderContextMenu>
    </telerik:RadGrid>
    </div>
    </form>
</body>
</html>

Code Behind

public partial class Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
  
    }
    protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        List<string> items = new List<string>();
        for(int i = 1; i <= 200; i++)
        {
            items.Add(string.Format("Item {0}", i));
        }
        RadGrid1.DataSource = items;
    }
}
Deyan
Top achievements
Rank 1
 answered on 23 Mar 2011
0 answers
78 views
Hi, I'm having a problem with the components and RadDate RadComboBox, they'reinside a div and I can not modify any information on them, I can not select the contentsby clicking the item to view the information. The enable this to true and yet does nothing
Silderado
Top achievements
Rank 1
 asked on 23 Mar 2011
2 answers
159 views
I noticed when you disable a RibbonBarButton only its Text property gets affected. It grays out the corresponding text and that's it. You can still hover the button (image) itself, so it looks like the button has not been disabled at all. It would be great that a disabled RibbonBarButton shows a grayed out Text and Image without hover effect, like it is used within Office software. I don't know if there's a workaround for this or if it's a known issue which will be corrected in an upcoming release. Hopefully someone can clear things up for me. Thanks in advance.

Regards,
Datamex
Datamex
Top achievements
Rank 2
 answered on 23 Mar 2011
4 answers
154 views

Loading a script within a Master page does not work at all.  I get the following error from IE7 when loading the page:

error: 'ResetForm'  is undefined
Code: 0
URL: http://localhost:.........

In the master page is the following code

<telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
        <Scripts>
            <asp:ScriptReference Path="~/Scripts/common.js"  />
        </Scripts>
    </telerik:RadScriptManager>  




The script file (common.js) is:
function ResetForm(sender, eventArgs) {
    document.forms[0].reset();
    return false;
}


I am thinking that the masterpage is loaded after the content. so, in that case why is there a script manager
in the master page?? Or should I be loading my script in the content page?? I haven't seen an answer to this
seemingly common problem anywhere.


thank you!


Pero
Telerik team
 answered on 23 Mar 2011
4 answers
135 views
Hi,
when adding the text box inside the RADEditor, after submitting the page it automatically inserts some table tag around the text box tag. any idea how to prevent this behaviour?


regards,
Elangovan P
Dobromir
Telerik team
 answered on 23 Mar 2011
2 answers
102 views
When I paste the following HTML from word without any format stripping into design mode, RadEditor will not allow me to allign the text left until I switch to HTML mode and back to design mode. It seems the filters are not being applied.

<P style="TEXT-ALIGN: center; MARGIN: 0cm 0cm 10pt" class=MsoNormal align=center><SPAN style="COLOR: #00b050"><FONT face=Calibri>This is an extremely sophisticated newsletter<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></SPAN></P
<P style="TEXT-ALIGN: center; MARGIN: 0cm 0cm 10pt" class=MsoNormal align=center><SPAN style="COLOR: #00b050"><FONT face=Calibri>DOCUMENT<o:p></o:p></FONT></SPAN></P
<P style="TEXT-ALIGN: center; MARGIN: 0cm 0cm 10pt" class=MsoNormal align=center><o:p><FONT face=Calibri> </FONT></o:p></P>
Michael
Top achievements
Rank 1
 answered on 23 Mar 2011
1 answer
180 views
I have a TabStrip that is connected to a MultiPage. When using the UI, these two items are synched up correctly.

I use the tabs in a pseudo-wizard type application. When my app starts, all the tabs but the first one are disabled.  There is a button on the first tab (multipage actually) that when pressed, "starts" the process, and clicking it should enable all the other tabs, and move you to the second tab in the process to begin the data entry.

Here is my basic setup (partially removed items to condense code)
<telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Telerik" MultiPageID="RadMultiPage1">
    <Tabs>
        <telerik:RadTab runat="server" Text="Order Setup" Value="OrderSetup" PageViewID="rpvOrderSetup" Selected="true" />
        <telerik:RadTab runat="server" Text="Patient Information" Value="PatientInformation" PageViewID="rpvPatientInformation" Enabled="false" />
        <telerik:RadTab runat="server" Text="Order Information" Value="OrderInformation" PageViewID="rpvOrderInformation" Enabled="false" />
    </Tabs>
</telerik:RadTabStrip>
<telerik:RadMultiPage ID="RadMultiPage1" runat="server">
    <telerik:RadPageView ID="rpvOrderSetup" runat="server" Selected="true">
        <hr style="margin: 0px; padding: 0px; width: 100%;" />
        <local:OrderSetup runat="server" ID="OrderSetup" />
    </telerik:RadPageView>
    <telerik:RadPageView ID="rpvPatientInformation" runat="server">
        <hr style="margin: 0px; padding: 0px; width: 100%;" />
        <local:PatientInformation runat="server" ID="PatientInformation" />
    </telerik:RadPageView>
    <telerik:RadPageView ID="rpvOrderInformation" runat="server">
        <hr style="margin: 0px; padding: 0px; width: 100%;" />
        <local:OrderInformation runat="server" ID="OrderInformation" />
    </telerik:RadPageView>
</telerik:RadMultiPage>

And here is the code behind:
void OrderSetup_Click(EventArgs e)
{
    RadTabStrip1.FindTabByValue("OrderSetup").ImageUrl = "~/images/Ok.png";
    IList<RadTab> tabs = RadTabStrip1.GetAllTabs();
    foreach (RadTab tab in tabs) tab.Enabled = true;
    RadTabStrip1.FindTabByValue("PatientInformation").Selected = true;
    RadMultiPage1.FindPageViewByID("rpvPatientInformation").Selected = true;
    // RadMultiPage1.SelectedIndex = RadMultiPage1.FindPageViewByID("rpvPatientInformation").Index;
            // rpvPatientInformation.Selected = true;           
           // RadMultiPage1.SelectedIndex = 1; 
}

Most of this works. The image is added to the first tab, all the tabs are enabled, and the Patient Information tab is selected.

But what does NOT work is that the matching PageView is NOT selected. It still displays the PageView of the first tab.

What am I doing wrong?
Princy
Top achievements
Rank 2
 answered on 23 Mar 2011
2 answers
77 views

 

 

I need to show upcoming appointments from today to 7 days ahead. This works fine when the appointment is not recurring.

This works fine for non recurring appointments:

For Each a In RadScheduler1.Appointments.GetAppointmentsInRange("2011-03-21", "2011-03-28")
    ...add appointment data to table.
Next

While this also works with recurring appointments:

For Each a In RadScheduler1.Appointments
    ...add appointment data to table.
Next

Now, is there a way to include any occurrences (from all recurring appointments) that meets the given period even if the Recurring appoinment Start date is before the given period?

Veronica
Telerik team
 answered on 23 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
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?