473,396 Members | 2,070 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Please help with DataNavigateUrlFormatString property issue with the DataGrid

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
"DataNavigateUrlFormatString" 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 DataNavigationUrlFormatString
property to something like

DataNavigateUrlFormatString="<%=MyString%>"

instead of
PublicFunder.aspx?FunderID={0}

But this does not seem to work.

Thanks in advance
Rob

<asp:datagrid id="grdSearchResults" tabIndex="6" runat="server"
CssClass="Grid" Width="457px"
Visible="False" AutoGenerateColumns="False">
<AlternatingItemStyle CssClass="GridAlternatingRow
"></AlternatingItemStyle>
<HeaderStyle CssClass="GridHeader"></HeaderStyle>
<Columns>
<asp:HyperLinkColumn Text="Choose" DataNavigateUrlField="FunderID"
DataNavigateUrlFormatString="PublicFunder.aspx?Fun derID={0}"></asp:Hyper
LinkColumn>
<asp:BoundColumn DataField="FunderId" ReadOnly="True"
HeaderText="Funder Id"></asp:BoundColumn>
<asp:BoundColumn DataField="FunderName" ReadOnly="True"
HeaderText="Name"></asp:BoundColumn>
</Columns>
</asp:datagrid>

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
0 1662

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jongmin | last post by:
Hi! I am making HyperLinkColumn in datagrid. It is simple to make the hyerlinkcolumn with one datafield. <asp:HyperLinkColumn Text="NAME" DataNavigateUrlField="NAME"...
1
by: Tim Smith | last post by:
In my .cs code I populate set the DataSource appropriately and I can get my DataGrid to appear, though sorting throws an error 'dgDataGrid1__ctl1__ctl0' of type 'DataGridLinkButton' must be placed...
0
by: | last post by:
How in ASP.Net does one alter Current DataGrid Coding Below to create a URL that allows for multiple parameters? I need to Post Multiple URL Paramaters via a Single URL for example :...
0
by: CodeMotion | last post by:
Hi all, I am familiar with setting the DataNavigateUrlFormatString property of a hyperlink column to a bound column. However, I also want to append the querystring of the page that the datagrid...
0
by: RobT | last post by:
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...
2
by: AMDRIT | last post by:
Hello everyone, I have created a custom component and one of its properties is a class object with it's own properties. During runtime, I can assign values to the class object properties just...
2
by: momo | last post by:
Hello Guys, I have a bit of a problem, I created a Dll called SecureQueryStringDll.dll and I had the dll put bin folder of my application first and it did not work so I then put it in the bin...
0
by: CK | last post by:
Hi All, I have a gridview that contains a column that has a repeater inside it. My intent is to put every comment for an album into the repeater in the comments column. I am using a SQLDataSource...
3
by: settyv | last post by:
Hi, I need to generate PDF stream when i click on Linkbutton in datagrid ..At present i hardcoded the DMS Id and now it is working.But i need to pass DMS ID when click linkbutton.How can i do...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.