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> <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....
Hello,
I am checking the progress of this issue.Please let me know if you have more questions!
Hello Sivashankar,
When a PostBack occurs the template field data is not persisted. You could handle the ServerSide RowAdded event and manually add the data for the template using FindControl.You could refer to the following forum threads as similar issues are discussed:http://es.infragistics.com/community/forums/t/47998.aspxhttp://es.infragistics.com/community/forums/p/2995/18532.aspx#17876
The guide for using the ItemTemplate for the templated column can be found at:http://help.infragistics.com/Doc/ASPNET/2013.2?page=WebDataGrid_Using_Item_Template.htmlhttp://help.infragistics.com/Doc/ASPNET/2013.2?page=WebDataGrid_Refrence_a_Cell_When_Creating_an_Item_Template.html