Guys - here's how you do it, In the Property Builder for your DataGrid, in Columns, select your Hyperlink column, and click the "Convert to Template Column" link at the bottom of the dialog.
Now come out of the Property Builder and right-click the DataGrid and Choose "Edit Template" and choose your column. Select the Hyperlink Control in the ItemTemplate, go to Properties and select DataBindings and click the "..." Choose NavigateUrl on the left hand list and then choose "Custom Binding expression" -- this is where you put something like: "TitleInfo.aspx?titleId=" + DataBinder.Eval(Container.DataItem, "title_id") +"&pubId="+ DataBinder.Eval(Container.DataItem, "pub_id") Hope that helps! Cheers, Duncan On Tue, 23 Apr 2002 06:55:06 -0400, Steve Holak <[EMAIL PROTECTED]> wrote: >Same here. I rolled my own URL string in the database stored procedure, >after a frustrating day of trying to use the values of multiple fields to >build a query string with multiple parameters. Seems like it should be a >pretty basic issue, as multiple-parameter query strings are as common as >air. > >Excuse the analogy. > > >Steve Holak >Senior Software Architect > >Brokerage Concepts IS Dept. >610-491-4879 > >email: [EMAIL PROTECTED] > > > > Linda Wienholt > <linda.wienholt@TOUCHMA To: [EMAIL PROTECTED] > RK.COM.AU> cc: > Sent by: dotnet Subject: Re: [DOTNET] How do you bind a DataGrid HyperLinkColumn to > discussion more than one field ? > <[EMAIL PROTECTED] > .COM> > > > 04/22/2002 06:43 PM > Please respond to > dotnet discussion > > > > > > >Hi Marshall, > >I have previously had the same problem. I searched the documentation >and could not find a way of linking multiple fields using the >DataNavigateUrlFormatString property. In the end I actually created the >composite field in the database and then used the >DataNavigateUrlFormatString property. Alternatively you could create a >composite field in the dataset before you bind to the datagrid and then >just link that field. > >-----Original Message----- >From: Marshall Harrison [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, 23 April 2002 4:30 AM >To: [EMAIL PROTECTED] >Subject: [DOTNET] How do you bind a DataGrid HyperLinkColumn to more >than one field ? > >I have a HyperLinkColumn defined as : > ><Columns> > <asp:HyperLinkColumn HeaderText="Term" >DataNavigateUrlField="LACMPY" >DataNavigateUrlFormatString="SqlLoadsDetails.aspx?Company={0}" >DataTextField="LATRMC" /> ></Columns> > >In reality the hyperlink needs two fields to make it work (i.e >SqlLoadsDetails.aspx?Company=ABC&LoadNo=1 ) with each parameter coming >from >a different database field. I can't seem to find a way to get both >fields >into the DataNavigateUrlFormatString. Can someone tell me how to do >this? > >Thanks. > >Marshall Harrison > >You can read messages from the DOTNET archive, unsubscribe from DOTNET, >or >subscribe to other DevelopMentor lists at http://discuss.develop.com. > >You can read messages from the DOTNET archive, unsubscribe from DOTNET, or >subscribe to other DevelopMentor lists at http://discuss.develop.com. > >You can read messages from the DOTNET archive, unsubscribe from DOTNET, or >subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.