Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
224 views
I know there are tons of posts on this, and I think I have gone thru all I can find. I still cannot get it to work. I have a calendar in month view. The text of the appointments get cut off because the height of the appointment is too small. I want to increase this so I can see all the text. This is the latest I have tried.

 

 

<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

 

 

Susan
Top achievements
Rank 1
 answered on 23 Jul 2009
2 answers
133 views
I have a RadMenu that had a dark blue backcolor. after updating to the latest release, this no longer works.

 

<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>

 



Can you tell me what I need to change?

Thanks,
Susan
Susan
Top achievements
Rank 1
 answered on 23 Jul 2009
5 answers
238 views

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

Sebastian
Telerik team
 answered on 23 Jul 2009
1 answer
204 views

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.

 

 

 

Simon
Telerik team
 answered on 23 Jul 2009
1 answer
130 views
Hi there,

Is there any functionality available in telerik, like the grid used in www.xero.com accounting package which fully acts on client side?.

It is very fast, dynamic and intuitive. If the similar kind of functionality is available then it would be great for a real time small and independent programmers like me to develop more intutive solutions.

Telerik, tools are great but still I need a functionality like the grid used in xero.com. If it could be done with the telerik grid then please let me know how to do it.

Thanks

Alagappan Venkatachalam
Sebastian
Telerik team
 answered on 23 Jul 2009
5 answers
179 views
Hi,

I have some slider inside asp:panel.
but the slider exceed the boundary of the panel.
How to fix it?

http://www.freeimagehosting.net/uploads/bf494e033e.jpg

Thanks,
Vincent

Tsvetie
Telerik team
 answered on 23 Jul 2009
2 answers
109 views

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. 

 

 

Sebastian
Telerik team
 answered on 23 Jul 2009
1 answer
112 views
Hello,

I have been trying to use the collapse method with the splitter.  My first try has left me with a strange visual problem: when I click open the slidingzonepane, it shows me the content of the pane, namely a button which triggers the pane's collapse() method.

When I click on the button, the icon for the frame disappears but the content remains.  Shouldn't it disappear too?

This was tested on IE7 and a machine running ,NET 3.5 SP1.  There is nothing in the code behind.

My code:

<%

@ 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>

 

Svetlina Anati
Telerik team
 answered on 23 Jul 2009
3 answers
334 views
Hi there

I using the radgrid and i'm trying to change the readonly attribute in a cell in the code behind

I'm looping thru the griditm and would like to change the readonly

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

 

Daniel
Telerik team
 answered on 23 Jul 2009
1 answer
146 views
I have a DropDownList inside of a PageView on my tabstrip.  Can someone give me a javascript example of how I would reference the DropDownList and more importantly, how to find the SelectedText of the DropDownList?

I am using the following code to reference the DropDownList, but cannot get the selected text:

var filterName = $telerik.findElement(pageView1.get_element(), "ddlFilterNames");  
 
Paul
Telerik team
 answered on 23 Jul 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?