Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
84 views
We have a RadGrid with 9 columns.  We want to use a RadEdiotor for 3 of the columns and have this working except that the performance becomes terrible when there are many rows.   For example, with 200 rows in the RadGrid, with the 3 Editors per row, it takes about 30 seconds to load the page.

I realize that we could implement paging and keep it to less than 10 or 20 rows, but this experience does not work well in the situation we need to handle.

I have seen tips on improving performance for multiple RadEditors on a page, but not specifically to multiple RadEditors within a RadGrid.

Can you give us any tips on how to handle this better.

Thanks... Terry


.
Rumen
Telerik team
 answered on 23 Jan 2012
2 answers
117 views
Dear all Guru's
I have a grid as below

<telerik:RadGrid HeaderStyle-Wrap="false" ItemStyle-Wrap="true" ID="gvCustomers"
            runat="server" AutoGenerateColumns="False" GridLines="None" AllowSorting="true"
            OnNeedDataSource="gvCustomers_NeedDataSource" OnItemCommand="gvCustomers_ItemCommand">
            <MasterTableView DataKeyNames="CustomerId">
                <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
                <RowIndicatorColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                </RowIndicatorColumn>
                <ExpandCollapseColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridBoundColumn DataField="Title" HeaderText="Title" UniqueName="Title">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="FName" HeaderText="First Name" UniqueName="FName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="LName" HeaderText="Last Name" UniqueName="LName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CompanyName" HeaderText="Company" UniqueName="CompanyName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Address1" HeaderText="Address 1" UniqueName="Address1">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Town" HeaderText="Town" UniqueName="Town">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Postcode" HeaderText="Postcode" UniqueName="Postcode">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Telephone" HeaderText="Tel" UniqueName="Telephone">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Mobile" HeaderText="Mobile" UniqueName="Mobile">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Email" HeaderText="Email" UniqueName="Email">
                    </telerik:GridBoundColumn>
                    <telerik:GridButtonColumn Text="Select" CommandName="Select" ButtonType="LinkButton"
                        UniqueName="column">
                    </telerik:GridButtonColumn>
                    <telerik:GridButtonColumn Text="Edit" CommandName="EditCustomer" ButtonType="LinkButton"
                        UniqueName="EditCustomer">
                    </telerik:GridButtonColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
And the code behind wired up as follows:
protected void gvCustomers_ItemCommand(object sender, GridCommandEventArgs e)
       {
           if (!IsPostBack)
           {
               var item = (GridDataItem) e.Item;
               string id = item.GetDataKeyValue("CustomerId").ToString();
 
               if ((e.Item is GridDataItem) && (e.CommandName == "EditCustomer"))
               {
                   var destination = string.Format("CustomerEdit.aspx?CustomerId={0}", id);
                   Response.Redirect(destination);
               }
 
               if ((e.Item is GridDataItem) && (e.CommandName == "Select"))
               {
                   var destination = string.Format("CustomerDetail.aspx?CustomerId={0}", id);
                   Response.Redirect(destination);
               }
           }
            
       }
When I sort the grid on the header I get the following error. 

 Unable to cast object of type 'Telerik.Web.UI.GridHeaderItem' to type 'Telerik.Web.UI.GridDataItem'.

Obviously if I wrap the ItemCommand in a if(!IsPostback) it doens't error but then I lose the functionality of my command buttons in the Grid.

Can someone tell what I have missed here?

Many thanks for any help
Simon
Top achievements
Rank 1
 answered on 23 Jan 2012
1 answer
118 views
Hello
I have RadGrid Q3 2008 and using VB.Net
I have created a Status/Detail reporting system that uses the classic Master Detail Telerik example as seen at http://www.telerik.com/help/aspnet-ajax/grid-related-grids.html 

Everything appears to work fine except when I click on a master row item the detail grid does not automatically update unless I click on the refresh button. I am using Ajax Manager.  My datakeys appear to be correct since everything turns out correctly when I press the Refresh button.

PS. I do note that when I turn off Ajax for both grids then they update correctly.

I'm sure that I'm overlooking something.
Your help would be appreciated.

regards,

Ted


Shinu
Top achievements
Rank 2
 answered on 23 Jan 2012
1 answer
62 views
Hey peeps,

We have a RadGrid on a page that shows a list of all records in a specific table. With this, the user has selectable options for filtering the information in a seperate space above the Grid (not using the RadGrid filtering options - we are still using an older version of Telerik and the current set does not provide a checkboxlist which we require. The current filtering options does not provide the functionality we need to enable the filtering and besides this, the current options available will be too difficult for our users to understand.).

The user then makes his/her selection from the available filtering options (on the coding side, I programmatically create the SQL query needed to retrieve records according to the selection). This query is then assigned to the SqlDataSource (SqlDataSource1.SelectCommand = 'query'). When the user clicks the Filter button, the RadGrid populates with the results from the new custom query. HOWEVER, when I click on the next page or click on any other page number, the Grid populates from scratch and does not keep the filtering. I have tried to use the FilterExpression on the SqlDataSource, the same happens. First page shows the filtered results but when moving to the next or previous page, the data is "reset".

How can I have the Grid reflect ONLY the data obtained from the new query?
Mira
Telerik team
 answered on 23 Jan 2012
17 answers
292 views
Hi,
  I need to create buttons with variable heights and color theme as in my attached sample image. I succeeded creating various color theme but i'm not able to change the height of the button as its mentioned in button.css. Can anybody help me out to get this done.

Thanks,
Selva
Bozhidar
Telerik team
 answered on 23 Jan 2012
0 answers
55 views
Hi,

I have a main page with a RadAjaxManager on it, 2 dock zones and docks within those zones. The docks contain Web User Controls, whose ID's are known and no new Controls will be dynamically added. Each of these docks have a DockCommand that open up a RadWindow. What I am trying to achieve is that once the RadWindow closes or the save button in the RadWindow is clicked (effectively closing the window anyway) the UserControl in the dock that the RadWindow was opened from needs to rebind. 

Any help with this please?

Thanks
Marcel
Marcel
Top achievements
Rank 1
 asked on 23 Jan 2012
1 answer
108 views
Hi,

For various reasons I can't use the nice GUI designer, so I'm trying to format the chart via codebehind, but I'm having two issues I can't seem to solve.

1. The YAxis (the names in the image), is clipping, I can't figure out how to fix that. Note that this is a custom Axis - AutoScale = false.
2. There is a large space between the legend and the actual chart, I can't seem to figure out which property to set to fix this.

Charting 2011.2.915.40

Thanks
Prescott
Yavor
Telerik team
 answered on 23 Jan 2012
1 answer
244 views
I have a Radgrid which displays  a recordset with a lot of foreign key relations returned. Most of the values are the IDs of the rows, so I want to display the related descriptions from the lookup tables. To this I am using several GridDropDownColumns.
All of them work correctly with their respective sqldatasource bindings except the one that is dependent on another GridDropDownColumn. It seems that if I use the first dropdown as a <asp:controlpatameter... for the sqldatasource of the second dropdown ...then the Page Load cannot find the first dropdown.
Here is the sqldatasource for the second dropdown:

<asp:SqlDataSource ID="ds_DemoValues" runat="server" ConnectionString="<%$ ConnectionStrings:CFSubsConn %>"<br><br>SelectCommand="SELECT [ID], [QuestionID], [Value] FROM [v_DemoValues] WHERE ([QuestionID] = @QuestionID) UNION SELECT Null AS ID, '' as QuestionID, 'Select a Value' AS [Value]"><br><br><SelectParameters> <br><br><asp:controlparameter name="QuestionID" controlid="ddl_ParentControlID" propertyname="SelectedValue"/> <br><br></SelectParameters><br><br></asp:SqlDataSource>
The error on PageLoad is:

Could not find control 'ddl_ParentControlID' in ControlParameter 'QuestionID'.

The RadGrid code is as follows:
<telerik:RadGrid ID="RadGrid1" AutoGenerateColumns="False" runat="server" Width=750px DataSourceID="ds_Validation" GridLines="None"
Skin="Outlook"  AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowAutomaticDeletes="True">
 <MasterTableView DataKeyNames="OtherValidationID" DataSourceID="ds_Validation" CommandItemDisplay="Top">
    <EditFormSettings EditFormType="Template">
<FormTemplate>
<table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="1" rules="none" style="border-collapse: collapse; background: white;">
<tr class="EditFormHeader">
    <td style="font-size: small"><b>Validation Control Parameters</b></td></tr>
<tr> <td>
           <table id="Table3" cellspacing="1" cellpadding="1" width="250" border="0" class="module">
                  <tr><td></td><td></td></tr>
                  <tr>
                     <td>ID:</td>
                     <td><asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind( "OTHERVALIDATIONID" ) %>'  enabled="False"></asp:TextBox></td>
                   </tr>                                                      
                   <tr>
                       <td>ParentControlID:</td>
                       <td><asp:DropDownList ID="ddl_ParentControlID" AutoPostBack="True" OnSelectedIndexChanged="setDemoValues" runat="server" SelectedValue='<%# Bind("PARENTCONTROLID") %>' DataSourceID="ds_DemoQuestions" DataValueField="ID" DataTextField="Question"><asp:ListItem Value="" Text="Select an Question">Select an Question</asp:ListItem></asp:DropDownList></td>
                   </tr>
                   <tr>
                       <td>ParentControlType:</td>
                       <td><asp:DropDownList ID="ddl_ParentControlType" runat="server" SelectedValue='<%# Bind("PARENTCONTROLTYPE") %>' DataSourceID="ds_ControlTypes" DataValueField="VALUE" DataTextField="DESCRIPTION"></asp:DropDownList></td>
                     </tr>
                     <tr>
                        <td>DetailID:</td>
                     <td><asp:DropDownList ID="ddl_DemoID" DataSourceID = "ds_DemoValues" runat="server" DataValueField="ID" DataTextField="Value" SelectedValue='<%# Bind("DetailID") %>' ><asp:ListItem Value="" Text="Select a Value">Select a Value</asp:ListItem></asp:DropDownList>
                      </td>
                 </tr>
                 <tr>
                      <td>ChildControlID:</td>
                      <td><asp:DropDownList ID="ddl_ChildParentID" runat="server" SelectedValue='<%# Bind("CHILDCONTROLID") %>' DataSourceID="ds_DemoQuestions" DataValueField="ID" DataTextField="Question">
                                                                        <asp:ListItem Value="" Text="Select an Question">Select an Question</asp:ListItem></asp:DropDownList></td>
                  </tr>
                  <tr>
                       <td>ChildControlType:</td>
                        <td><asp:DropDownList ID="ddl_ChildControlType" runat="server" SelectedValue='<%# Bind("CHILDCONTROLTYPE") %>' DataSourceID="ds_ControlTypes" DataValueField="VALUE" DataTextField="DESCRIPTION">
                                </asp:DropDownList></td>
                       </tr>
                       <tr>
                           <td>ValidationMsg:</td>
                           <td><asp:TextBox ID="TextBox3" runat="server" Columns="75" Text='<%# Bind( "ValidationMsg") %>' TabIndex="2"></asp:TextBox></td>
                          </tr>
                          <tr>
                              <td><asp:Button ID="btnUpdate" Text='<%# IIf((TypeOf(Container) is Telerik.Web.Ui.GridEditFormInsertItem), "Insert", "Update") %>'
                                                        runat="server" CommandName='<%# IIf( DataBinder.Eval(Container, "OwnerTableView.IsItemInserted"), "PerformInsert", "Update") %>'>
                                                    </asp:Button></td>
                                      <td><asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button></td>
                                </tr>
                           </table>
                       </td>
                   </tr>                 
               </table>
               </FormTemplate>
               <EditColumn UniqueName="EditCommandColumn1"></EditColumn>
               </EditFormSettings>
               <Columns>
                                    <telerik:GridEditCommandColumn>
                                    </telerik:GridEditCommandColumn>
                                    <telerik:GridBoundColumn DataField="OtherValidationID" DataType="System.Int32" HeaderText="ID"
                                        ReadOnly="True" SortExpression="OtherValidationID" UniqueName="OtherValidationID">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridDropDownColumn DataField="ParentControlID"  DataSourceID="ds_DemoQuestions" HeaderText="Parent Question"
                                         ListTextField="QUESTION" ListValueField="ID" UniqueName="ParentControlID">
                                    </telerik:GridDropDownColumn>
                                    
                                    
                                    <telerik:GridDropDownColumn DataField="ParentControlType" DataSourceID="ds_ControlTypes" HeaderText="ParentCtlType"
                                         ListTextField="DESCRIPTION" ListValueField="VALUE" UniqueName="ddl_ParentControlType">
                                    </telerik:GridDropDownColumn
                                    <telerik:GridDropDownColumn DataField="DetailID" DataSourceID="ds_DemoValues" HeaderText="DetailID"
                                         ListTextField="VALUE" ListValueField="ID" UniqueName="ddl_DemoID">
                                    </telerik:GridDropDownColumn
                                                                                
                                   <telerik:GridBoundColumn DataField="DetailID" DataType="System.Int32" HeaderText="DetailIDVal"
                                        SortExpression="DetailID" UniqueName="DetailID" >
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="ChildControlID" DataType="System.Int32" HeaderText="ChildControlID"
                                        SortExpression="ChildControlID" UniqueName="ChildControlID" Display="False">
                                    </telerik:GridBoundColumn>
                                       
                                    <telerik:GridDropDownColumn DataField="ChildControlID" DataSourceID="ds_DemoQuestions" HeaderText="Child Question"
                                         ListTextField="QUESTION" ListValueField="ID" UniqueName="ddl_ChildControlID">
                                    </telerik:GridDropDownColumn>
                                    <telerik:GridBoundColumn DataField="Description" DataType="System.Int32" HeaderText="Description"
                                        SortExpression="Description" UniqueName="Description">
                                    </telerik:GridBoundColumn>
                                                                       <telerik:GridDropDownColumn DataField="ChildControlType" DataSourceID="ds_ControlTypes" HeaderText="ChildCtlType"
                                         ListTextField="DESCRIPTION" ListValueField="VALUE" UniqueName="ddl_ChildControlType">
                                    </telerik:GridDropDownColumn>
                                    <telerik:GridBoundColumn DataField="ValidationMsg" HeaderText="ValidationMsg" SortExpression="ValidationMsg"
                                        UniqueName="ValidationMsg">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName= "DeleteColumn">
                                    <ItemStyle VerticalAlign="Top" /></telerik:GridButtonColumn>
                                                        </Columns>
                               </MasterTableView>
                               </telerik:RadGrid>

Very little happens in the code-behind. I have tried some default value manipulation there, but it seems it only works on either the PageLoad or Add Record or Edit..... but never all three.

Please help.
Dana
Antonio Stoilkov
Telerik team
 answered on 23 Jan 2012
1 answer
89 views
Hi,
I am using radcombo box. I bind values to combo box. in server side.

After that , i need to set the selectedvalue to combo box in java script.

Because , i am getting the selected value of combobox in java script only.

i am not getting this in server side. i need to set the value in client side only.

how to set the value in java script?

i am using vs2010.

Thanks,
Uma



Princy
Top achievements
Rank 2
 answered on 23 Jan 2012
2 answers
187 views
Hi there,

Im currently using the radTools Q3 2011 Rad window and I'm having issues when it renders its titlebar (with the default skin). 

<telerik:RadWindowManager ID="RadWindows" runat="server">
        <Windows>
            <telerik:RadWindow ID="RadActionWindow" RegisterWithScriptManager="false" OnClientClose="updateRadGrid" runat="server" CssClass="actionWindow" AutoSize="true" Modal="true" VisibleStatusbar="False" VisibleTitlebar="true" EnableTheming="True" EnableEmbeddedSkins="True" DestroyOnClose="false" ReloadOnShow="true" ShowContentDuringLoad="false">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>

The problem is that the title bar sets its title row too high, I have tried the following:

1. Remove the reset.css in case there was some kind of conflict.
2. Set up a blank window with no content -  still get the same issue.

I have included an image to better explain what I mean

Thanks for your time
Shinu
Top achievements
Rank 2
 answered on 23 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?