Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
198 views
This is odd. I just upgraded my web project from the old RadControls for ASP.NET to the latest ASP.NET AJAX controls.  I have several hierarchy grids that use the HideExpandColumnRecursive method.  These worked fine under the old controls.

With the new controls, the ExpandCollapse button hides as it should when there are no child records in the 2nd level.

But, if there are child records, then the ExpandCollapse button is visible.  When I click on it,
The column containing the buttons narrows, the button icon narrows, but nothing else happens.
On a second click the child grid opens as expented, and the button column remains narrowed.
On subsequent button clicks, the child grid opens and closes ok.

If I refresh the page, then once again two clicks are needed to expand the row.

Has anyone else run into this?  Thanks.

Dan
Dan
Top achievements
Rank 2
 answered on 16 Apr 2010
3 answers
381 views
I am tring to add a custom aggregate to a group footer. I need to step throught all the data in the grid for that group. I just can't seem to find the values.
Please tell me how to change this.

Thanks,

Protected Sub dgrPartnerTransactions_CustomAggregate(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCustomAggregateEventArgs) Handles dgrPartnerTransactions.CustomAggregate  
        Dim items As GridItem() = Me.dgrPartnerTransactions.MasterTableView.GetItems(GridItemType.Item)  
        Dim Amount As Int32 = 0  
        For Each index As GridDataItem In items  
            Amount = Amount + CType(index.GetDataKeyValue("TransactionAmount"), Int32)  
        Next 
        e.Result = Amount.ToString()  
    End Sub 

<telerik:RadGrid PageSize="100" ID="dgrPartnerTransactions" ShowGroupPanel="true" 
                    runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" 
                    Skin="Office2007" GridLines="None" Width="99%" ShowFooter="true">  
                    <PagerStyle Mode="NextPrevNumericAndAdvanced" /> 
                    <MasterTableView TableLayout="Fixed" ShowGroupFooter="true">  
                        <RowIndicatorColumn> 
                            <HeaderStyle Width="20px"></HeaderStyle> 
                        </RowIndicatorColumn> 
                        <ExpandCollapseColumn> 
                            <HeaderStyle Width="20px"></HeaderStyle> 
                        </ExpandCollapseColumn> 
                        <Columns> 
                          
                            <telerik:GridTemplateColumn HeaderText="" UniqueName="DeleteThis" Groupable="false">  
                                <HeaderStyle HorizontalAlign="Center" Width="30px"></HeaderStyle> 
                                <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle> 
                                <ItemTemplate> 
                                    <asp:CheckBox ID="DeleteThis" runat="server" /> 
                                    <asp:Label runat="server" Visible="False" ID="lblPartnerTransactionID" Text='<%#DataBinder.Eval(Container, "DataItem.PartnerTransactionID")%>'></asp:Label> 
                                </ItemTemplate> 
                            </telerik:GridTemplateColumn> 
              
                            <telerik:GridTemplateColumn UniqueName="TemplateEditColumn" Groupable="false">  
                                <HeaderStyle HorizontalAlign="Center" Width="30px"></HeaderStyle> 
                                <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle> 
                                <ItemTemplate> 
                                    <asp:HyperLink ID="hypEditLink" runat="server" Text="Edit" NavigateUrl="#" OnClick='<%# getEditWindowURL( DataBinder.Eval(Container, "DataItem.PartnerTransactionID") ) %>'></asp:HyperLink> 
                                </ItemTemplate> 
                            </telerik:GridTemplateColumn>                  
                                
                            <telerik:GridTemplateColumn HeaderText="Transaction Type" UniqueName="PartnerTransactionType" 
                                Groupable="false" DataField="PartnerTransactionType" SortExpression="PartnerTransactionType" 
                                GroupByExpression="PartnerTransactionType Group By PartnerTransactionType">  
                                <HeaderStyle HorizontalAlign="Left"></HeaderStyle> 
                                <ItemStyle HorizontalAlign="Left"></ItemStyle> 
                                <ItemTemplate> 
                                    <%#DataBinder.Eval(Container, "DataItem.PartnerTransactionType")%>&nbsp;  
                                </ItemTemplate> 
                            </telerik:GridTemplateColumn> 
                  
                            <telerik:GridTemplateColumn HeaderText="Date" UniqueName="TransactionDate" Groupable="false" 
                                DataField="TransactionDate" SortExpression="TransactionDate" GroupByExpression="TransactionDate Group By TransactionAmount">  
                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle> 
                                <ItemStyle HorizontalAlign="Center"></ItemStyle> 
                                <ItemTemplate> 
                                    <%#DataBinder.Eval(Container, "DataItem.TransactionDate", "{0:d}")%>&nbsp;  
                                </ItemTemplate> 
                            </telerik:GridTemplateColumn> 
                  
                            <telerik:GridTemplateColumn HeaderText="Amount" UniqueName="TransactionAmount" Groupable="false" 
                                DataField="TransactionAmount" SortExpression="TransactionAmount" Aggregate="Custom">  
                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle> 
                                <ItemStyle HorizontalAlign="Center"></ItemStyle> 
                                <ItemTemplate> 
                                    <%#DataBinder.Eval(Container, "DataItem.TransactionAmount", "{0:C}")%>&nbsp;  
                                </ItemTemplate> 
                            </telerik:GridTemplateColumn> 
                  
                            <telerik:GridTemplateColumn HeaderText="Check Number" UniqueName="CheckNumber" Groupable="false" 
                                DataField="CheckNumber" SortExpression="CheckNumber" GroupByExpression="CheckNumber Group By CheckNumber">  
                                <HeaderStyle HorizontalAlign="Left"></HeaderStyle> 
                                <ItemStyle HorizontalAlign="Left"></ItemStyle> 
                                <ItemTemplate> 
                                    <%#DataBinder.Eval(Container, "DataItem.CheckNumber")%>&nbsp;  
                                </ItemTemplate> 
                            </telerik:GridTemplateColumn> 
                  
                            <telerik:GridTemplateColumn HeaderText="Paid Out of Escrow?" UniqueName="PaidOutOfEscrow" 
                                Groupable="false" DataField="PaidOutOfEscrow" SortExpression="PaidOutOfEscrow" 
                                GroupByExpression="PaidOutOfEscrow Group By PaidOutOfEscrow">  
                                <HeaderStyle HorizontalAlign="Left"></HeaderStyle> 
                                <ItemStyle HorizontalAlign="Left"></ItemStyle> 
                                <ItemTemplate> 
                                    <%#FormatYesNo(DataBinder.Eval(Container, "DataItem.PaidOutOfEscrow"))%>&nbsp;  
                                </ItemTemplate> 
                            </telerik:GridTemplateColumn>                 
                                    
                            <telerik:GridTemplateColumn HeaderText="Property" UniqueName="PropertyAddress" DataField="PropertyAddress" 
                                SortExpression="PropertyAddress" GroupByExpression="PropertyAddress Group By PropertyAddress">  
                                <HeaderStyle HorizontalAlign="Left"></HeaderStyle> 
                                <ItemStyle HorizontalAlign="Left"></ItemStyle> 
                                <ItemTemplate> 
                                    <a href='PropertyDetails.aspx?PropertyID=<%#DataBinder.Eval(Container, "DataItem.PropertyID")%>' 
                                        target="_blank">  
                                        <%#DataBinder.Eval(Container, "DataItem.PropertyAddress")%></a>&nbsp;  
                                </ItemTemplate> 
                            </telerik:GridTemplateColumn>                 
              
                            <telerik:GridTemplateColumn HeaderText="Transaction Note" UniqueName="TransactionNote" 
                                Groupable="false" DataField="TransactionNote" SortExpression="TransactionNote" 
                                GroupByExpression="TransactionNote Group By TransactionNote">  
                                <HeaderStyle HorizontalAlign="Left"></HeaderStyle> 
                                <ItemStyle HorizontalAlign="Left"></ItemStyle> 
                                <ItemTemplate> 
                                    <%#DataBinder.Eval(Container, "DataItem.TransactionNote")%>&nbsp;  
                                </ItemTemplate> 
                            </telerik:GridTemplateColumn> 
                  
                            <telerik:GridTemplateColumn HeaderText="Document" UniqueName="PropertyID" Groupable="false">  
                                <ItemTemplate> 
                                    <%#getDocumentURL(DataBinder.Eval(Container, "DataItem.DocumentName"), DataBinder.Eval(Container, "DataItem.DocumentLocation"))%>&nbsp;  
                                </ItemTemplate> 
                            </telerik:GridTemplateColumn>   
               
                 
                            <telerik:GridTemplateColumn HeaderText="Balance" UniqueName="Balance" Groupable="false" 
                                DataField="Balance" SortExpression="Balance"   
                                GroupByExpression="Balance Group By Balance">  
                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle> 
                                <ItemStyle HorizontalAlign="Right"></ItemStyle> 
                                <ItemTemplate> 
                                    <%#DataBinder.Eval(Container, "DataItem.Balance", "{0:C}")%>&nbsp;  
                                </ItemTemplate> 
                            </telerik:GridTemplateColumn> 
               
                  
                        </Columns> 
                        <GroupByExpressions> 
                            <telerik:GridGroupByExpression> 
                                <GroupByFields> 
                                    <telerik:GridGroupByField FieldName="PropertyID" /> 
                                </GroupByFields> 
                                <SelectFields> 
                                    <telerik:GridGroupByField FieldName="TransactionAmount" HeaderText="TransactionAmount" /> 
                                </SelectFields> 
                            </telerik:GridGroupByExpression> 
                        </GroupByExpressions> 
              
                    </MasterTableView> 
                      
                    <ClientSettings AllowDragToGroup="false" AllowGroupExpandCollapse="true" AllowColumnsReorder="true">  
                        <Scrolling AllowScroll="False" UseStaticHeaders="True" SaveScrollPosition="true" 
                            FrozenColumnsCount="1"></Scrolling> 
                    </ClientSettings> 
                      
                    <FilterMenu EnableTheming="True">  
                        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                    </FilterMenu> 
                </telerik:RadGrid> 

Aaron Spilman
Top achievements
Rank 1
 answered on 16 Apr 2010
2 answers
116 views
Hi,
We are upgrading our website from ASP.Net 2.0 to ASP.Net 4.0 with Visual Studio 2010 and Telerik controls for 2010 Q1. After installing telerik 2010 Q1 version  i only see two dlls System.Web.UI and System.Web.Design. In our current application we are using Telerik.Charting.dll. How can i get access to the charting features in the new Telerik dlls. We have some web pages which use these charts. Please explain how to upgrade the charts we have to the new version.


Thanks
Nishat Mazhar
Top achievements
Rank 1
 answered on 16 Apr 2010
1 answer
413 views
I have a grid that I am using to display search results in.  This is my first project using a RadGrid.  I'm using VB.Net in Visual Studio 2008.

I created the 3 columns ahead of time and then when the search is run I fill a DataSet with the SQL query results, set the DataSet as the "DataSource" and then call "Rebind" on the grid.

The grid properly redraws and shows me that there were 3 rows of results returned, but each cell of the table simply shows "System.Data.DataRowView" instead of the actual values.

Is there some property I'm missing somewhere that is causing the table to not show me the actual data in my DataSet?
Pavlina
Telerik team
 answered on 16 Apr 2010
1 answer
102 views
What I am trying to accomplish is have a master grid view that shows the workgroups the user is a member of. when the workgroup is expanded the assigned tickets to that workgroup will be displayed. The catch is i want the RadGrid inside of the NestedViewTemplate to have a maxHeight property and an overflow to allow scrolling. I do not want to use paging as the result set will ever only be in the 10s of records.
The error that I am getting is "Could not find control 'lblWorkgroupID' in ControlParameter'TO_WORKGROUP_FROM_SQL2'."
And the markup is:
                            <asp:SqlDataSource  
                                ID="SqlDataSource1"  
                                runat="server"  
                                ConnectionString="<%$ ConnectionStrings:ConnectionString %>"  
                                ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" /> 
                            <asp:SqlDataSource  
                                ID="SqlDataSource2"  
                                runat="server"  
                                ConnectionString="<%$ ConnectionStrings:ConnectionString %>"  
                                ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" > 
                                <SelectParameters> 
                                    <asp:ControlParameter ControlID="lblWorkgroupID" PropertyName="Text" Type="String" Name="TO_WORKGROUP_FROM_SQL2" /> 
                                </SelectParameters> 
                            </asp:SqlDataSource> 
                            <telerik:radgrid id="RadGrid_Incidents" AutoGenerateColumns="false" ShowHeader="false" runat="server" DataSourceID="SqlDataSource1" Skin="Default"> 
                                <MasterTableView ClientDataKeyNames="TO_WORKGROUP_FROM_SQL2" DataKeyNames="TO_WORKGROUP_FROM_SQL1" HierarchyLoadMode="Client"> 
                                    <Columns> 
                                        <telerik:GridBoundColumn UniqueName="TO_WORKGROUP" DataField="TO_WORKGROUP_FROM_SQL1" /> 
                                    </Columns> 
                                    <NestedViewSettings DataSourceID="SqlDataSource2"> 
                                        <ParentTableRelation> 
                                            <telerik:GridRelationFields DetailKeyField="TO_WORKGROUP_FROM_SQL2" MasterKeyField="TO_WORKGROUP_FROM_SQL1" /> 
                                        </ParentTableRelation> 
                                    </NestedViewSettings> 
                                    <NestedViewTemplate> 
                                    <div style="max-height:100px; overflow:auto"> 
                                        <asp:Label ID="lblWorkgroupID" Text='<%# Eval("TO_WORKGROUP_FROM_SQL1") %>' Visible="false" runat="server" /> 
                                            <telerik:radgrid AutoGenerateColumns="false" id="Incidents_Grid" ShowHeader="false" runat="server" DataSourceID="SqlDataSource2" Skin="Default"> 
                                                <MasterTableView DataKeyNames="TO_WORKGROUP_FROM_SQL2" HierarchyLoadMode="Client"> 
                                                   <Columns> 
                                                       <telerik:GridBoundColumn UniqueName="DESCRIPTION" HeaderText="DESCRIPTION" DataField="DESCRIPTION" /> 
                                                       <telerik:GridBoundColumn UniqueName="INCIDENT_ID" HeaderText="INCIDENT_ID" DataField="INCIDENT_ID" ItemStyle-Font-Size="8pt" /> 
                                                   </Columns> 
                                                </MasterTableView> 
                                            </telerik:radgrid> 
                                        </div> 
                                    </NestedViewTemplate> 
                                    <ExpandCollapseColumn Visible="True" /> 
                                </MasterTableView> 
                                <ClientSettings Selecting-AllowRowSelect="true" /> 
                            </telerik:radgrid> 

with codebehind:
                String _User = "longjt";//HttpContext.Current.Request.ServerVariables["AUTH_USER"]; 
 
                SqlDataSource1.SelectCommand = "SELECT NAME as TO_WORKGROUP_FROM_SQL1 FROM SERVICE_MANAGER_ADM.ASSIGNMENTA1 WHERE OPERATORS = '" + _User + "'"; 
                SqlDataSource2.SelectCommand = "SELECT TO_WORKGROUP as TO_WORKGROUP_FROM_SQL2, TO_PERSON_VUNETID, DESCRIPTION, INCIDENT_ID,  CREATED_ON FROM SERVICE_MANAGER_ADM.INCIDENT_REPORT_VIEW WHERE   (TO_WORKGROUP = @TO_WORKGROUP) AND STATUS != 'Closed' AND STATUS != 'Resolved' ORDER By TO_PERSON_VUNETID, CREATED_ON"; 
 


Malichone
Top achievements
Rank 1
 answered on 16 Apr 2010
1 answer
293 views
I have a RadGrid (Rad Ajax 2009 Q3) that allows its columns to be resizable.  If I drag one column past the point where the javascript will actually resize the column, I still get a tool tip that tells me the width and the parent div tag (of the table) still shrinks.  When I release my mouse, the parent div tag has its width less than the actual table width.  Because the parent div tag has its border set, the right border runs right down the middle of one of my columns.  If I sort the columns, the div tag gets reset correctly, but how can I get it to work without having to do a resort?
<telerik:RadGrid ID="dgLocations" runat="server" AutoGenerateColumns="False" Visible="false"> 
                    <MasterTableView ShowHeadersWhenNoRecords="False" AllowNaturalSort="false" AllowSorting="true"> 
                        <SortExpressions> 
                            <telerik:GridSortExpression FieldName="LocationName" SortOrder="Ascending" /> 
                        </SortExpressions> 
                        <Columns> 
                            <telerik:GridBoundColumn UniqueName="LocationCode" 
                                DataField="LocationCode" HeaderText="Code" /> 
                            <telerik:GridBoundColumn UniqueName="LocationName" 
                                DataField="LocationName" HeaderText="Name" /> 
                            <telerik:GridBoundColumn UniqueName="City" 
                                DataField="City" HeaderText="City" /> 
                            <telerik:GridBoundColumn UniqueName="State" DataField="State"  
                                HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderText="State/Province" Resizable="false" /> 
                            <telerik:GridTemplateColumn UniqueName="Select" HeaderText="Select"> 
                                <ItemStyle  HorizontalAlign="Center" /> 
                                <HeaderStyle HorizontalAlign="Center" /> 
                                <ItemTemplate> 
                                    <a onclick="returnValues(<%# Eval("LocationID") %>);" href="#">Select</a> 
                                </ItemTemplate> 
                            </telerik:GridTemplateColumn> 
                        </Columns> 
                    </MasterTableView> 
                    <ClientSettings> 
                        <Resizing AllowColumnResize="true" ClipCellContentOnResize="false" EnableRealTimeResize="true" 
                            ResizeGridOnColumnResize="true" /> 
                    </ClientSettings> 
                </telerik:RadGrid> 


Mira
Telerik team
 answered on 16 Apr 2010
4 answers
587 views
I'm still coming up to speed on RadGrid (Telerik's controls general!)... So the scenario is I've got a RadControl on my page.  I've added an Edit button and the Add New Record button in the command row.    What I'd like to do is put the rest of the grid in a "disabled" state while on row is being worked on (whether that's editing an existing row after clicking the Edit button for that row, or having clicked the "Add New..." button). 

I already have an event handler setup to handle the edit/insert, so that part is easy enough.  What I don't see is an easy way to disable clicking on all other edit/delete buttons on the other rows in the grid, or any item in the command row.

Suggestions?

In a somewhat related vein... When the user is editing a row (edit or insert again), I'd like to have the return key be the equivalent of clicking the Update or Insert command.  Or at least get the tab order such that after tabbing out of the last editable column of the row that it goes next to the Update/Insert command/button.

Any help would be greatly appreciated.
Iana Tsolova
Telerik team
 answered on 16 Apr 2010
4 answers
299 views
Hi!

Is there any way to keep rad editor from stripping html, head and body tags from a template just added from the template manager?


EDIT:

Extended explanation.

I have a folder with html files I want to use as templates to create new html files. But when I load them using the template manager, all the head section, and the <html> and <body> tags disappear, and so do all the css classes defined inline.

I've noticed that on telerik examples happends the same.

Is there any way to keep all that information instead of being stripped away?
Scott Allen
Top achievements
Rank 1
 answered on 16 Apr 2010
4 answers
166 views
I'm in the section "Configuring the ActiveSkill Database" on page 165 of RadControlsAJAXCourseware.pdf.  I can create the database and run the script to create the tables, but when I try to run the script to populate the test data I get a permissions error:  "

Cannot find the object "Appointment_Data" because it does not exist or you do not have permissions".

I know the object exists and I've tried creating everything from scratch while logged in with my windows system account as well as sa.  How could sa not have permissions to insert data?  Anyway, I'll keep trying but help would be appreciated!

Patricia Byrne
Top achievements
Rank 1
 answered on 16 Apr 2010
5 answers
243 views
This may be an easy question but I couldn't get the combobox to sort by Text. I already set my combobox to sort in ascending but it still sorts by "Id". The datasource is an IList.
Simon
Telerik team
 answered on 16 Apr 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?