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
95
How to bind data from javascript to Template data Field using CSOM feature
posted

Hi,

I am doing webdatagrid client side CRUD operations using CSOM feature...

I have a requirement like binding data to a template data field column type on the Grid using javascript.   Below is the lines I am using Javascript array to insert data into the grid. But if I have a TemplateDataField column definition, the value I am passing in javascript array is not setting on the column 

var rows = gridOpen.get_rows();

rows.add([

false, i, txtCollDetAsstId, "CEDEL", txtCollDetNominal, 0, txtCollDetPrincipal, "", "", "", "", "", "", "", "", "", "", "Yes"]);

 

Below is the TemplateDataField column definition which I am tying to add data in javascript

<

ig:TemplateDataField Key="AssetId" Header-CssClass="igg_blue_Header" Width

="100"

Header-Text="Asset ID">

<ItemTemplate>

<a id="anchorOpenCollHoldings" onmouseover="CollateralMouseOver(this)" href="BLOCKED SCRIPTCollateralHoldings_PopupClick('<%# Eval("AssetId")%>', '<%# Eval("IdentifierContext") %>')">

<img src="../../images/holdings.png" id="imgOpenCollHoldings_<%# Eval("RowIndex")%>"

border="0" /></a> &nbsp; <a id="anchorOpenCollateral" href="BLOCKED SCRIPTsetDetailsOpen('imgShowCollateralDetails_<%# Eval("RelationshipKey")%>_<%# Eval("RowIndex")%>','<%# Eval("RowIndex")%>','<%# Eval("ExternalReferenceID")%>','<%# Eval("AssetId")%>','<%# Eval("OriginalFaceAmount")%>','<%# Eval("Quantity")%>','<%# Eval("PrincipalAmount")%>','<%# Eval("ExternalReferenceContext")%>','<%# Eval("InterestAmount")%>','<%# Eval("TradeDate")%>','<%# Eval("SettlementDate")%>','<%# Eval("AutoDeliveryIndicator")%>','<%# Eval("SpecialInstructions")%>','<%# Eval("IdentifierContext")%>','<%# Eval("TradeEventKey")%>','<%# Eval("Factor")%>','<%# Eval("EventStatus")%>','<%# Eval("ActionType")%>', '<%# Eval("ExternalReferenceDetails") %>','<%# Eval("RelationshipKey") %>', '<%# Eval("TradeTransactionType") %>', '<%# Eval("TradeClass") %>')">

<img src="../../images/<%# (Eval("RelationshipKey").ToString() + "_" + Eval("RowIndex")) == hfCurrentOpenCollDetials.Value?"GreyArrow.png":"GreyArrowRight.png" %>"

alt="" id="imgShowCollateralDetails_<%# Eval("RelationshipKey")%>_<%# Eval("RowIndex")%>"

border="0" /></a>

<asp:Label ID="lblAsset" runat="server" EnableViewState="false" Text='<%# Eval("AssetId")%>'></asp:Label>

</ItemTemplate>

</ig:TemplateDataField>

 

 

Please help me with a sample code and solution....