Hi,
I've been using the DataGrid control in my ASP.NET web page. The page is
used to search for records in the database. The control is bound to a
DataSource and gets populated ok. I am also using a Hyperlink column in
the grid to allow the user to redirect to another page, again that works
fine.
My problem is when I want to call the ASP.NET search page from more than
one page because I cannot find a way to programatically set the
"DataNavigateUr lFormatString" property of the HyperLink control. I need
to do this to allow the page to navigate to different pages depending on
which page called this page.
Any help would be appreciated, I've added the code from my control below
but would like to be able to set the DataNavigationU rlFormatString
property to something like
DataNavigateUrl FormatString="< %=MyString%>"
instead of
PublicFunder.as px?FunderID={0}
But this does not seem to work.
Thanks in advance
Rob
<asp:datagrid id="grdSearchRe sults" tabIndex="6" runat="server"
CssClass="Grid" Width="457px"
Visible="False" AutoGenerateCol umns="False">
<AlternatingIte mStyle CssClass="GridA lternatingRow
"></AlternatingItem Style>
<HeaderStyle CssClass="GridH eader"></HeaderStyle>
<Columns>
<asp:HyperLinkC olumn Text="Choose" DataNavigateUrl Field="FunderID "
DataNavigateUrl FormatString="P ublicFunder.asp x?FunderID={0}" ></asp:Hyper
LinkColumn>
<asp:BoundColum n DataField="Fund erId" ReadOnly="True"
HeaderText="Fun der Id"></asp:BoundColumn >
<asp:BoundColum n DataField="Fund erName" ReadOnly="True"
HeaderText="Nam e"></asp:BoundColumn >
</Columns>
</asp:datagrid>
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!