Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
224 views
I have been doing a bit of Fiddler-ing.... looking at performance profiling.

One thing that Fiddler keeps pointing out to me is that my pages are apparently doing repeated loads of large chunks of Javascript (100kB+), which I assume is the Telerik js for such items as Ajax, etc, etc.

I further note that these items are NOT cached (according to Fiddler)

So, what's the best policy here?
My sites are always database sites, so I am very cautious about using too much static *page* caching - but there is obviously a big opportunity to speed up those page components which are separately loaded.

Any hints?

Also, is compression useable here?
Can I get any success/war stories on this, too?

(Basically, my theme is "give me more speed!" <g>)

TIA
Steve

Steve Bywaters
Top achievements
Rank 1
 answered on 31 Oct 2009
6 answers
189 views
Hi All

I have a grid wih some 25 records.

While inserting a new record need to check whether it constains duplication.

So I have taken the recods in the grid  and checked.

protected

void RadGridEmpType_InsertCommand(object source, GridCommandEventArgs e)

 

{

 

GridEditFormInsertItem insertedItem = (GridEditFormInsertItem)e.Item;

 

 

Hashtable newValues = new Hashtable();

 

e.Item.OwnerTableView.ExtractValuesFromItem(newValues, insertedItem);

 

int value = 0;

 

 

RadTextBox txt = (RadTextBox)e.Item.FindControl("txtTypeShortDesc");

 

 

int Rowcount = RadGridEmpType.Items.Count;

 

 

for (int count = 0; Rowcount > count; count++)

 

{

 

Label lbl = (Label)RadGridEmpType.Items[count].FindControl("LblTypeShortDesc");

 

 

if (txt.Text.ToUpper() == lbl.Text.ToUpper())

 

{

value++;

}

}

 

if (value == 0)

 

{

dsiSmartEmpType.InsertParameters[0].DefaultValue = CompanyID.ToString();

dsiSmartEmpType.InsertParameters[1].DefaultValue = UserId;

}

 

else

 

{

 

Label lbl = (Label)e.Item.FindControl("Msg");

 

lbl.Text =

"Already Exists";

 

e.Canceled =

true;

 

}

}

It works.

But It just takes the record in the current page.

For example the grid contains 25 records. and the page size is given as 10.

While inserting it just checks the last five.

Is there any option to take all the 25 records in the grid.

Thank You.

-Anto

Brett
Top achievements
Rank 2
 answered on 31 Oct 2009
1 answer
76 views
hello,
How can i show default tools and my custom tools on radedit?
Schlurk
Top achievements
Rank 2
 answered on 30 Oct 2009
2 answers
174 views
I have a RadGrid that is wider than it's container DIV.  When the RdgGrid is rendered, it renders to it's full width, however a line is generated where the natural end of the DIV would be (if the RadGrid was not larger than the container).

I would like to expand the div to the width of the RadGrid or remove the blue line below in cases where the RadGrid is larger than the natural width of the container.

.twocolright {  
float:rightright;  
padding:10px 10px 20px 5px;  
width:75%;  

body {  
    margin:0;  
    padding:0;  
    border:0;           /* This removes the border around the viewport in old versions of IE */ 
    outline: 0;  
    width:100%;  
    backgroundtransparent;  
    min-width:960px;  
}  
 
jgill
Top achievements
Rank 1
 answered on 30 Oct 2009
2 answers
116 views
I have a fairly complex situation here that results in validation controls not working, either on the client side or when calling page.Validate().

I have a tabstrip (and associated multipage).
On Tab 1, an item is added in an ajax panel and saved.  When the user switches tabs, ajaxManager.ajaxRequest forces a repeater on page 2 to reload from the data source.  The repeater contains an item template which contains a user control that shows the details for the added object.  The repeater is inside the ajax panel and the user controls there have standard asp validators.  Any validators that were present when the page loaded in work fine, but any added as a result of the repeater re-binding fail to run, even when forced to run server side.  I tried rebinding the repeater in every page_load call to tab 2, but that didn't fix the problem.

Anyone have any ideas?
Chris
Top achievements
Rank 1
 answered on 30 Oct 2009
1 answer
252 views
I ajaxified an exisiting page using radajaxmanager. Primarily, the page is divided into two sections.
Student section and Classes Section. When I click a button "Add Student" a "student panel" is made visible which has bunch of controls in it.
Similarily, the classes section has "add class" button which on click shows "classes panel".

The problem is when the student panel is visible and I click "add class" button I get the following error.

"Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them."

When the student panel is hidden and I click "add class" button, classes panel is rendered correctly. I only get this error when the other panel is already visible on the page.

Any ideas?
cognos s
Top achievements
Rank 1
 answered on 30 Oct 2009
2 answers
115 views
I'm looking for a tutorial on best practices for setting up RIA UIs with the AJAX control set. Short of that I'd like a good demo on how to setup an explorer or portal style RIA UI. I'm building a Javascript solution that fetches data from WCF and manipulates the UI on the client only, no AJAX panels for server side UI updates.

I reviewed the control demos, demo apps and videos. None address how to setup the layout controls (panel, splitter,  etc) to achieve different affects.

The WebMail demo app is close to the layout I want but it is only one example and the design isn't explained.

I also downloaded the help desk demo. It to uses splitters and panes to setup the UI but does it a bit differently.

The event scheduler does its layout with HTML div tags
Brian
Top achievements
Rank 1
 answered on 30 Oct 2009
3 answers
115 views
I am working with the ItemTemplate of the combo box and wanted to know how to add an item to the collection that didn't match the specified item template. Here's my example:

My declaration on the ASP.NET page:
<telerik:RadComboBox ID="drpObjects" runat="server" AutoPostBack="true" Skin="Vista" AllowCustomText="false" 
    DropDownWidth="350px" Height="250px">  
    <CollapseAnimation Type="InQuint" Duration="200" /> 
    <ExpandAnimation Type="OutQuint" Duration="200" /> 
    <ItemTemplate> 
        <table style="border-bottom: 1px dotted #dfdfdf; margin-bottom: 10px; font-size: 11px;" 
            width="98%">  
            <tr> 
                <td> 
                    <%#DataBinder.Eval(Container.DataItem, "LineItemID")%> 
                </td> 
                <td> 
                    <%#DataBinder.Eval(Container.DataItem, "Description")%> 
                </td> 
            </tr> 
        </table> 
    </ItemTemplate> 
</telerik:RadComboBox> 

The object is a POCO object stored in a generic list:
Namespace Entities  
    Public Class CostCenterObject  
        Inherits BaseDataEntity  
 
        Private _LineItemID As Integer = 0  
        Private _Description As String = "" 
        Private _CategoryID As Integer = 0  
        Private _ReviewOnly As Boolean 
        Private _CreateDate As DateTime  
        Private _CreateBy As String = "" 
        Private _ModifyDate As DateTime  
        Private _ModifyBy As String = "" 
        Private _Active As Boolean 
        Private _Category As String = "" 
        Private _CategoryGroupName As String = "" 
 
        Public ReadOnly Property LineItemID() As Integer 
            Get 
                Return _LineItemID  
            End Get 
        End Property 
        Public ReadOnly Property Description() As String 
            Get 
                Return _Description  
            End Get 
        End Property 
        Public ReadOnly Property CategoryID() As Integer 
            Get 
                Return _CategoryID  
            End Get 
        End Property 
        Public ReadOnly Property ReviewOnly() As Boolean 
            Get 
                Return _ReviewOnly  
            End Get 
        End Property 
        Public ReadOnly Property CreateDate() As DateTime  
            Get 
                Return _CreateDate  
            End Get 
        End Property 
        Public ReadOnly Property CreateBy() As String 
            Get 
                Return _CreateBy  
            End Get 
        End Property 
        Public ReadOnly Property ModifyDate() As DateTime  
            Get 
                Return _ModifyDate  
            End Get 
        End Property 
        Public ReadOnly Property ModifyBy() As String 
            Get 
                Return _ModifyBy  
            End Get 
        End Property 
        Public ReadOnly Property Active() As Boolean 
            Get 
                Return _Active  
            End Get 
        End Property 
        Public ReadOnly Property Category() As String 
            Get 
                Return _Category  
            End Get 
        End Property 
        Public ReadOnly Property CategoryGroupName() As String 
            Get 
                Return _CategoryGroupName  
            End Get 
        End Property 
    End Class 
    ' Instantiation code omitted...  
 
End Namespace 

And my databinding:
        Dim Objects As List(Of CostCenterObject)  
 
        Objects = _AppController.GetAvailableObjects(drpYear.SelectedValue)          
        drpObjects.DataSource = Objects  
        drpObjects.DataBind()  
 
        drpObjects.Items.Insert(0, New RadComboBoxItem("- ALL -""- ALL -")) 

However, when I select an item in the list I see the namespace of the object declaration and the item I add doesn't match the template, so it displayes as an empty table. I would prefer to use the templates idea, but is this scenario possible?
Chris
Top achievements
Rank 1
 answered on 30 Oct 2009
4 answers
2.2K+ views
Is it possible to detect a server-side event when the user clicks on a datagrid row regardless of wherever on the row area the click happens?

I simply want to take the user to a separate .aspx page when the click occurs and pass the row ID / primary key to the second page.

Thanks
LG
Top achievements
Rank 2
 answered on 30 Oct 2009
2 answers
108 views
Hi,
I want change color in RadChart diagram. What property should I use in design mode to change green color on red?

<telerik:RadChart ID="RadChartQuestion" runat="server" DefaultType="Pie" Width="550px" AutoTextWrap="true" 
                        OnItemDataBound="RadChart2_ItemDataBound" Skin="Office2007" Height="250px" UseSession="false" 
                        TempImagesFolder = "/Tmp" > 
                        <Appearance Dimensions-Width="750px"></Appearance> 
                          
                        <Series> 
                            <telerik:ChartSeries Name="Series 1" Type="Pie" DataYColumn="COUNTER"   
                            Appearance-EmptyValue-FillStyle-GammaCorrection="true"    
                            Appearance-FillStyle-MainColor="Red" > 
                                <Appearance LegendDisplayMode="ItemLabels" TextAppearance-MaxLength="100"></Appearance> 
                            </telerik:ChartSeries> 
                        </Series> 
                    </telerik:RadChart> 
Schlurk
Top achievements
Rank 2
 answered on 30 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?