This is a migrated thread and some comments may be shown as answers.

Grid Footer disappearing after row is added.

2 Answers 147 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dave
Top achievements
Rank 1
Dave asked on 26 Feb 2014, 08:31 PM
Hello everyone,

I have a Web User Control (ascx) that I am adding to a Sitefinity page.  I have the grid all setup and functioning, and recently added a footer to a calculated field column.  When the page first renders, the Footer Text is displayed fine, but when a row is added, the text disappears and only the total remains.  Has anyone ever encountered this?  Can you tell from my attached code if there is something missing?

Thank you in advance.

<telerik:RadGrid ID="rdTicketGrid" runat="server" Width="70%" AllowAutomaticUpdates="false" AllowAutomaticDeletes="false" AllowAutomaticInserts="false" AllowSorting="false"
                            OnNeedDataSource="rdTicketGrid_NeedDataSource" AutoGenerateColumns="false" ShowFooter="true"
                            OnInsertCommand="rdTicketGrid_InsertCommand"
                            OnUpdateCommand="rdTicketGrid_UpdateCommand"
                            OnItemCreated="rdTicketGrid_ItemCreated"
                            OnDeleteCommand="rdTicketGrid_DeleteCommand"
                            OnItemDataBound="rdTicketGrid_ItemDataBound">
            <PagerStyle Mode="NextPrevAndNumeric" />
            <MasterTableView DataKeyNames="TicketEntryID" CommandItemDisplay="Top" InsertItemDisplay="Top" InsertItemPageIndexAction="ShowItemOnCurrentPage">
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"></telerik:GridEditCommandColumn>
                    <telerik:GridBoundColumn DataField="TicketEntryID" UniqueName="TicketEntryID" Display="false"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="NumOfTickets" HeaderText="Number of Tickets"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="NumberTicketsInSet" HeaderText="Number of Tickets per Set"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="PriceOfTickets" HeaderText="Price of Tickets" DataFormatString="{0:C}"></telerik:GridBoundColumn>
                    <telerik:GridCalculatedColumn HeaderText="Total Amount" UniqueName="TotalSetAmount" DataType="System.Double"  DataFormatString="{0:C}"
                                                    DataFields="NumOfTickets, NumberTicketsInSet, PriceOfTickets" Expression="{0}/{1}*{2}" FooterText="Total: " Aggregate="Sum"
                                                    FooterAggregateFormatString="{0:C}">
                    </telerik:GridCalculatedColumn>
                    <telerik:GridButtonColumn ConfirmText="Delete this ticket entry?" ConfirmDialogType="RadWindow"
                    ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" />
                </Columns>
                <EditFormSettings>
                    <EditColumn ButtonType="ImageButton"></EditColumn>
                </EditFormSettings>
            </MasterTableView>
            <ClientSettings>
                <ClientEvents OnRowDblClick="rowDblClick" />
            </ClientSettings>
        </telerik:RadGrid>
 
        <telerik:RadInputManager runat="server" ID="rdInputMgr" Enabled="true">
            <telerik:NumericTextBoxSetting BehaviorID="TicketEntryIDTBSetting" Type="Number" AllowRounding="false" DecimalDigits="0"></telerik:NumericTextBoxSetting>
            <telerik:NumericTextBoxSetting BehaviorID="NumTicketsTBSetting" Type="Number" AllowRounding="false" DecimalDigits="0"></telerik:NumericTextBoxSetting>
            <telerik:NumericTextBoxSetting BehaviorID="PriceTicketsTBSetting" Type="Currency" AllowRounding="true" DecimalDigits="0"></telerik:NumericTextBoxSetting>
            <telerik:NumericTextBoxSetting BehaviorID="NumberTicketsInSetTBSetting" Type="Number" AllowRounding="true" DecimalDigits="0"></telerik:NumericTextBoxSetting>
        </telerik:RadInputManager>

2 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 03 Mar 2014, 01:22 PM
Hello Dave,

I have examined this thread as well as the other thread that you have opened with a related issue and I have created a sample page with your grid settings which works as expected on my end.

Please test the attached sample page and see what differs in your scenario. Please note that I have tested it with our latest version, but it should work as expected with previous versions as well.

Hope that helps.


Regards,
Konstantin Dikov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
0
Dave
Top achievements
Rank 1
answered on 10 Mar 2014, 01:08 AM
Thank you for the reply Konstantin.  I was away all last week and so haven't had a chance to give this a try again.  I will do so tomorrow and reply to your post.

Thank you,

David
Tags
Grid
Asked by
Dave
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Dave
Top achievements
Rank 1
Share this question
or