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
1070
On Click of Image Button in Template field should be redirected to another page
posted

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);

 

}