Note that there are some explanatory texts on larger screens.

plurals
  1. POchange hyperlink asp.net depend result column in gridview
    primarykey
    data
    text
    <p>Good afternoon, I have a gridview (resume of the gridview)</p> <pre><code>&lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="IDEntretien,Expr2,Expr3" DataSourceID="SqlDataSource12" EnableModelValidation="True" BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Vertical"&gt; &lt;AlternatingRowStyle BackColor="Gainsboro" /&gt; &lt;Columns&gt; &lt;asp:BoundField DataField="IDEntretien" HeaderText="IDEntretien" InsertVisible="False" ReadOnly="True" SortExpression="IDEntretien" Visible="False" /&gt; &lt;asp:BoundField DataField="IDPersonne" HeaderText="ID" SortExpression="IDPersonne" /&gt; &lt;asp:BoundField DataField="dtmDate" HeaderText="Date" SortExpression="dtmDate" DataFormatString="{0:d}" /&gt; &lt;asp:BoundField DataField="strNom" HeaderText="Projet" SortExpression="strNom" /&gt; &lt;asp:HyperLinkField DataNavigateUrlFields="IDEntretien" DataNavigateUrlFormatString="ActionASG.aspx?IDEntretien={0}" HeaderText="ASG" Text="ASG" /&gt; &lt;asp:HyperLinkField DataNavigateUrlFields="IDEntretien" DataNavigateUrlFormatString="ActionAEPP.aspx?IDEntretien={0}" HeaderText="AEPP" Text="AEPP" /&gt; &lt;/Columns&gt; &lt;FooterStyle BackColor="#CCCCCC" ForeColor="Black" /&gt; &lt;HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" /&gt; &lt;PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" /&gt; &lt;RowStyle BackColor="#EEEEEE" ForeColor="Black" /&gt; &lt;SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" /&gt; &lt;/asp:GridView&gt; &lt;asp:SqlDataSource ID="SqlDataSource12" runat="server" ConnectionString="&lt;%$ ConnectionStrings:BE Intranet 2009 01 %&gt;" SelectCommand="SELECT Entretien.IDEntretien, Entretien.IDConseiller, Entretien.IDPersonne, Entretien.dtmDate, Entretien.memCommentaires, Entretien.IDProjet, Projet.strNom, Conseiller.strNom AS Expr1, Conseiller.IDConseiller AS Expr2, Projet.IDProjet AS Expr3 FROM Entretien INNER JOIN Conseiller ON Entretien.IDConseiller = Conseiller.IDConseiller INNER JOIN Projet ON Entretien.IDProjet = Projet.IDProjet WHERE (Entretien.IDPersonne = @IDPersonne)"&gt; &lt;SelectParameters&gt; &lt;asp:QueryStringParameter Name="IDPersonne" QueryStringField="IDP" /&gt; &lt;/SelectParameters&gt; &lt;/asp:SqlDataSource&gt; </code></pre> <p>I wish that when the result appears in column PROJECT - ASG (from table Projet.strNom) for example it becomes a HyperLinkField which would refer to a page "ActionASG.aspx? IDEntretien = {0}". If the result changes, for example AEPP it would refer to "ActionAEPP.aspx? IDEntretien = {0}". For now, the column is as follows: It should therefore be changed. ???Datanavigateurlfields = "strNom" changes depending on the content, it refers to a very specific page.</p> <p>I just program in C # and I hope I was clear. In all cases a big thank you.</p> <p>leerickx</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload