473,480 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 1664

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

Similar topics

0
4824
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
1342
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
1426
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
1211
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
257
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
2417
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
1902
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
989
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
1533
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
6908
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7048
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
7088
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6741
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
5342
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,...
1
4783
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4485
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
183
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.