Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

$4.95 Windows Hosting at Webhost4life.com
  Ads  
Aspose - The .NET & Java component publisher
 


  Sponsors  

Meet Our Sponsors

DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
Verndale
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  EditURL and the Programmatically Build Datagrid
Previous Previous
 
Next Next
New Post 1/28/2006 10:24 AM
User is offline Mike Horton
3174 posts
dnn.gmss.org
4th Ranked






EditURL and the Programmatically Build Datagrid 

For display reasons I've been forced to populate a datatable with the results of a sproc instead of going straight to the datagrid (I'm building a semi-pivot table with results that aren't normally part of a pivot table). Anyways, for the life of me I cannot get the EditURL working for the hyperlink column I've created. Has anyone done a hyperlinkcolumn in the background in DNN before and can tell me where I'm messing up?

Dim linkColumn As New HyperLinkColumn

linkColumn.DataNavigateUrlField = "UserID"

linkColumn.NavigateUrl = EditUrl("UserID", "{0}", "EditDriver") <---- THis is the once that's come the closest to working. The URL is formatted wrong but it's at least return the correct UserID.

'linkColumn.NavigateUrl = String.format((EditUrl("DivisionID", DataBinder.Eval(Container.DataItem, "DivisionID").ToString, "EditDivision")), "") <--- I saw some examples on the web that used it this way but I get an error on DataBinder and Container even after I've added Imports System.Web.UI.DataBinder.

linkColumn.Visible = IsEditable

linkColumn.Text = "Edit"

dgDrivers.Columns.Add(linkColumn)

 
New Post 2/1/2006 2:09 PM
User is offline Scott Shepherd
10 posts
www.willowtreesoftware.com
10th Ranked


Re: EditURL and the Programmatically Build Datagrid 

How is your url coming out?  What does the format look like?

I normally use a Template column to build a HyperlinkColumn.  Would you be able to use a template column instead?

Here is an example....

      <asp:TemplateColumn ItemStyle-Wrap="False" HeaderStyle-Wrap="False">
        <ItemTemplate>
          <asp:HyperLink id="EditImgBtn2" ImageUrl='<%# GetImagePath("edit.gif") %>' NavigateUrl='<%# EditUrl("WishID", DataBinder.Eval(Container.DataItem,"WishID").ToString()) %>' Visible='<%# RenderEditable() %>' runat="server" />
          <asp:ImageButton Runat="server" ID="CloneImgBtn" CommandName="CloneWish" ImageUrl='<%# GetImagePath("clone.gif") %>' ImageAlign="Middle" AlternateText="Clone this wish">
          </asp:ImageButton>
        </ItemTemplate>
      </asp:TemplateColumn>


Scott Shepherd
WillowTree Software
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  EditURL and the Programmatically Build Datagrid
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Bring2mind
Document Centric DNN Module Solutions
www.bring2mind.net
WEBPC™ DotNetNuke® sites for Small Business
WEBPC™ are internet consultants and web hosters catering to the small business market.
www.webpc.biz
Perpetual Motion Interactive Systems Inc.
A solutions company specializing in Microsoft enterprise technologies.
www.perpetualmotion.ca

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP