<style type="text/css">
.RadScheduler_WebBlue .rsMonthView div.rsWrap
{
height:50px;
}
</style>
The scheduler is very simple and read only.
<telerik:radscheduler id="RadScheduler1" runat="server" Skin="WebBlue" DayStartTime="10:00:00" DayEndTime="20:00:00" Height="700px" >
</telerik:radscheduler>
Thanks so much.
Susan
<telerik:RadMenu ID="RadMenu1" runat="server" Flow=Vertical BackColor="#212844">
<Items>
<telerik:RadMenuItem Text="Home" NavigateUrl="default.aspx"/>
<telerik:RadMenuItem Text="Rec League" NavigateUrl="RecLeague/RecLeague.aspx"/>
<telerik:RadMenuItem Text="Adult League" NavigateUrl="AdultLeague/AdultLeague.aspx"/>
<telerik:RadMenuItem Text="Tryouts" NavigateUrl="Tryouts.aspx"/>
<telerik:RadMenuItem Text="Calendar" NavigateUrl="GJSCCalendar.aspx"/>
<telerik:RadMenuItem Text="Tournaments/Training" NavigateUrl="Training.aspx"/>
<telerik:RadMenuItem Text="Club Info/Contacts" NavigateUrl="ContactUs.aspx"/>
<telerik:RadMenuItem Text="Coaches" NavigateUrl="Coaches.aspx"/>
<telerik:RadMenuItem Text="News" NavigateUrl="News.aspx" CssClass="selectedItem"/>
<telerik:RadMenuItem Text="Photo Gallery" NavigateUrl="PhotoGallery.aspx"/>
<telerik:RadMenuItem Text="Forms & Links" NavigateUrl="Forms.aspx"/>
<telerik:RadMenuItem Text="Sponsors" NavigateUrl="Sponsors.aspx"/>
<telerik:RadMenuItem Text="Feedback" NavigateUrl="Feedback.aspx"/>
<telerik:RadMenuItem Text="Donations" NavigateUrl="Donations.aspx"/>
</Items>
</telerik:RadMenu></td></tr>
Hi!
I have created a custom server control which implements your data grid.
Everything works fine except that when I click the “delete” button it does not fire the “ItemCommand” event. It does go to the server however.
I have attached my code here so you can take a look.
Thank you in advance!
Imports System
Imports System.Web.UI.WebControls
Imports System.Web.UI
Imports Telerik.WebControls
Imports System.ComponentModel
<DefaultProperty(""), ToolboxData("<{0}:npaGeneralDataGrid runat=server></{0}:npaGeneralDataGrid>")> _
Public Class npaGeneralDataGrid
Inherits Global.Telerik.WebControls.RadGrid
Private _ShowColumnEmployeeNumber As Boolean = False
Private _ShowColumnDeleteNPA As Boolean = False
Private _iconDeleteNPA As String
Private _GridType As GridTypeEnum
'Private oUserProfile As NPABusinessServices.UserProfile
Private _dataGridOwner As String
#Region "Custom Properties"
Public Property GridType() As GridTypeEnum
Get
Return _GridType
End Get
Set(ByVal value As GridTypeEnum)
_GridType = value
End Set
End Property
Public Property ShowColumnEmployeeNumber() As Boolean
Get
Return _ShowColumnEmployeeNumber
End Get
Set(ByVal value As Boolean)
_ShowColumnEmployeeNumber = value
End Set
End Property
Public Property ShowColumnDeleteNPA() As Boolean
Get
Return _ShowColumnDeleteNPA
End Get
Set(ByVal value As Boolean)
_ShowColumnDeleteNPA = value
End Set
End Property
Public Property iconDeleteNPA() As String
Get
Return _iconDeleteNPA
End Get
Set(ByVal value As String)
_iconDeleteNPA = value
End Set
End Property
#End Region
#Region "Grid Type Enumeratior"
Public Enum GridTypeEnum As Integer
Drafts = 0
End Enum
#End Region
Public Sub New()
MyBase.New()
MyBase.AutoGenerateColumns = False
End Sub
Private Sub npaGeneralDataGrid_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
Dim oCol As GridColumn
oCol = New EmployeeNumber
oCol.HeaderText = "Emp No."
oCol.SortExpression = "LastName"
oCol.HeaderStyle.Width = Unit.Pixel(60)
oCol.HeaderStyle.HorizontalAlign = WebControls.HorizontalAlign.Left
oCol.ItemStyle.HorizontalAlign = WebControls.HorizontalAlign.Left
oCol.Visible = Me.ShowColumnEmployeeNumber
MyBase.MasterTableView.Columns.Add(oCol)
oCol = New DeleteNPA(_iconDeleteNPA)
MyBase.MasterTableView.Columns.Add(oCol)
oCol.HeaderText = ""
oCol.HeaderStyle.HorizontalAlign = WebControls.HorizontalAlign.Left
oCol.ItemStyle.HorizontalAlign = WebControls.HorizontalAlign.Left
oCol.Visible = Me.ShowColumnDeleteNPA
End Sub
Private Sub npaGeneralDataGrid_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
''data gets binded here - works beautifully
End Sub
Private Sub npaGeneralDataGrid_ItemCommand(ByVal source As Object, ByVal e As Telerik.WebControls.GridCommandEventArgs) Handles Me.ItemCommand
''this is never fired
Select Case e.CommandName.ToUpper()
Case "DELETE"
Case "DESELECT"
Case "PAGE"
End Select
End Sub
End Class
''class containing the column definition
Imports System
Imports System.Data
Imports System.Configuration
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls
Imports Telerik.WebControls
Public Class EmployeeNumber
Inherits GridTemplateColumn
Private Class ActualClass
Implements ITemplate
Public Column As EmployeeNumber = Nothing
Public Sub InstantiateIn(ByVal container As System.Web.UI.Control) Implements System.Web.UI.ITemplate.InstantiateIn
Dim oLabel As New Label
oLabel.ID = "lblEmployeeNumber"
container.Controls.Add(oLabel)
AddHandler oLabel.DataBinding, AddressOf BindObject
End Sub
Public Sub BindObject(ByVal sender As Object, ByVal e As EventArgs)
'Create a new instance of a Label.
Dim oLabel As Label = CType(sender, Label)
Dim container As GridDataItem = CType(oLabel.NamingContainer, GridDataItem)
'Bind the employee name to the label text
If Not IsDBNull(container.DataItem("EmployeeNumber")) Then
oLabel.Text = container.DataItem("EmployeeNumber")
End If
End Sub
End Class
Public Sub New()
Dim template As New ActualClass
template.Column = Me
Me.ItemTemplate = template
End Sub
End Class
Public Class LastUpdatedDate
Inherits GridTemplateColumn
Private Class ActualClass
Implements ITemplate
Public Column As LastUpdatedDate = Nothing
Public Sub InstantiateIn(ByVal container As System.Web.UI.Control) Implements System.Web.UI.ITemplate.InstantiateIn
Dim oLabel As New Label
oLabel.ID = "lblLastUpdatedDate"
container.Controls.Add(oLabel)
AddHandler oLabel.DataBinding, AddressOf BindObject
End Sub
Public Sub BindObject(ByVal sender As Object, ByVal e As EventArgs)
'Create a new instance of a Label.
Dim oLabel As Label = CType(sender, Label)
Dim container As GridDataItem = CType(oLabel.NamingContainer, GridDataItem)
'Bind the employee name to the label text
oLabel.Text = container.DataItem("LastUpdatedDate")
End Sub
End Class
Public Sub New()
Dim template As New ActualClass
template.Column = Me
Me.ItemTemplate = template
End Sub
End Class
Public Class DeleteNPA
Inherits GridTemplateColumn
Private Shared _IconPath As String
Private Class ActualClass
Implements ITemplate
Public Column As DeleteNPA = Nothing
Public Sub InstantiateIn(ByVal container As System.Web.UI.Control) Implements System.Web.UI.ITemplate.InstantiateIn
Dim oImageButton As New ImageButton
oImageButton.ID = "imgDeleteNPA"
oImageButton.ImageUrl = _IconPath
'oImageButton.CommandName = "delete"
container.Controls.Add(oImageButton)
AddHandler oImageButton.DataBinding, AddressOf BindObject
End Sub
Public Sub BindObject(ByVal sender As Object, ByVal e As EventArgs)
''Get the label's instance
Dim oImageButton As ImageButton = CType(sender, ImageButton)
Dim container As GridDataItem = CType(oImageButton.NamingContainer, GridDataItem)
''Bind the object's CommandArgument to the NPAID
oImageButton.CommandArgument = container.DataItem("NPAID")
oImageButton.CommandName = "delete"
End Sub
End Class
Public Sub New(ByVal iconPath As String)
Dim template As New ActualClass
template.Column = Me
Me.ItemTemplate = template
Me.AllowFiltering = False
_IconPath = iconPath
End Sub
End Class
Hi,
1) I am disabling a RadComboBox on code behind:
<telerik:RadComboBox ID="nfServingSizes" runat="server" Width="120px" MaxHeight="450px" Enabled="false" OnClientSelectedIndexChanged="nfServingSizes_SelectedIndexChanged"></telerik:RadComboBox>
Once displayed, it is correctly disabled (disabled) and does not response to any events as expected.
2) On JavaScript, after an Ajax callback it is enabled:
var combo = $find("<%= cmb.ClientID %>");
combo.enable();
2) Then items are added:
item = new Telerik.Web.UI.RadComboBoxItem();
item.set_text(result.Weights[i].Quantity + " " + result.Weights[i].Unit);
items.add(item);
.. more items in a loop ..
item.select();
The dropdown displays the added items and starts responding to events, but the displayed text remains grayed-out.
It works properly on FF 3.5. The text is grayed out on IE7 and IE8.
Thanks.
Hi,
I'm using Rad grid in one my page. The page has a master page and I placed the grid in its child page. I'm binding the grid with the below code, since the code is called on the search button click event , we placed this separately
function BindUnAssignedPeopleGrid(result) {
var grid = $find("<%= grdUnassigned.ClientID %>")
var masterTableView = grid.get_masterTableView();
RemoveNoRecordRow(masterTableView.get_element());
if (result == null || result == '' || result == 'undefined') {
result = new Array();
}
masterTableView.set_dataSource(result);
masterTableView.dataBind();
}
and the designer page grid
<telerik:RadGrid ID="grdUnassigned" runat="server" Height="253px" AutoGenerateColumns="False"
GridLines="None" AllowMultiRowSelection="True" Skin="Vista" AllowSorting="true" OnSortCommand="grdUnassigned_SortCommand">
<MasterTableView DataKeyNames="PersonID,Name" TableLayout="Fixed" ClientDataKeyNames="PersonID,Name">
<Columns>
<telerik:GridBoundColumn DataField="Name" HeaderText="Name" ItemStyle-Width="100%">
</telerik:GridBoundColumn>
</Columns>
<RowIndicatorColumn>
<HeaderStyle Width="30px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="30px"></HeaderStyle>
</ExpandCollapseColumn>
</MasterTableView>
<ClientSettings AllowColumnHide="True" EnablePostBackOnRowClick="false">
<Selecting AllowRowSelect="True" />
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>
<FilterMenu EnableTheming="True">
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</FilterMenu>
<FilterItemStyle BackColor="#CCFFFF" />
</telerik:RadGrid>
and in serverside sorting( we need everything to be done in client side, help me in this to sort in client side itself)
protected void grdUnassigned_SortCommand(object source, GridSortCommandEventArgs e)
{
try
{
if (!e.Item.OwnerTableView.SortExpressions.ContainsExpression(e.SortExpression))
{
GridSortExpression sortExpr = new GridSortExpression();
sortExpr.FieldName = e.SortExpression;
sortExpr.SortOrder = GridSortOrder.Descending;
e.Item.OwnerTableView.SortExpressions.AddSortExpression(sortExpr);
}
}
catch (Exception ex)
{
}}
but when i do sorting i'm getting "Sys.webforms.pagerequestmanagerparserErrorexception " error. please help me to solve this. I need everything to be done in client side.
Thanks in advance
Its urgent please help me ASAP.
<%
@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head runat="server">
<title></title>
</
head>
<
body>
<form id="form1" runat="server">
<div id="dvError">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
</div>
<div>
<telerik:RadSplitter BackColor="Transparent" ID="Radsplitter1" runat="server" Height="707px"
Width="940" Skin="Default" BorderSize="0" BorderStyle="None" PanesBorderSize="0">
<telerik:RadPane BorderStyle="None" ID="MiddlePane" runat="server" BorderWidth="0px">
<div id="reportPane">
REPORT GOES HERE
</div>
</telerik:RadPane>
<telerik:RadPane BorderStyle="None" ID="RightPane" BackColor="Transparent" runat="server"
Width="32" Scrolling="none">
<telerik:RadSlidingZone ID="RightSlidingZone1" runat="server" BorderStyle="None"
ClickToOpen="True" SlideDirection="left" Width="32">
<telerik:RadSlidingPane ID="RightSlidingPane1" runat="server" EnableTheming="true"
IconUrl="Images/expandpanel-label-closed.gif" Scrolling="None" Width="910px">
<div id="divTest" style="display: block">
<table>
<tr>
<td>
<input type="button" onclick="testfunction()" value="collapse" />
</td>
</tr>
</table>
</div>
</telerik:RadSlidingPane>
</telerik:RadSlidingZone>
</telerik:RadPane>
</telerik:RadSplitter>
</div>
</form>
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
var slidingZone = <%= RightSlidingZone1.ClientID %>;
var splitter = <%= Radsplitter1.ClientID %>;
var slidingpane = <%=RightPane.ClientID %>
function testfunction()
{
paneId =
"<%= RightPane.ClientID %>";
var splitter = $find("<%= RadSplitter1.ClientID %>");
var pane = splitter.getPaneById(paneId);
if (pane)
{
alert(pane);
pane.collapse();
//$get("divTest").style.display = "none";
}
else
{
alert(
"Pane with ID '" + paneId + "' not found.");
}
}
</script>
</telerik:RadCodeBlock>
</
body>
</
html>
For
Each grdItem As GridDataItem In radResourcesList.MasterTableView.Items
If TypeOf grdItem Is GridEditableItem Then
Dim editableItem As GridEditableItem = CType(grdItem, GridDataItem)
editableItem.Edit =
True
If bchange = true then
' I would like ot change the griditem("attend") readonly attibute from true ot false
End If
End If
Next
you help is appreciated
thanks
Tony
| var filterName = $telerik.findElement(pageView1.get_element(), "ddlFilterNames"); |