Current filter:
                                You should refresh the page.
                                Support Center

                                It is an often situation when a developer should include sever field values in a hyperlink shown in a GridView column cells. The best solution to this problem is to use templates. The attached example shows how this can be done and suggests two similar approaches:

                                1) in the "simple" case the href parameter of the <a> element is defined by the KeyValue of the processed row
                                2) in the "complex" case, the href parameter of the <a> element is defined in the server side GetRowValue method.

                                If you want to use GridViewDataHyperLinkColumn and preserve its functionality, use unbound columns instead of the DataItem template. Please refer to the ASPxGridView - How to create GridViewDataHyperLinkColumn whose URL depends on several column values example for more information. 

                                • smoore4 12.17.2013

                                  This also works. Use a Command Column (eg Custom Button) and code it like this:

                                          protected void ASPxGridView1_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e)

                                              if (e.ButtonID == "cmdOpenSurveyRpt")

                                                  object[] m_rptvars = (object[])ASPxGridView1.GetRowValues(e.VisibleIndex, "survey_id", "survey_user_id");

                                                  ASPxWebControl.RedirectOnCallback("~/Reports/ReportViewer.aspx" + "?sid=" + m_rptvars[0] + "&uid=" + m_rptvars[1]);



                                Show Implementation Details
                                Select file
                                • Default.aspx
                                • Default.aspx.cs
                                • Default2.aspx
                                • Default2.aspx.cs
                                Select language
                                • C#
                                • VB.NET
                                Select version
                                • 13.1.4 - 17.1.7
                                • 8.1.8 - 12.2.18

                                If you need additional product information, write to us at or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2017 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners