Video Screencast Help
Search Video Help Close Back
to help

Web Form Data Grid Hyperlink Column

Created: 08 Jan 2013 | 3 comments
STUNRunner's picture
0 0 Votes
Login to vote

I'm trying to set up a data grid with a column that has clickable links in it, but I'm trying to figure out, how does the hyperlink column actually work? When I use a Text Property Name (which for each row contains a [data value]) and click on the link, it generates a URL http://server/project/[data value]. This would be useful if I could put some text in the URL like dialog.aspx?Variable=[data value]. It seems like this would be placed in the Format field. However when I try to enter a URL or part of a URL in the Format field, workflow throws an error inside of the cell on the grid, not posting it in the log. So what is the Format field used for?

Using workflow solution 7.1.2. Any help would be useful.

Thanks,

Justin

Comments 3 CommentsJump to latest comment

michael.george's picture

I, too, would love to hear more about the format field if anyone has insight!

That said, the way I've solved this when using the grid component was to alter the data in the field I wanted to be a hyperlink. I would run the collection through a for each and use a merge text component to add the correct html '<a href=' type data to the front and '</a>' to the end. In some cases I've even gone a step farther towards lunacy by using the sql query from custom components to add that in instead. Obviously that's only wise if I feel that the data will only be used in such a grid, but it did save more a for loop.

If there's a better way to do it, I'd love to hear it.

If a post solves your issue, please mark it as a solution. It makes these forums better for everyone.

+1
Login to vote
rhamner's picture

Michael.george is correct. That's how the hyperlink column is used. A merge field on the column that's lets you create the link using all fields in the row would be a nice addition.

Format is a property of all columns but I can't think of a case where its useful here. If you're familiar with C# it basically does a .ToString(<format>). Its mostly useful for currency, dates, numbers, guids, etc. For example, on a decimal or integer field "c" would format the field as currency. "0.00" would round a decimal field to two decimal places. If you google "c# format examples" you can find more.

 

 

 

+1
Login to vote
michael.george's picture

This, in particular covers some of that. I'm putting it here to save someone a few clicks.

http://msdn.microsoft.com/en-us/library/0c899ak8.aspx

Thanks for the information, rhamner!

If a post solves your issue, please mark it as a solution. It makes these forums better for everyone.

0
Login to vote