Design Page
<ig:WebDataGrid ID="WebDataGrid" runat="server" Width="2100" Height="450px" StyleSetName="RubberBlack" AutoGenerateColumns="false" HeaderCaptionCssClass="igg_RubberBlackHeader" EnableAjax="false" AltItemCssClass="igg_Alt"> <Columns> <ig:TemplateDataField Key="TemplateColumn1"> <ItemTemplate> <asp:Image ID="Image1" runat="server" onclick="OpenNewwindow(<%#DataBinder.Eval(CType(Container, Infragistics.Web.UI.TemplateContainer).DataItem, "TQNo")%>)" ImageUrl="~/images/NoteEnbl.jpg" /> </ItemTemplate> <Header Text="Edit" /> </ig:TemplateDataField> <ig:BoundDataField DataFieldName="TQNo" Key="TQNo" CssClass="noWrap" Width="100"> </ig:BoundDataField> <ig:BoundDataField DataFieldName="ReferenceNo" Key="ReferenceNo" CssClass="noWrap" Width="120"> <Header Text="Reference No" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="Title" Key="Title" CssClass="Right" Width="65"> <Header Text="HC No" CssClass="HeaderRight" /> </ig:BoundDataField> </Columns> <ErrorTemplate> Unable to connect. </ErrorTemplate> <EmptyRowsTemplate> ---No data available </EmptyRowsTemplate> </ig:WebDataGrid>
Code File
Query =
" SELECT RefCode,TQNo,ReferenceNo,RevisionNo,Title FROM TrnTQ_ClientRef"dsNew = objTQ.mp_GetDataSet(Query, 0, 0)
WebDataGrid.DataSource = dsNew.Tables(0)
WebDataGrid.DataBind()
Java Script
function
OpenNewwindow(sender) {
str_url=
"frmTQEntry.aspx?Id=" + sender + "";
opciones =
"left=50,top=50,toolbar=no,status=no,width=830,height=600,menubar=no,resizable=yes,center=on,titlebar=0,scrollbars=yes";
window.open(str_url,
'ExportWord',opciones);
}
Nikifor Tsvetkov"] Hello Dayana,Please let me check if i understand you correctly. Did you manage to resolve the issue?
Hello Dayana,Please let me check if i understand you correctly. Did you manage to resolve the issue?
Below code works fine..
ig:TemplateDataField Key="Excel" Width="40"><ItemTemplate>
<asp:HyperLink ID="Link1" runat="server" ImageUrl="~/CSS/Rubber_Black_images/icons/xl.png" NavigateUrl='<% #Eval("FRINo","ReportView.aspx?Id={0}") %>'>
</asp:HyperLink>
</ItemTemplate><Header Text="Excel" />
<ig:TemplateDataField Key="Excel" Width="40"><ItemTemplate>
In Template field, redirect the page by clicking image button.
Solution i found this
</ig:TemplateDataField>
Hello DayanaArul
I made a running sample based on your code. It seems that the attaching of the event was not proper. There are also a thread in stackoverflow regarding how to properly attach events like the one in your scenario and how eval to be working - http://stackoverflow.com/questions/6844230/how-to-use-databinder-eval-of-repeater-within-asp-net-buttons-onclientclick-jav