Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
The data does not correspond to valid JSON.
posted

Hi all,

after a couple of days of looking for a solution to my problem, I hope you'll be able to help me.

I am getting the "Cannot deserialize" error when attempting to add a new row in my child band.

Here is my aspx:

<

 

 

 

 

<ig:BoundDataField DataFieldName="InstNum" Key="InstNum" Header-Text="Inst Num" />

 

 

<ig:BoundDataField DataFieldName="Counterpart" Key="Counterpart" Header-Text="Counterpart" />

 

 

<ig:TemplateDataField Key="Marging" Header-Text="Marging">

 

 

<ItemTemplate>

 

 

<asp:TextBox ID="MargingValue" runat="server" Text='<%# Bind("SwapDataLast.Marging") %>'

 

 

BorderStyle="None" BackColor="Transparent" />

 

 

</ItemTemplate>

 

 

</ig:TemplateDataField>

 

 

</Columns>

 

 

<Bands>

 

 

<ig:Band DataMember="Accounts_DefaultView" DataKeyFields="IdAccount" Key="Account" AutoGenerateColumns="false" Width="50%">

 

 

<Columns>

 

 

<ig:BoundDataField DataFieldName="AccountValue" Key="AccountValue" Header-Text="Account Value" />

 

 

<ig:BoundDataField DataFieldName="PaymentDate" Key="PaymentDate" Header-Text="Payment Date" />

 

 

</Columns>

 

 

<Behaviors>

 

 

<ig:EditingCore Enabled="true">

 

 

<Behaviors>

 

 

<ig:RowAdding Enabled="true" Alignment="Top" EditModeActions-MouseClick="Single">

 

 

<ColumnSettings>

 

 

<ig:RowAddingColumnSetting ColumnKey="PaymentDate" EditorID="DateTimeEditorEditorControl" />

 

 

</ColumnSettings>

 

 

</ig:RowAdding>

 

 

</Behaviors>

 

 

</ig:EditingCore>

 

 

</Behaviors>

 

 

</ig:Band>

 

 

</Bands>

 

 

<EditorProviders>

 

 

<ig:DateTimeEditorProvider ID="DateTimeEditor">

 

 

<EditorControl ID="DateTimeEditorEditorControl" StyleSetName="ElectricBlue" runat="server" DisplayModeFormat="dd/MM/yyyy" />

 

 

</ig:DateTimeEditorProvider>

 

 

</EditorProviders>

 

 

</ig:WebHierarchicalDataGrid>

Then, my code-behind :

ig:WebHierarchicalDataGrid ID="SwapsAccountsHGrid" runat="server" StyleSetName="ElectricBlue" DataSourceID="WebHierarchicalDs" BorderStyle="None" Width="100%" AutoGenerateBands="false" AutoGenerateColumns="false" Height="200" DataKeyFields="IdSwap" onrowexpanded="SwapsAccountsHGrid_RowExpanded" onrowislandspopulating="SwapsAccountsHGrid_RowIslandsPopulating">
<AjaxIndicator ImageUrl="~/ig_res/ElectricBlue/images/ig_ajaxIndicator.gif" />
<Columns>

protected

 

void Page_Load(object sender, EventArgs e)
{
((
FundsCreationPage) Page).PartRetrievedForFaf += swapsAccountsUc_PartRetrievedForFaf;
}

 

/// <summary>

 

/// The part has been retrieved. The swaps grid is bound to its swaps.

 

/// </summary>

 

private void swapsAccountsUc_PartRetrievedForFaf(object sender, CougarEventArgs e)

{

CurrentPart = e.InnerPart;

SwapsAccountsHGrid.DataBind();

}

 

public void InsertNewAccount(Account account)
{
CurrentPart.Fund.FormulaFund.Swaps[0].Accounts.Add(account);
}

Hope you'll be able to help me find the solution to this issue.

Regards.

Parents
No Data
Reply Children
No Data