or
<
ExportSettings
FileName
=
"documentos_Recoger"
HideStructureColumns
=
"true"
ExportOnlyData
=
"true"
<br> IgnorePaging="true" OpenInNewWindow="true"><
br
> <
br
> </
ExportSettings
>
protected
void
ExcelButton_Click(Object sender, System.EventArgs e)
{
foreach
(GridDataItem item
in
RadGrid1.Items)
{
if
(item.Selected ==
false
)
{
item.Visible =
false
;
}
}
RadGrid1.MasterTableView.HierarchyDefaultExpanded =
true
;
RadGrid1.MasterTableView.DetailTables[0].HierarchyDefaultExpanded =
true
;
RadGrid1.ExportSettings.ExportOnlyData =
true
;
RadGrid1.ExportSettings.OpenInNewWindow =
true
;
RadGrid1.MasterTableView.ExportToExcel();
}
using System.Web.UI.WebControls;
using Telerik.Web.UI;
namespace LWTelerikGrid.Extenders.ColumnExtenders
{
public class LWBooleanBoundColumn : GridBoundColumn
{
public override TableItemStyle HeaderStyle
{
get
{
TableItemStyle tableitemstyle = base.HeaderStyle;
tableitemstyle.HorizontalAlign = HorizontalAlign.Center;
return tableitemstyle;
}
}
public override TableItemStyle ItemStyle
{
get
{
TableItemStyle tableitemstyle = base.ItemStyle;
tableitemstyle.HorizontalAlign = HorizontalAlign.Center;
return tableitemstyle;
}
}
public override bool AutoPostBackOnFilter
{
get
{
return true;
}
}
}
}
<
LWColumnExtenders:LWBooleanBoundColumn
DataField
=
"LicenseRequired"
DataType
=
"System.Boolean"
FilterControlAltText
=
"Filter LicenseRequired column"
HeaderText
=
"LicenseRequired"
SortExpression
=
"LicenseRequired"
UniqueName
=
"LicenseRequired"
>
</
LWColumnExtenders:LWBooleanBoundColumn
>
<script type=
"text/javascript"
>
(
function
() {
var
demo = window.demo = {},
autoCompleteBox,
masterTableView;
demo.GridCreated =
function
(sender, args) {
masterTableView = sender.get_masterTableView();
}
demo.AutoCompleteLoaded =
function
(sender, args) {
autoCompleteBox = sender;
}
demo.EntryAdded =
function
(sender, args) {
filterGrid();
}
demo.EntryRemoved =
function
(sender, args) {
filterGrid();
}
function
filterGrid() {
if
(!masterTableView || !autoCompleteBox)
return
;
var
entries = autoCompleteBox.get_entries();
if
(entries.get_count() === 0) {
masterTableView.expandAllGroups();
return
;
}
masterTableView.collapseAllGroups();
$telerik.$(masterTableView.get_element()).find(
"td"
).filter(
function
() {
for
(
var
i = 0; i < entries.get_count(); i++)
if
($(
this
).text().indexOf(entries.getEntry(i).get_text()) !== -1)
return
true
;
return
false
;
}).closest(
".rgRow, .rgAltRow"
).each(
function
() {
masterTableView.expandGroup(
this
);
});
}
window.pageLoad =
function
() {
$(masterTableView.get_element())
.find(
".rgGroupHeader td"
)
.not(
".rgGroupCol"
)
.css(
"cursor"
,
"pointer"
)
.click(
function
() {
masterTableView.toggleGroup($(
this
).closest(
"tr"
)[0]);
});
}
})();
</script>
<
Telerik:RadGrid
ID
=
"RadGrid1"
DataSourceID
=
"SqlDataSource1"
runat
=
"server"
AllowSorting
=
"True"
AllowPaging
=
"False"
AutoGenerateColumns
=
"False"
GridLines
=
"None"
AllowFilteringByColumn
=
"true"
>
<
GroupingSettings
CaseSensitive
=
"false"
></
GroupingSettings
>
<
MasterTableView
Width
=
"100%"
GroupLoadMode
=
"Client"
TableLayout
=
"Fixed"
GroupsDefaultExpanded
=
"false"
>
<
GroupByExpressions
>
<
Telerik:GridGroupByExpression
>
<
SelectFields
>
<
Telerik:GridGroupByField
FieldAlias
=
"REGION"
FieldName
=
"REGION"
HeaderText
=
"REGION"
>
</
Telerik:GridGroupByField
>
</
SelectFields
>
<
GroupByFields
>
<
Telerik:GridGroupByField
FieldName
=
"REGION"
></
Telerik:GridGroupByField
>
</
GroupByFields
>
</
Telerik:GridGroupByExpression
>
<
Telerik:GridGroupByExpression
>
<
SelectFields
>
<
Telerik:GridGroupByField
FieldAlias
=
"LOCATIONNAME"
FieldName
=
"LOCATIONNAME"
HeaderText
=
"LOCATION NAME"
>
</
Telerik:GridGroupByField
>
</
SelectFields
>
<
GroupByFields
>
<
Telerik:GridGroupByField
FieldAlias
=
"LOCATIONNAME"
FieldName
=
"LOCATIONNAME"
></
Telerik:GridGroupByField
>
</
GroupByFields
>
</
Telerik:GridGroupByExpression
>
</
GroupByExpressions
>
<
Columns
>
<
Telerik:GridBoundColumn
DataField
=
"LOCATIONNAME"
FilterControlAltText
=
"Filter LOCATIONNAME column"
UniqueName
=
"LOCATIONNAME"
>
<
ItemStyle
HorizontalAlign
=
"Left"
/>
</
Telerik:GridBoundColumn
>
<
Telerik:GridHyperLinkColumn
DataNavigateUrlFields
=
"IDSERVER"
DataNavigateUrlFormatString
=
"PathFolders.aspx?idServer={0}"
DataTextField
=
"SERVERNAME"
FilterControlAltText
=
"Filter SERVERNAME column"
UniqueName
=
"column"
>
<
ItemStyle
HorizontalAlign
=
"Left"
/>
</
Telerik:GridHyperLinkColumn
>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
ReorderColumnsOnClient
=
"True"
AllowDragToGroup
=
"True"
AllowColumnsReorder
=
"True"
>
<
ClientEvents
OnGridCreated
=
"demo.GridCreated"
/>
</
ClientSettings
>
<
GroupingSettings
ShowUnGroupButton
=
"true"
></
GroupingSettings
>
</
Telerik:RadGrid
>
<
telerik:GridClientDeleteColumn
Reorderable
=
"false"
ButtonType
=
"ImageButton"
CommandName
=
"Delete"
UniqueName
=
"DeleteColumn"
ConfirmDialogType
=
"RadWindow"
ConfirmTitle
=
"Question"
ConfirmTextFields
=
"Shortcut,Text"
ConfirmTextFormatString
=
"Country {0} - {1} will be removed"
>
</
telerik:GridClientDeleteColumn
>
Hi All,
I am using the RadAsyncUpload in my app. So what I need as follows whenever we select any attachment to upload how to add the duplicate file checking from the client side, and that to while picking the attachments itself.
Anybody knows how to do this?.
Thanks,