Hello,
I have a gridview like,
<telerik:RadGrid ID="RadGrid1" GridLines="None" Width="485" ShowGroupPanel="false"
AllowFilteringByColumn="true" runat="server" CellSpacing="0" AutoGenerateColumns="false"
OnItemDataBound="RadGrid1_ItemDataBound" AllowSorting="true">
<ClientSettings AllowDragToGroup="true" AllowRowsDragDrop="true" AllowAutoScrollOnDragDrop="true"
AllowGroupExpandCollapse="True" ReorderColumnsOnClient="True" AllowColumnsReorder="True"
Animation-AllowColumnRevertAnimation="true" ColumnsReorderMethod="Reorder" Animation-AllowColumnReorderAnimation="true">
<ClientEvents OnRowDblClick="RowDblClick" />
<Selecting AllowRowSelect="true" />
</ClientSettings>
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
</HeaderContextMenu>
<MasterTableView ShowGroupFooter="false" AllowMultiColumnSorting="true" EnableHeaderContextMenu="true"
GroupsDefaultExpanded="false">
<Columns>
<telerik:GridBoundColumn DataField="Name" HeaderText="Name" SortExpression="Name"
Visible="true" UniqueName="Name">
<telerik:GridBoundColumn DataField="userType" HeaderText="Type" SortExpression="userType"
Visible="true" UniqueName="userType">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn DataField="Address" HeaderText="Address" SortExpression="Address"
UniqueName="Address">
<ItemTemplate>
<asp:Label ID="lblVersion" runat="server" Text='<%#Eval("Address") %>'>
</asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn DataField="attachment" AllowFiltering="false" Display="false"
UniqueName="attachment">
<ItemTemplate>
<asp:Label ID="hfattachment" runat="server" Text='<%#Eval("attachment") %>'></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
<GroupByExpressions>
<telerik:GridGroupByExpression>
<GroupByFields>
<telerik:GridGroupByField FieldName="Name" />
<telerik:GridGroupByField FieldName="Type" />
</GroupByFields>
<SelectFields>
<telerik:GridGroupByField FieldName="File_Name" HeaderText="Name " />
</SelectFields>
</telerik:GridGroupByExpression>
</GroupByExpressions>
</MasterTableView>
<GroupingSettings ShowUnGroupButton="false" />
<FilterMenu EnableImageSprites="False">
</FilterMenu>
</telerik:RadGrid>
----------------------
I have dabble click option here, when I dabble click a row it show it's attachment....
dabble click function is...
<script type="text/javascript">
function DownloadFile(filepath) {
alert(filepath);
window.open(filepath, '_blank', 'top=200, left=250,height=400,width=700,status=yes,toolbar=no,menubar=no,location=yes,resizable=yes');
}
function RowDblClick(sender, eventArgs) {
var rowIndex = eventArgs.get_itemIndexHierarchical();
var grid = $find("<%=RadGrid1.ClientID %>");
var masterTableView = grid.get_masterTableView();
var item = masterTableView._dataItems[rowIndex];
var items = eventArgs.get_gridDataItem();
var Element = items._element;
if (Element) {
var keyValues = Element.cells[3].innerText;
alert(keyValues);
DownloadFile(keyValues);
}
}
</script>
------------------------
Everything is good here for other browser but, when I run the application with safari (i am using 5.0.1) then it take also my localhost address ( like- http://localhost:53809/myapp/%20%20%20http://www.mydomain.com/myfile.doc)
any one please tell me why this is happening ?
I have a gridview like,
<telerik:RadGrid ID="RadGrid1" GridLines="None" Width="485" ShowGroupPanel="false"
AllowFilteringByColumn="true" runat="server" CellSpacing="0" AutoGenerateColumns="false"
OnItemDataBound="RadGrid1_ItemDataBound" AllowSorting="true">
<ClientSettings AllowDragToGroup="true" AllowRowsDragDrop="true" AllowAutoScrollOnDragDrop="true"
AllowGroupExpandCollapse="True" ReorderColumnsOnClient="True" AllowColumnsReorder="True"
Animation-AllowColumnRevertAnimation="true" ColumnsReorderMethod="Reorder" Animation-AllowColumnReorderAnimation="true">
<ClientEvents OnRowDblClick="RowDblClick" />
<Selecting AllowRowSelect="true" />
</ClientSettings>
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
</HeaderContextMenu>
<MasterTableView ShowGroupFooter="false" AllowMultiColumnSorting="true" EnableHeaderContextMenu="true"
GroupsDefaultExpanded="false">
<Columns>
<telerik:GridBoundColumn DataField="Name" HeaderText="Name" SortExpression="Name"
Visible="true" UniqueName="Name">
<telerik:GridBoundColumn DataField="userType" HeaderText="Type" SortExpression="userType"
Visible="true" UniqueName="userType">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn DataField="Address" HeaderText="Address" SortExpression="Address"
UniqueName="Address">
<ItemTemplate>
<asp:Label ID="lblVersion" runat="server" Text='<%#Eval("Address") %>'>
</asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn DataField="attachment" AllowFiltering="false" Display="false"
UniqueName="attachment">
<ItemTemplate>
<asp:Label ID="hfattachment" runat="server" Text='<%#Eval("attachment") %>'></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
<GroupByExpressions>
<telerik:GridGroupByExpression>
<GroupByFields>
<telerik:GridGroupByField FieldName="Name" />
<telerik:GridGroupByField FieldName="Type" />
</GroupByFields>
<SelectFields>
<telerik:GridGroupByField FieldName="File_Name" HeaderText="Name " />
</SelectFields>
</telerik:GridGroupByExpression>
</GroupByExpressions>
</MasterTableView>
<GroupingSettings ShowUnGroupButton="false" />
<FilterMenu EnableImageSprites="False">
</FilterMenu>
</telerik:RadGrid>
----------------------
I have dabble click option here, when I dabble click a row it show it's attachment....
dabble click function is...
<script type="text/javascript">
function DownloadFile(filepath) {
alert(filepath);
window.open(filepath, '_blank', 'top=200, left=250,height=400,width=700,status=yes,toolbar=no,menubar=no,location=yes,resizable=yes');
}
function RowDblClick(sender, eventArgs) {
var rowIndex = eventArgs.get_itemIndexHierarchical();
var grid = $find("<%=RadGrid1.ClientID %>");
var masterTableView = grid.get_masterTableView();
var item = masterTableView._dataItems[rowIndex];
var items = eventArgs.get_gridDataItem();
var Element = items._element;
if (Element) {
var keyValues = Element.cells[3].innerText;
alert(keyValues);
DownloadFile(keyValues);
}
}
</script>
------------------------
Everything is good here for other browser but, when I run the application with safari (i am using 5.0.1) then it take also my localhost address ( like- http://localhost:53809/myapp/%20%20%20http://www.mydomain.com/myfile.doc)
any one please tell me why this is happening ?