or
I got this RadCalendar in my aspx page with three calendars stacked up vertically. I am binding some scheduling data to these three mini calendars and would like to limit the data to only the date’s show on the mini calendar. I wonder if there is a property of the RadCalendar that gives me the show date min and show date max. When user uses the fast navigation button to forward and backward the months, these properties should change accordingly. Do these properties exist? Thanks.
<telerik:RadSiteMap ID="RadSiteMap1" runat="server" DataNavigateUrlField="NavigateUrl" DataTextField="Text" Skin="Forest" Width="100%" DefaultLevelSettings-Layout="Flow"> <Nodes> <telerik:RadSiteMapNode > <NodeTemplate>NONA</NodeTemplate> <SeparatorTemplate> <telerik:RadMenu ID="RadMenu4" runat="server" EnableEmbeddedBaseStylesheet="False" Flow="Horizontal" CssClass="SeperatorMenu" ClickToOpen="true"> <CollapseAnimation Type="InCubic" /> <Items> <telerik:RadMenuItem runat="server" ImageUrl="~/Images/Triangle_Left.png" CssClass="SeperatorMenuImg" HoveredImageUrl="~/Images/Triangle_LeftH.png"> <GroupSettings OffsetX="-5" OffsetY="-10" ExpandDirection="Left" /> <Items> <telerik:RadMenuItem runat="server" Text="ChildRadMenuItem1"> <ItemTemplate> <div> content Header NONA</div> <div> Body Information here...</div> </ItemTemplate> </telerik:RadMenuItem> </Items> <GroupSettings ExpandDirection="Right" Flow="Horizontal" RepeatDirection="Horizontal" /> </telerik:RadMenuItem> </Items> </telerik:RadMenu> </SeparatorTemplate> </telerik:RadSiteMapNode></Nodes>
</telerik:RadSiteMap>
Public
Class
MyCustomBoundColumn
Inherits
GridBoundColumn
Public
dsDataSource
As
DataTable
Public
Function
GetDataTable(
ByVal
strColumnName
As
String
)
As
DataTable
Dim
disctinctValues
As
DataTable =
Nothing
If
TypeOf
(dsDataSource)
Is
DataTable
Then
Dim
View
As
New
DataView(dsDataSource)
disctinctValues = View.ToTable(
True
, strColumnName)
End
If
Return
disctinctValues
End
Function
Protected
Overrides
Sub
SetupFilterControls(
ByVal
cell
As
TableCell)
Dim
rcBox
As
New
RadComboBox()
rcBox.ID =
"cboFilter"
&
Me
.DataField
rcBox.DataTextField =
Me
.DataField
rcBox.DataValueField =
Me
.DataField
rcBox.AutoPostBack =
False
AddHandler
rcBox.SelectedIndexChanged,
AddressOf
rcBox_SelectedIndexChanged
Dim
table
As
DataTable = GetDataTable(
Me
.DataField)
Dim
row
As
DataRow = table.NewRow()
row(
Me
.DataField) =
""
table.Rows.InsertAt(row, 0)
rcBox.DataSource = table
cell.Controls.Add(rcBox)
End
Sub
Protected
Overrides
Sub
SetCurrentFilterValueToControl(
ByVal
cell
As
TableCell)
If
Not
(
Me
.CurrentFilterValue =
""
)
Then
DirectCast
(cell.Controls(0), RadComboBox).Items.FindItemByText(
Me
.CurrentFilterValue).Selected =
True
End
If
End
Sub
Protected
Overrides
Function
GetCurrentFilterValueFromControl(
ByVal
cell
As
TableCell)
As
String
Dim
currentValue
As
String
=
DirectCast
(cell.Controls(0), RadComboBox).SelectedItem.Value
Me
.CurrentFilterFunction =
If
((currentValue <>
""
), GridKnownFunction.EqualTo, GridKnownFunction.NoFilter)
Return
currentValue
End
Function
Private
Sub
rcBox_SelectedIndexChanged(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs)
DirectCast
(
DirectCast
(sender, RadComboBox).Parent.Parent, GridFilteringItem).FireCommandEvent(
"Filter"
,
New
Pair())
End
Sub
End
Class
Imports
Telerik.Web.UI
Imports
System.Data
Imports
System.Web.UI
Imports
System.Web.UI.WebControls
Imports
System.Data.SqlClient
Imports
System.Configuration
Public
Class
_Default
Inherits
System.Web.UI.Page
Public
myDataTable
As
DataTable
Private
Sub
Page_Load(sender
As
Object
, e
As
System.EventArgs)
Handles
Me
.Load
GetDataTable()
Dim
myColumn
As
MyCustomBoundColumn
myColumn =
New
MyCustomBoundColumn
myColumn.DataField =
"name"
myColumn.HeaderText =
"name"
myColumn.dsDataSource = myDataTable
gvDataTable.MasterTableView.Columns.Add(myColumn)
myColumn =
New
MyCustomBoundColumn
myColumn.DataField =
"mandant_name"
myColumn.HeaderText =
"mandant_name"
myColumn.dsDataSource = myDataTable
gvDataTable.MasterTableView.Columns.Add(myColumn)
End
Sub
Private
Sub
GetDataTable()
Dim
ConnString
As
String
= ConfigurationManager.ConnectionStrings(
"MyConnectionString"
).ConnectionString
Dim
MySqlConnection
As
New
SqlConnection(ConnString)
Dim
MySqlDataAdapter
As
New
SqlDataAdapter()
MySqlDataAdapter.SelectCommand =
New
SqlCommand(
"SELECT * FROM getUser"
, MySqlConnection)
MySqlConnection.Open()
Try
myDataTable =
New
DataTable
MySqlDataAdapter.Fill(myDataTable)
Finally
MySqlConnection.Close()
End
Try
End
Sub
Private
Sub
gvDataTable_NeedDataSource(sender
As
Object
, e
As
Telerik.Web.UI.GridNeedDataSourceEventArgs)
Handles
gvDataTable.NeedDataSource
gvDataTable.DataSource = myDataTable
End
Sub
End
Class
<
form
id
=
"form1"
runat
=
"server"
style
=
"height:100%; width:100%;margin: 0px;padding: 0px;"
>
<
asp:ToolkitScriptManager
ID
=
"ToolkitScriptManager1"
ScriptMode
=
"Release"
EnableScriptLocalization
=
"true"
EnableScriptGlobalization
=
"true"
CombineScripts
=
"false"
runat
=
"server"
EnablePartialRendering
=
"true"
>
</
asp:ToolkitScriptManager
>
<
asp:UpdatePanel
runat
=
"server"
ID
=
"upaDT"
UpdateMode
=
"Conditional"
ChildrenAsTriggers
=
"true"
>
<
ContentTemplate
>
<
telerik:RadButton
ID
=
"RadButton1"
runat
=
"server"
Text
=
"set filter"
AutoPostBack
=
"true"
>
</
telerik:RadButton
>
<
telerik:RadGrid
ID
=
"gvDataTable"
runat
=
"server"
AutoGenerateColumns
=
"false"
Height
=
"600px"
AllowSorting
=
"true"
AllowFilteringByColumn
=
"true"
EnableLinqExpressions
=
"false"
>
<
MasterTableView
DataKeyNames
=
"guid"
ClientDataKeyNames
=
"guid"
AllowFilteringByColumn
=
"true"
EnableColumnsViewState
=
"false"
>
</
MasterTableView
>
<
ClientSettings
EnableRowHoverStyle
=
"true"
>
<
ClientEvents
/>
<
Scrolling
AllowScroll
=
"true"
UseStaticHeaders
=
"true"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
</
ContentTemplate
>
</
asp:UpdatePanel
>
</
form
>