or
radGrid.AllowSorting =
true
;
radGrid.MasterTableView.AllowMultiColumnSorting =
true
;
radGrid.MasterTableView.AllowNaturalSort =
true
;
<
ad:adGrid
ID
=
"grdAttachments"
runat
=
"server"
Width
=
"100%"
AllowPaging
=
"false"
GroupingEnabled
=
"true"
ShowGroupPanel
=
"false"
MasterTableView-GroupsDefaultExpanded
=
"true"
>
<
MasterTableView
HierarchyLoadMode
=
"Client"
>
<
Columns
>
<
tel:GridBoundColumn
UniqueName
=
"Name"
DataField
=
"Name"
HeaderText
=
"Category"
/>
<
tel:GridHyperLinkColumn
UniqueName
=
"Subject"
DataTextField
=
"Subject"
HeaderText
=
"Subject"
DataNavigateUrlFormatString
=
"ts/disp.aspx?id={0}"
DataNavigateUrlFields
=
"ID"
SortExpression
=
"Subject"
>
<
ItemStyle
CssClass
=
"gridhyperlink"
/>
</
tel:GridHyperLinkColumn
>
<
tel:GridHyperLinkColumn
UniqueName
=
"FileName"
DataTextField
=
"FileName"
HeaderText
=
"Attachment"
DataNavigateUrlFormatString
=
"{0}"
DataNavigateUrlFields
=
"AttachmentUrl"
SortExpression
=
"FileName"
Target
=
"_blank"
>
<
ItemStyle
CssClass
=
"gridhyperlink"
/>
</
tel:GridHyperLinkColumn
>
<
tel:GridDateTimeColumn
UniqueName
=
"CreatedDate"
DataField
=
"CreatedDate"
HeaderText
=
"Date"
/>
<
tel:GridBoundColumn
UniqueName
=
"CreatedBy"
DataField
=
"CreatedBy"
HeaderText
=
"Author"
/>
</
Columns
>
<
GroupByExpressions
>
<
tel:GridGroupByExpression
>
<
SelectFields
>
<
tel:GridGroupByField
FieldName
=
"Name"
FieldAlias
=
"Category"
/>
</
SelectFields
>
<
GroupByFields
>
<
tel:GridGroupByField
FieldName
=
"Name"
/>
</
GroupByFields
>
</
tel:GridGroupByExpression
>
</
GroupByExpressions
>
</
MasterTableView
>
<
ClientSettings
AllowExpandCollapse
=
"true"
>
</
ClientSettings
>
</
ad:adGrid
>
----------------------------------------------------------------
Private Sub grdAttachments_NeedsDataSource(ByVal sender As Object, ByVal e As GridNeedDataSourceEventArgs) Handles grdAttachments.NeedDataSource
Dim types As ADAttachmentTypeList = CMClient.GetAttacntTyps()
Dim attachments = types.Aggregate(
New List(Of Object)(),
Function(acc As List(Of Object), type As ADAttachmentType)
Dim typeAttachments As ADAttachmentList = Document.GetAttachments(type.ID)
typeAttachments.Aggregate(
acc,
Function(acc2 As List(Of Object), attachment As ADAttachment)
Dim extension = attachment.Extension.ToLower()
Dim navigationUrl As String = String.Empty
If CurrentTADClient.CCV Then
navigationUrl = String.Format("ts/view.aspx?id={0}&path={1}&aid={2}", attachment.Document.ID, attachment.FileName, attachment.ID)
ElseIf EnableCommentsWithAttachments Then
navigationUrl = String.Format("reviews/dispyReadOnlyOpt.aspx?id={0}&type=ATTACHMENT&path={1}&aid={2}", attachment.Document.ID, attachment.FileName, attachment.ID)
Else
If (extension = "docx" _
OrElse extension = "doc" _
OrElse extension = "dotx" _
OrElse extension = "dot" _
OrElse extension = "rtf" _
) Then
navigationUrl = String.Format(
"rev/dispyreadonly.aspx?id={0}&type=ATTACHMENT&path={1}",
attachment.Document.ID,
attachment.FileName
)
Else
navigationUrl = attachment.VirtualPath
End If
End If
acc2.Add(New With {
Key .Name = type.Name,
.ID = attachment.ID,
.Subject = attachment.Subject,
.FileName = attachment.FileName,
.CreatedDate = String.Format("{0} {1}", attachment.CreatedDate.ToString(CurrentCulture.DateTimeFormat.ShortDatePattern, CurrentCulture), attachment.CreatedDate.ToString(CurrentCulture.DateTimeFormat.ShortTimePattern, CurrentCulture)),
.CreatedBy = attachment.CreatedBy,
.AttachmentUrl = navigationUrl
})
Return acc2
End Function
)
Return acc
End Function
)
DirectCast(grdAttachments.Columns(1), GridHyperLinkColumn).DataNavigateUrlFormatString = String.Format("{0}hj/ts/displ.aspx?id={1}0{2}", Captions.VirtualRoot, Chr(123), Chr(125))
grdAttachments.DataSource = attachments.ToArray()
End Sub
<
asp:Panel
ID
=
"pnlSelectAllItemsClearAllItems"
Visible
=
"true"
runat
=
"server"
ScrollBars
=
"None"
>
<
table
border
=
"0"
>
<
tr
>
<
td
width
=
"50%"
style
=
"height:2%;"
>
<
asp:RadioButtonList
ID
=
"rbSelectAllItemsClearAllItems"
runat
=
"server"
AutoPostBack
=
"true"
RepeatDirection
=
"Horizontal"
Enabled
=
"true"
OnSelectedIndexChanged
=
"rbSelectClearAllItems_OnSelectedIndexChanged"
>
<
asp:ListItem
Value
=
"SelectAllItems"
>Select All Items</
asp:ListItem
>
<
asp:ListItem
Value
=
"ClearAll"
>Clear All</
asp:ListItem
>
</
asp:RadioButtonList
>
</
td
>
<
td
style
=
"text-align: center; height:2%;"
width
=
"50%"
>
<
asp:Button
runat
=
"server"
Text
=
"Archive Selected Items"
ID
=
"btnArchiveSelected"
onclick
=
"btnArchiveSelected_Click"
/>
</
td
>
</
tr
>
</
table
>
</
asp:Panel
>
<
telerik:RadGrid
ID
=
"dgv_usuarios"
runat
=
"server"
>
<
ClientSettings
>
<
Selecting
AllowRowSelect
=
"true"
/>
<
Animation
AllowColumnReorderAnimation
=
"true"
/>
<
ClientEvents
OnRowClick
=
"rowUsuario"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
function
rowUsuario(sender, eventArgs) {
var
grid = sender;
var
MasterTable = grid.get_masterTableView();
var
row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()];
var
cell = MasterTable.getCellByColumnUniqueName(row,
"Nombre"
);
alert(
"Su dato es: "
+ cell.innerHtml);
}
function
RadButton1_MouseOver(sender, args) {
var
quotevar = document.getElementById(
"<%=RadComboBox1.ClientID%>"
);
var
custvar = document.getElementById(
"<%=rcbCustomer.ClientID%>"
);
var
empvar = document.getElementById(
"<%=RadComboBox2.ClientID%>"
);
var
delvar = document.getElementById(
"<%=RadComboBox3.ClientID%>"
);
var
datevar = document.getElementById(
"<%=RadDatePicker1.ClientID%>"
);
if
(quotevar.value ==
""
|| custvar.value ==
""
|| empvar.value ==
""
|| delvar.value ==
""
|| datevar.value ==
""
) {
if
(quotevar.value ==
null
|| quotevar.value ==
""
) {
quotevar.style.borderColor =
"red"
;
}
if
(custvar.value ==
null
|| custvar.value ==
""
) {
custvar.style.borderColor =
"red"
;
}
if
(empvar.value ==
null
|| empvar.value ==
""
) {
empvar.style.borderColor =
"red"
;
}
if
(delvar.value ==
null
|| delvar.value ==
""
) {
delvar.style.borderColor =
"red"
;
}
if
(datevar.value ==
null
|| datevar.value ==
""
) {
datevar.style.borderColor =
"green"
;
}
alert(
"Please make sure to fill in all fields at the top of the invoice before continuing."
);
}
}