Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
144 views
I've developed an application with telerik controls. My simple form having only two text boxes and a radgrid with only 2 columns take 8sec to load and on each post back request this time increases. even if i only refresh the page again and again its loading time increases.
i have some very large forms which have a no of controls with 2 or 3 grids and this issue become so worst there
while we see demo of Telerik its speed is good i dnt know what i am missing
i m using shared hosting application is running with good speed locally but have very slow performance on shared or dedicated host. i check it on both host
i think i have some thing missing
I've added the radScriptManager  to the page.
I have set debug mode=false in web.config 
but ..does not seem to help.
Please help me for performance issue as soon as possible
Pavlina
Telerik team
 answered on 07 Jun 2010
1 answer
96 views
Hey Telerik Team,

I'm having an issue with my RadGrid.

Details:
I had created a reporting page with a RadGrid on it, the report contains between 130 - 180 auto generated columns.
I have Allow scrolling enabled so that the grid wouldn't resize to be 20 pages long. This all worked fine. I then had to move the code    to a new page using a master page template file. Now when the grid populates it resizes waaaaaaay bigger than my page size. I still get the horizontal scroll bar but it's about the size of the grid minus one column. Any ideas of why the grid is resizing so crazy now?

Here is my code:

EDIT :: CODE EDITED OUT

Any ideas are greatly appreciated.
Pavlina
Telerik team
 answered on 07 Jun 2010
1 answer
137 views
Hello everybody!
This is how I have defined grid in aspx page:
<MasterTableView EditMode="InPlace" EnableViewState="False"
<RowIndicatorColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</RowIndicatorColumn> 
 
<ExpandCollapseColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</ExpandCollapseColumn> 
<Columns> 
    <telerik:GridBoundColumn DataField="PurchaseRecommendationLineID" UniqueName="PurchaseRecommendationLineID" Visible="false"/> 
    <telerik:GridTemplateColumn UniqueName="Product" DataField="Product"  HeaderText="Tuote" > 
        <EditItemTemplate> 
            <asp:TextBox ID="Text" runat="server"  Text='<%#Bind("Product") %> '/> 
        </EditItemTemplate> 
    </telerik:GridTemplateColumn> 
    <telerik:GridBoundColumn DataField="Unit" UniqueName="Unit" HeaderText="Yksikkö"/> 
        <telerik:GridNumericColumn DataField="Quantity"  UniqueName="Quantity" HeaderText="Määrä" HeaderStyle-Width="50px" NumericType="Number"/> 
     <telerik:GridBoundColumn DataField="Info" UniqueName="Info" HeaderText="Info"/> 
     
   
</Columns> 


I hope some can help me. I have all the grid items in Edit mode. Edit mode is done like this;
protected void ProposalGrid_PreRender(object sender, EventArgs e) 
        { 
            if (!IsPostBack || forceEditable) 
            { 
                forceEditable = false
 
                foreach (GridItem item in ProposalGrid.MasterTableView.Items) 
                { 
                    if (item is GridEditableItem) 
                    { 
                        GridEditableItem editableItem = item as GridDataItem; 
                        editableItem.Edit = true
                    } 
                } 
            } 
            ProposalGrid.Rebind(); 
        } 

I read Values from grid like this:
 private void CollectRowInformation(int headerid) 
        { 
         foreach (GridDataItem item in ProposalGrid.MasterTableView.Items)  
            { 
                RowObject ro = new RowObject(); 
              
                ro.Rowdata.Add("Unit", item["Unit"].Text); 
                ro.Rowdata.Add("Info", item["Info"].Text); 
                ro.Rowdata.Add("Quantity", item["Quantity"].Text); 
                ProsalService.Persist(ro); 
            } 
If I change some values in grid, and try to read it.I get always old value. I give you exsample.If Item orginal information is like this:
Unit:kg
Info:Plah
Quantity:4
And I change item information to
Unit:kg
Info:Plah2
Quantity:5555

If I put break point in CollectRowInformation and check values,It always show orginal values.How Can i read new values from grid.

Shinu
Top achievements
Rank 2
 answered on 07 Jun 2010
1 answer
121 views
Hi All

I am doing as per the link below and also adding the compression below. Now I would expect there to be no viewstate in the page ( as view in firefox and firebug but there seems to be viewstate from the next usercontrol. Any thoughts ?

<

 

add name="RadCompression" type="Telerik.Web.UI.RadCompression" />

 


In my BrowserFile.browser

<

 

browsers>

 

<

 

browser refID="Default">

 

<

 

controlAdapters>

 

<

 

adapter controlType="System.Web.UI.Page" adapterType="Telerik.Web.UI.RadSessionPageStateCompression" />

 

</

 

controlAdapters>

 

</

 

browser>

 

</

 

browsers>

 


http://demos.telerik.com/aspnet-ajax/ajax/examples/common/loadingusercontrols/defaultcs.aspx
Nikolay Rusev
Telerik team
 answered on 07 Jun 2010
1 answer
70 views

Requirements

RadControls version

RadControls for ASP.NET AJAX 2010.1 519
.NET version

2.x
Visual Studio version

2005/8
programming language

VB.NET
browser support

all browsers supported by RadControls


PROJECT DESCRIPTION
I am storing different versions of an Excel file in a SQL Server table.  Each row in the file is a row in the table.  Different versions are differentiated by a VersionNumber column. This code allows the user to view different versions of the file in a RadGrid. Steps:

First you will need a table defined that includes a column for the version.  You will need a way to increment the version as you insert new rows to the table.  I use stored procedures to insert and select from the tables.
Then:
1. Have a radgrid defined to hold the data
2. Create a drop down and link buttons to select either a given version or the current version

<asp:DropDownList ID="ddlVersion" runat="server" Width="250px"
</asp:DropDownList> 
 
<asp:LinkButton ID="lbViewVersion" Text="View selected Version" runat="server"
</asp:LinkButton> 
<br /> 
<asp:LinkButton ID="lbViewCurrentVer" Text="View current Version" runat="server"
</asp:LinkButton> 

3. Create a method to pull the data based on the ddl and link button selections

    Protected Sub GetInventoryData(ByVal displayType As String
        ' set your data access here 
    ' ... 
        Dim inventoryData As DataSet 
        Try 
            ' If different version is selected get the version from the drop down and pass it into a stored procedure 
            If displayType = "diffVersion" Then 
                Dim inParams As New NameValueCollection 
                Dim version As Int16 
                version = ddlVersion.SelectedValue 
                With inParams 
                    .Add("@versionNum", version) 
                End With 
                inventoryData = <your data call to the stored procedure, passing in the version as input param> 
            Else 
        ' I go to a different table and procedure if it's current version so I need an else without input params 
                inventoryData = <your data call to the stored procedure> 
            End If 
            rgridInventory.DataSource = inventoryData 
            rgridInventory.DataBind() 
        Catch ex As Exception 
            ' your error catching protocol 
        Finally 
 
        End Try 
    End Sub 

4. Call the method -- passing in whether you want the current or earlier version. The example below gets a different version
' pulls in different version 
GetInventoryData("diffVersion"






Iana Tsolova
Telerik team
 answered on 07 Jun 2010
4 answers
122 views
hi
  i am using radtoolbar with 2 buttons to close and save the page values. I used one client side function to ask confirmation to the user when save button pressed. For this i added attributes to the onclick event. but when i click cancel in the confirm box also the page postbak or the button function working.

I cant call client side event of radtoolbar because i need to pass the confirm mesage from the code behind. So how can i achieve using this way
            function getConfirm(message) {  
                if (confirm(message) != true) {  
                    return false;  
                }  
                return true;  
            } 

this is my javascript function please tell me how can i restrict to call my code behind funtion
Akhil Raj
Top achievements
Rank 1
 answered on 07 Jun 2010
1 answer
103 views
Hi,
        
        I am having a datetime column which is bounded to a database column which stores date and time as well. I cannot truncate the time details while displaying. I am using the default filter on this column. But the problem is when i select a date it matches the data for date + 12.00 AM and selects no records. Instead i want to compare the date alone and display all the records of that date. I guess i need to do a custom filtering. Please help me with few code snippets of how to do it.

Thanks,
Saravanan K
Shinu
Top achievements
Rank 2
 answered on 07 Jun 2010
9 answers
1.1K+ views
I have a grid with user-visible select checkboxes.  It also has a client-side event for rowclicks.  Now, it's easy for a user to accidentally miss the checkbox and click in the cell itself - which triggers the rowclick event, which I don't want.

So I'm wondering, is there a way in the rowclick even to see what cell/column index was clicked so that I don't do anything if the user clicked in the first cell/column?


Pavlina
Telerik team
 answered on 07 Jun 2010
1 answer
76 views
hi
when I delete row didn't show
until refresh
Princy
Top achievements
Rank 2
 answered on 07 Jun 2010
1 answer
138 views
One of my developers is trying to use an autocomplete column inside a Radgrid. We configured a dropdown column which uses a "select distinct" statement to get the unique existing values in the field, and then used that as source for the dropdowncolumn. Here's the column.

<telerik:GridDropDownColumn DataField="MadeBy" HeaderText="MadeBy"
            SortExpression="MadeBy" UniqueName="MadeBy" DataSourceID="dsMadeBy" ListTextField="MadeBy"     ListValueField="MadeBy">
</telerik:GridDropDownColumn>


In code-behind, we've set up the AllowCustomText and MarkFirstMatch properties as follows;

    Protected Sub RadGridItems_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGridItems.ItemDataBound
        ' try and set the allowcustomtext property on the dropdown
        If TypeOf (e.Item) Is GridEditableItem And e.Item.IsInEditMode Then
            Dim edititem As GridEditableItem = e.Item
            Dim combo As RadComboBox = edititem("MadeBy").Controls(0)
            combo.AllowCustomText = True
            combo.MarkFirstMatch = True
        End If
    End Sub

This seems to work, and we are able to enter new text, but nothing is saved and the Update section remains on the screen. Are we missing something?
Shinu
Top achievements
Rank 2
 answered on 07 Jun 2010
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?