Rank: Newbie Groups: Member
Joined: 5/13/2009 Posts: 1
|
in the file explorer control, what is an easy way to have file names show as hyperlinks to the file so they can be opened? i.e. pdf's or .docs
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
I do not believe that is possible with the current version, but it makes perfect sense to have such a feature. We will look into it and see if we can implement that.
Thanks!
|
Rank: Member Groups: Member
Joined: 1/2/2011 Posts: 19
|
I would like to be able to both be able to rename (TextControl) and link to (Custom Control) a file showing in the FileExplorer control. I would like to e able to do this all in one column, if possible, but would settle for doing my editing in the TextBox and my linking from the Custom Control. The problem I'm having is that when I rename the file, the href and text values in the Custom Control are retaining the old name. I was looking for a way to change those values (or do a refresh) in either the client or server renaming handlers, but haven't found a way to access the contents of the CustomControl cell when handling an event for the TextControl cell.
Here is the relevant markup from the FileExplorer:
<eo:CustomColumn HeaderText="View File" Width="-1" MinWidth="150" DataField="FileName" ClientSideGetText="FormatFileLink"></eo:CustomColumn> <eo:TextBoxColumn Name="FileName" HeaderText="File Name" Width="-1" MinWidth="150" ClientSideEndEdit="EndRename"></eo:TextBoxColumn> <eo:EditCommandColumn Name="Rename" Width="48"></eo:EditCommandColumn>
and here is the handler which creates a hyperlink in the CustomControl:
function FormatFileLink(column, item, cellValue) { filename = cellValue; var path = item.abr; index = path.indexOf("|"); path = path.substr(2, index - 2) return "<a href='" + path + "' target='_blank'>" + filename + "</a>"; }
and where I went to attempt to get/manipulate the cell containing the formatted hyperlink:
function EndRename() { var grid = eo_GetObject("FileGrid"); //but what do I do to get to and change the hyperlink values in the CustomControl cell? }
thanks,
Pete
thanks,
Pete
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
You will need to call GridCell.setValue to change the value of the cell. After that your FormatFileLink will be called again with the new value and return value will be placed inside the GridCell.
Thanks!
|