Hello,
I have a RadGrid with BatchEdit mode, as the following
<telerik:RadGrid runat="server" RenderMode="Lightweight" ID="RadGrid1" Width="100%"
DataSourceID="SqlDataSourceMain"
AutoGenerateColumns="false"
AllowSorting="true" ShowFooter="true"
Skin="Bootstrap" OnBatchEditCommand="RadGrid1_BatchEditCommand"
AllowAutomaticDeletes="true" AllowAutomaticInserts="true" AllowAutomaticUpdates="true" ClientSettings-ClientEvents-OnBatchEditCellValueChanged="cellValChanged" ClientSettings-ClientEvents-OnBatchEditClosed="batchEditClosed"
AllowPaging="true" PageSize="10">
<MasterTableView CommandItemDisplay="Top" DataSourceID="SqlDataSourceMain" HorizontalAlign="NotSet" InsertItemDisplay="Bottom" DataKeyNames="Id"
EditMode="Batch" BatchEditingSettings-EditType="Row">
<Columns>
<telerik:GridTemplateColumn HeaderText="Type" UniqueName="accountName" DataField="accountName">
<ItemTemplate>
<%# Eval("accountName") %>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadAutoCompleteBox Width="100%" RenderMode="Lightweight" runat="server" ID="txtAccountName" DataValueField="new_account_number"
DataTextField="accName" DropDownWidth="400px" DataSourceID="SqlDataSourceAccounts" Skin="Bootstrap" InputType="Token" Filter="Contains" OnClientEntryAdding="OnClientEntryAddingHandler" OnClientEntryRemoving="clientEntryRem">
</telerik:RadAutoCompleteBox>
</EditItemTemplate>
<HeaderStyle HorizontalAlign="Center" Width="150px" />
<ItemStyle HorizontalAlign="Center" />
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="accountNumber" UniqueName="accountNumber" DataField="accountNumber">
<ItemTemplate>
<%# Eval("accountNumber") %>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadAutoCompleteBox RenderMode="Lightweight" Width="100%" runat="server" ID="txtAccountNumber" DataValueField="accName"
DataTextField="new_account_number" DropDownWidth="400px" DataSourceID="SqlDataSourceAccounts" Skin="Bootstrap" InputType="Token" Filter="Contains">
</telerik:RadAutoCompleteBox>
</EditItemTemplate>
<HeaderStyle HorizontalAlign="Center" Width="150px" />
<ItemStyle HorizontalAlign="Center" />
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="debitValue" DefaultInsertValue="0" SortExpression="debitValue" UniqueName="debitValue"
DataField="debitValue" FooterAggregateFormatString="{0:#,0.000}" Aggregate="Sum">
<ItemTemplate>
<asp:Label runat="server" ID="lblDebitAmount" Text='<%# Eval("debitValue", "{0:#,0.000}") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<span>
<telerik:RadNumericTextBox Width="95px" RenderMode="Lightweight" Skin="Bootstrap" ClientEvents-OnValueChanged="valChangedDebit" runat="server" ID="txtDebitNumeric" Type="Currency">
</telerik:RadNumericTextBox>
<span style="color: Red">
<asp:RequiredFieldValidator ID="rfvAmount"
ControlToValidate="txtDebitNumeric" ErrorMessage="*Required" runat="server" Display="Dynamic">
</asp:RequiredFieldValidator>
</span>
</span>
</EditItemTemplate>
<HeaderStyle HorizontalAlign="Center" Width="100px" />
<ItemStyle HorizontalAlign="Right" />
<FooterStyle HorizontalAlign="Right" />
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="creditValue" DefaultInsertValue="0" SortExpression="creditValue" UniqueName="creditValue"
DataField="creditValue" FooterAggregateFormatString="{0:#,0.000}" Aggregate="Sum">
<ItemTemplate>
<asp:Label runat="server" ID="lblCreditAmount" Text='<%# Eval("creditValue", "{0:#,0.000}") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<span>
<telerik:RadNumericTextBox Width="95px" RenderMode="Lightweight" Skin="Bootstrap" ClientEvents-OnValueChanged="valChangedCredit" runat="server" ID="txtCreditNumeric" Type="Currency">
</telerik:RadNumericTextBox>
<span style="color: Red">
<asp:RequiredFieldValidator ID="rfvAmount2"
ControlToValidate="txtCreditNumeric" ErrorMessage="*Required" runat="server" Display="Dynamic">
</asp:RequiredFieldValidator>
</span>
</span>
</EditItemTemplate>
<HeaderStyle HorizontalAlign="Center" Width="100px" />
<ItemStyle HorizontalAlign="Right" />
<FooterStyle HorizontalAlign="Right" />
</telerik:GridTemplateColumn>
<telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
ConfirmTitle="Delete" HeaderText="Delete" HeaderStyle-Width="50px"
CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
</telerik:GridButtonColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
I have outside two labels, one is Debit and the other is Credit. How can I refresh the labels (client-side) to contain the total of each column, the total of Debit to be in the debitlabel and the total of the Credit to be in the creditlabel.
Also, in the autocomplete, when i select a token, it is shown "token;" with additional ';' in the item template, this causes to be also inserted in the database, how can i remove the ';' mark?
Many thanks