<telerik:RadUpload InputSize="40" Width="300" ID="RadUpload1" runat="server"
ControlObjectsVisibility="None" OnClientFileSelected="checkInputFilePath" />
<telerik:RadProgressArea ID="progressArea1" runat="server" Skin="" />
The function looks like this:
function checkInputFilePath(radUpload, eventArgs)
{
alert(
'here we are');
}
The alert never happens, though an alert downstream of this, in another function, does.
Anything additionally have to be set?
Thanks in advance
david
<
telerik:GridButtonColumn
ButtonType
=
"ImageButton"
CommandName
=
"ImageDownload"
Text
=
"Download"
UniqueName
=
"ImageDownload"
ImageUrl
=
"~/images/dnn.gif"
>
<
HeaderStyle
Width
=
"20px"
/>
<
ItemStyle
HorizontalAlign
=
"Center"
/>
</
telerik:GridButtonColumn
>
protected void RadGridImages_ItemCommand(object source, GridCommandEventArgs e)
{
if (e.CommandName.Equals("ImageDownload"))
{
//commandargument has the physical path on the server of the selected file
DownloadImage(e.CommandArgument.ToString());
}
}
private void DownloadImage(string imagePath)
{
FileInfo file = new FileInfo(imagePath);
if (file.Exists)
{
Response.ClearContent();
Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name);
Response.AddHeader("Content-Length", file.Length.ToString());
Response.ContentType = Studio1BusinessLayer.Helpers.ReturnExtension(file.Extension.ToLower());
Response.TransmitFile(file.FullName);
Response.End();
}
}
<telerik:RadGrid ID="rdGrd" runat="server" AutoGenerateColumns="False" EnableEmbeddedSkins ="false" Skin="Outlook" HeaderStyle-HorizontalAlign="Left" CssClass="RadGrid_Outlook"
GridLines="Both" Height="350px" AllowSorting = "true">
<Columns>
<telerik:GridBoundColumn DataField="ID" Display="False" UniqueName="ID"> <ItemStyle HorizontalAlign="Left" /> </telerik:GridBoundColumn><telerik:GridBoundColumn DataField="Name" HeaderText="Name" UniqueName="Name">
<ItemStyle HorizontalAlign="Left" />
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<ClientSettings EnableRowHoverStyle="false">
Private Sub AddDynamicColumns()
For c As Integer = 0 To DtWrAra.Count - 1cbDownload.HeaderText = DtWrAra(c).Name
cbDownload.UniqueName = DtWrAra(c).Id
cbDownload.ItemTemplate = New RadGridCheckBoxTemplate(DtWrAra(c).Id)
Me.rdGrd.MasterTableView.Columns.Add(cbDownload)
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
rdGrd.DataSource = SampleDataSourceObject
AddDynamicColumns()
rdGrd.DataBind()
End Sub
========
These check box template columns are later checked on eachrow basis.
When i am performing sorting operation grid getting distorted .I am not Certain about the cause. Attached a screen shot..
If any one can help me on this ...
Thanks,
Saurabh
<telerik:GridHyperLinkColumn HeaderText="Preplan" DataTextField="Url" DataNavigateUrlFields="Url"
Target="_blank" DataNavigateUrlFormatString="{0}" HeaderStyle-HorizontalAlign="Center"
ItemStyle-HorizontalAlign="Left" Visible="false" AllowFiltering="false" />
Above is the markup that I am using, however the output is this:
<a target="_blank" href="/mytestsite/Home/tabid/41/language/en-US/http://google.com">http://google.com</a>
I am using DotNetNuke 5.6 with version 2010.02.0929.35 of Telerik.Web.UI.dll
Given that the text is correct and looking @ the object in the debugger, the given data string is http://google.com, I can only assume that the control is adding the relative path...
what I find interesting is that if I change the DataNavigationUrlFormattingString in the markup to be DataNavigateUrlFormatString="http://google.com" I get the expected result:
<a target="_blank" href="http://google.com">http://google.com</a>
Any thoughts on what I'm doing wrong?
An update:
It seems that if I use the property: DataNavigateUrlFormatString="http://{0}"
I get a different result, then I get either : <a href="http:http://google.com" target="_blank">http://google.com</a> or <a href="http://google.com" target="_blank">http://google.com</a>
depending on the contents of the field, if it is http://google.com then you get the former, if it's google.com then it's the latter.