Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
108 views
I've read the issue here: http://www.telerik.com/help/aspnet-ajax/panelbar-troubleshooting-root-items-collapse.html but I still can't get the root items to expand.

My ASPX:
    <Telerik:RadPanelBar ID="panelBar" runat="server" Width="100%" ExpandMode="MultipleExpandedItems">  
        <Items> 
            <Telerik:RadPanelItem> 
                <Items> 
                    <Telerik:RadPanelItem> 
                        <ItemTemplate> 
                            <%# Eval("ShortDefinition") %> 
                        </ItemTemplate> 
                    </Telerik:RadPanelItem> 
                </Items> 
            </Telerik:RadPanelItem> 
        </Items> 
        <DataBindings> 
            <Telerik:RadPanelItemBinding TextField="Label" Expanded="false" /> 
        </DataBindings> 
    </Telerik:RadPanelBar> 

My Code Behind:
namespace MyNamespace  
{  
    public partial class MyPage : System.Web.UI.Page  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
            panelBar.DataSource = new[]  
            {  
                new { Label="One", ShortDefinition="This is #1." },  
                new { Label="Two", ShortDefinition="This is #2." },  
                new { Label="Three", ShortDefinition="This is #3." },  
                new { Label="Four", ShortDefinition="This is #4." },  
                new { Label="Five", ShortDefinition="This is #5." }  
            };  
            panelBar.DataBind();  
        }  
    }  

This produces a list of PanelItems (One, Two, etc.) but they are not expandable and there is no content.

Thanks!
Josh McCullough
Top achievements
Rank 1
 answered on 08 Jul 2010
10 answers
292 views
I have several questsions about Validation of the the RadTimePicker control as follows.

My current code does the following
    <telerik:RadTimePicker ID="RadTimePicker1"   
        runat="server"   
        EnableEmbeddedSkins="False"   
        ImagesPath="~/Images/Calendar"   
        Skin="Safe"   
        Width="90px">  
        <TimePopupButton CssClass="" HoverImageUrl="~/Images/Calendar/clockHover.gif" ImageUrl="~/Images/Calendar/clock.gif" /> 
        <TimeView Culture="English (United Kingdom)" EnableEmbeddedSkins="False" Skin="Safe" runat="server" > 
        </TimeView> 
        <DateInput EnableEmbeddedSkins="False" LabelCssClass="" Width="" Skin="Safe" runat="server">  
        </DateInput> 
        <Calendar EnableEmbeddedSkins="False" ImagesPath="~/Images/Calendar" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" ViewSelectorText="x" Skin="Safe" runat="server">  
        </Calendar> 
        <DatePopupButton CssClass="" HoverImageUrl="~/Images/Calendar\datePickerPopupHover.gif" ImageUrl="~/Images/Calendar\datePickerPopup.gif" Visible="False" /> 
    </telerik:RadTimePicker> 
    <asp:customvalidator clientvalidationfunction="validtime" cssclass="hourvalidator" setfocusonerror="true" id="starttimevalidator2" controltovalidate="RadTimePicker1" enableclientscript="true" runat="server" Display="Dynamic" >*</asp:customvalidator> 
   
I also have onblur code declared in the code behind this deals with values the user enters, the customvalidator is a client side validator, this validates the time enetered is between a start and end value, is rounded to the correct number of minites ie 00, 15, 30, and 45, is a valid time. Also a blank is a Valid entry

but I have noticed the following issues
1) When the user eners a time the zzzzz, I dont get the custom validtor to fire. I have tried with OnError this works, but the .net validator does not fire, and therefor the page does not see the error!, also If I set a flag to say its invalid how do I make sure that is unset?

2) I would like to overide the code that parses the time so that I can control when '!' is shown on the entry field, If I can access this then some of the issues in 1 would dealt with. All I would need to do is control when the control is valid/invalid

3) I need to ask the control in codebehind if it is valid, this includes entry of zzzzz etc.

4) Because I have a custom CSS skin I don't get the invalid time eneted '!', what do i need in the skin.css for correct this (minor issue)

(properly more to come as I keep digging)


Julian


Sune Dyrberg
Top achievements
Rank 1
 answered on 08 Jul 2010
2 answers
117 views
Hi Friends,

I have a RadTreeView Control and i use xml datasource binding.
i have a textbox above the treeview control.
When a type a word/node name in the textbox. i want my treeview to be binded only upto that node hierarchy. not its child details.

for ex:
consider a tree having A as parent its direct child is B and Its direct child  be C.
so if i search for B
Tree should only display A and its child B. since B is the node that i searched for.

Examples would be appresiated.

One more thing is . how to set the datasource proiperty for the RadTreeView control in javascript.

mn moule
Top achievements
Rank 1
 answered on 08 Jul 2010
3 answers
528 views
Hello,

I have a requirement to have RadComboBox that has AllowCustomText="True" Filter="Contains" but I would like to disable the user to enter some value that is not in the combo box list. Also is the RequiredFieldValidator the right control to use, when validating empty combo box text value.

Thank you in advance,
Vladimir
Kalina
Telerik team
 answered on 08 Jul 2010
1 answer
55 views
Hi, I have a radmenu with 2 level child items, when <DefaultGroupSettings ExpandDirection="Down" /> I see the menu as attached menu-dwn1.jpg with expanders for the child items however, if <DefaultGroupSettings ExpandDirection="Up" /> I see the menu as per attached menu-up1.jpg where there are no child expander arrows so consequently selecting a child item covers the remaining children (as per attached menu-up2.jpg).

I would've expected the structure (with arrowed expanders) to be the same as up and down which your help example picture in "Controlling the Layout of Child Items"  ExpandDirection Up seems to suggest.

Could you please advise.

Cheers
Martin
Yana
Telerik team
 answered on 08 Jul 2010
4 answers
292 views
I'm searching for collapsible panels like <asp:panel> in combination with AjaxControlToolkit-CollapsiblePanelExtender. I´ve tried RadPanelBar, but accessing controls inside <RadPanelItem>-Controls is not that easy. I have to reach the asp-controls from within several methods in the codebehind-file. Does anyone have a clue?
flyin´sven
Top achievements
Rank 2
 answered on 08 Jul 2010
1 answer
322 views
Hi there,

I'm using new Rad Controls.

I want to find a button in the footer template on Button Click event, which is outside the grid.

If anybody is aware of the solution ?
Princy
Top achievements
Rank 2
 answered on 08 Jul 2010
1 answer
299 views
When I try and enable the 'MakeUrlsAbsoulte' filter I get an error if I have a <body> tag in the html. I get the error "error while executing filter xhtml - Typeerror: cannot read property 'lastchild'" when switching back and forth between design and preview tabs.

I'm working with full html files and I'd like the URLs to all be absolute. If I disable the XHTML filter it works but removes they body and head tags of my html. 

Below is a link to a sample project that shows the described behaviour.
http://dl.dropbox.com/u/814466/TelerikURLIssues.zip
Rumen
Telerik team
 answered on 08 Jul 2010
1 answer
64 views
Hi,

I'm learning RadWindow from Online Help.
At "Using RadWindowManager with multiple windows" , the sample work fine in "Web Form" but doesn't work in "Web Form Using Master Page".
Doesn't RadWindowManager work in "Web Form Using Master Page" or Do I have left to modify some properties?

Please advice me.


Fiko
Telerik team
 answered on 08 Jul 2010
3 answers
138 views
I have followed the online demo, save gird settings and I have encountered a few issues.

If I change the column order, so I have columns a, b, c, d, e and I change them to b, a, c, d, e  The change is not recorded.  However the column widths are saved, along with any other grid changes.

If I select to display just columns a, d and save the settings, this works.  However If I then select to show columns b by using the context menu, a third column is shown, however not necessarily b.  However if after I save the settings then refresh the page, the correct columns are shown.

So the main issue is that column orders are not saved and when selecting what columns to show, they are not the correct columns (untill page re-load)

My code below,

 
Partial Class ucGridRowClick 
    Inherits System.Web.UI.UserControl 
 
    Private _Datasource As DataTable 
    Private dataGrid As DataRadGrid 
 
    Public Property Datasource() As DataTable 
        Get 
            Return _Datasource 
        End Get 
        Set(ByVal value As DataTable) 
            _Datasource = value 
        End Set 
    End Property 
 
    Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load 
 
        standardGrid() 
 
        If Not IsPostBack Then 
 
            Dim hdn_field As HiddenField = TryCast(Page.Master.FindControl("hdn_pageId"), HiddenField) 
 
            dataGrid = New DataRadGrid 
            dataGrid.pageId = New Guid(hdn_field.Value.ToString()) 
            dataGrid.coreEntityId = Session.Item("RealId"
            Dim gridSettings As String = dataGrid.LoadSettings() 
 
            If gridSettings <> "" Then 
                Dim LoadPersister As New GridSettingsPersister(RadGrid1) 
                LoadPersister.LoadSettings(gridSettings) 
            End If 
 
        End If 
 
    End Sub 
 
    Protected Sub standardGrid() 
 
        Dim boundColumn As GridBoundColumn 
 
        If Not IsPostBack Then 
 
            For Each column As DataColumn In Datasource.Columns 
                If column.ColumnName.ToString() <> "ROWCLICK" Then 
                    boundColumn = New GridBoundColumn 
                    RadGrid1.MasterTableView.Columns.Add(boundColumn) 
 
                    boundColumn.DataField = column.ColumnName 
                    boundColumn.HeaderText = column.ColumnName.Replace("_"" "
                    boundColumn.DataFormatString = "<nobr>{0}</nobr>" 
 
                Else 
                    boundColumn = New GridBoundColumn 
                    RadGrid1.MasterTableView.Columns.Add(boundColumn) 
 
                    boundColumn.DataField = column.ColumnName 
                    boundColumn.HeaderText = column.ColumnName 
 
                    boundColumn.Visible = False 
                End If 
            Next 
 
        End If 
        RadGrid1.MasterTableView.VirtualItemCount = Datasource.Rows.Count() 
        RadGrid1.DataSource = Datasource 
        RadGrid1.DataBind() 
    End Sub 
 
    Protected Sub RadGrid1_ItemCommand(ByVal source As ObjectByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand 
         
        If e.CommandName = "saveGrid" Then 
            saveGridSettings() 
        ElseIf e.CommandName = "excel" Then 
            buildExport("excel"
        ElseIf e.CommandName = "pdf" Then 
            buildExport("pdf"
        End If 
 
    End Sub 
 
    Protected Sub RadGrid1_NeedDataSource(ByVal source As ObjectByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource 
        RadGrid1.DataSource = Datasource 
    End Sub 
 
    Sub saveGridSettings() 
        Dim hdn_field As HiddenField = TryCast(Page.Master.FindControl("hdn_pageId"), HiddenField) 
 
        Dim SavePersister As New GridSettingsPersister(RadGrid1) 
 
        dataGrid = New DataRadGrid 
        dataGrid.pageId = New Guid(hdn_field.Value.ToString()) 
        dataGrid.coreEntityId = Session.Item("RealId"
        dataGrid.gridSettings = SavePersister.SaveSettings.ToString() 
        dataGrid.SaveSettings() 
 
    End Sub 

<telerik:RadGrid ID="RadGrid1"   
                         runat="server"  
                         GridLines="Vertical" 
                         ShowGroupPanel="True"                           
                         AllowSorting="true"  
                         AllowPaging="true"  
                         AllowCustomPaging="false" 
                         AutoGenerateColumns="false"  
                         EnableHeaderContextMenu="true"                         
                         Skin="Default"  
                         PageSize="15" 
                         OnNeedDataSource="RadGrid1_NeedDataSource" >             
            <ExportSettings> 
                <Pdf FontType="Subset" PaperSize="A4" /> 
                <Excel Format="Html" /> 
                <Csv ColumnDelimiter="Comma" RowDelimiter="NewLine" /> 
            </ExportSettings> 
            <MasterTableView DataKeyNames="ROWCLICK"  CommandItemDisplay="Top"  PagerStyle-AlwaysVisible="true" ClientDataKeyNames="ROWCLICK" >   
                <PagerStyle Mode="Advanced"></PagerStyle>           
               <CommandItemTemplate> 
 
                      <asp:LinkButton ID="btn_save" runat="server" CommandName="saveGrid" ><asp:Image runat="server" ID="img_save" ImageUrl="~/_resources/images/icons/tick.png"/></asp:LinkButton> 
                      <asp:LinkButton ID="btn_excel" runat="server" CommandName="excel" ><asp:Image runat="server" ID="Image1" ImageUrl="~/_resources/images/icons/xls_grey.gif"/></asp:LinkButton>                         
                     
                </CommandItemTemplate> 
            </MasterTableView> 
            <ClientSettings ReorderColumnsOnClient="True"  
                            AllowDragToGroup="True"  
                            AllowColumnsReorder="True"  
                            EnablePostBackOnRowClick="False"  
                            AllowGroupExpandCollapse="True" > 
                            <Selecting AllowRowSelect="true" /> 
                <ClientEvents OnRowClick="RowClick" /> 
                <Resizing AllowRowResize="True"  
                          AllowColumnResize="True"  
                          EnableRealTimeResize="True" 
                          ResizeGridOnColumnResize="False"
                </Resizing> 
            </ClientSettings> 
        </telerik:RadGrid> 

I call the function GridSettingsPersister.vb that is provided with the demo.  Any help with this would be much appreciated.
Veli
Telerik team
 answered on 08 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?