Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
268 views
I have an application that allows the user to choose which skin they want to use. I currently have it working with Telerik.EnableEmbeddedSkins = true. So, all the built-in skins are working fine. I'm using RadSkinManager to set the skins globally for the pages. However, I have some custom skins too that I would like to support. So far, as far as I can tell, RadSkinManager only works for built-in embedded skins? Also, I'm wondering is it possible to use embedded skins, and then only have the custom skins as separate files in the file system? Or, do I have to extract all the standard skins out to the files system and then turn off embedded skins? And if I do that, does that mean that RadSkinManager will no longer work?
Tsvetoslav
Telerik team
 answered on 24 Feb 2012
2 answers
68 views
this is correct:

For Each item As GridDataItem In RadGrid1.SelectedItems
            Dim value As [String] = item("Priorità").Text.ToString()
            MsgBox(value)
        Next
       

but if i want value of single cell in row 0?

        Dim x As GridDataItem = RadGrid1.SelectedItems(0)
        Dim r As String = x("NameColumn").Text
        MsgBox(x)
Tsvetoslav
Telerik team
 answered on 24 Feb 2012
1 answer
117 views
hello,

(please see attached picture).

I was working on a project since months.
I upgrade it with new version in 2011, i sold problem with skin.
I upgrade it to new version 2012.

Skin are lost again.

I must say : I close my visual studio, redo the configuration for skin, upgrade tool box ...

It does'nt works.

What can i do please ??


Evelyne MARTIN
Top achievements
Rank 2
 answered on 24 Feb 2012
8 answers
187 views
I have enabled AllowFilteringBycolumn.How to change the default fiilter options which are shown
Princy
Top achievements
Rank 2
 answered on 24 Feb 2012
2 answers
204 views
The Pie Chart always starts the series items from 90 degrees.  Is it possible to start at zero degrees - the top of the chart?
Princy
Top achievements
Rank 2
 answered on 24 Feb 2012
14 answers
351 views
Hello,

I am trying to combine two of the demos into one application and I am running into trouble.  I am doing the same thing as the RadGrid Hierarchy with Templates.  When an item in the grid is selected and it loads the nesteditem, I want to load my tabs and pageviews dynamically with user controls as in the TabStrip / Load on Demand RadPageView demo. I am having a coupld of problems with this:

1. How can I add the tabs only to the item that is being selected from the grid?  I have tried calling the addtab function from the ItemCreated and ItemDataBound methods of the RadGrid but of course it creates the tabs for every item (and also the pageview for the first tab) and I get the "multiple controls with the same ID" error.  If I try to call the addtab from the ItemCommand method of the RadGrid, it works the first time through but as soon as I try to collapse the current item it throws the same error.

2. When the PageViewCreated method fires and loads the user control onto the page, I need to be able to set a public property of that user control.  As it relates to the Telerik expample, I would need to be able to get the EmployeeID from the grid and assign it to the control (as the control needs that ID to load its data).  At the point where the pageview is being created, I can't figure out how to find the EmployeeID for that particular grid item.  I have tried using the DataKeyValues but I can't figure out how to get the index of the particular item that is selected on the grid as it is not being passed to the RadMultiPage controls PageViewCreated method.

Here is my aspx code:

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadGrid1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="RadTabStrip1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" /> 
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="RadMultiPage1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting>              
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />         
      
    <script type="text/javascript">    
    function onTabSelecting(sender, args) {  
        if (args.get_tab().get_pageViewID()) {  
            args.get_tab().set_postBack(false);  
        }  
    }          
    </script>      
 
    <h4>Attendee List</h4>   
         
    <asp:ObjectDataSource ID="odsAttendeeList" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="dsAttendeeList" TypeName="WorkshopsLibrary.CAttendees">  
        <SelectParameters> 
            <asp:SessionParameter Name="sUserID" SessionField="UserID" Type="String" /> 
            <asp:SessionParameter Name="sWorkshopID" SessionField="AdminWorkshopID" Type="String" /> 
        </SelectParameters> 
    </asp:ObjectDataSource> 
      
    <telerik:RadGrid ID="RadGrid1" DataSourceID="odsAttendeeList" runat="server" AutoGenerateColumns="False" AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="True" PageSize="5" GridLines="None" ShowGroupPanel="true" OnPreRender="RadGrid1_PreRender">  
        <PagerStyle Mode="NumericPages" /> 
        <MasterTableView DataSourceID="odsAttendeeList" DataKeyNames="RegistrationID" AllowMultiColumnSorting="True" GroupLoadMode="Server">  
            <NestedViewTemplate> 
                <asp:Panel runat="server" ID="InnerContainer" CssClass="viewWrap" Visible="false">  
                    <telerik:RadTabStrip ID="RadTabStrip1" SelectedIndex="0" CssClass="tabStrip" runat="server" MultiPageID="RadMultiPage1" Orientation="HorizontalTop" OnClientTabSelecting="onTabSelecting" OnTabClick="RadTabStrip1_TabClick" /> 
                    <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" CssClass="multiPage" OnPageViewCreated="RadMultiPage1_PageViewCreated" /> 
                </asp:Panel> 
            </NestedViewTemplate>                      
            <Columns> 
                <telerik:GridBoundColumn SortExpression="RegistrationID" HeaderText="RegistrationID" HeaderButtonType="TextButton" DataField="RegistrationID" UniqueName="RegistrationID" /> 
                <telerik:GridBoundColumn SortExpression="FirstName" HeaderText="First Name" HeaderButtonType="TextButton" DataField="FirstName" UniqueName="FirstName" /> 
                <telerik:GridBoundColumn SortExpression="LastName" HeaderText="Last Name" HeaderButtonType="TextButton" DataField="LastName" UniqueName="LastName" /> 
                <telerik:GridBoundColumn SortExpression="Citizenship" HeaderText="Citizenship" HeaderButtonType="TextButton" DataField="Citizenship" UniqueName="Citizenship" /> 
                <telerik:GridBoundColumn SortExpression="Phone" HeaderText="Phone" HeaderButtonType="TextButton" DataField="Phone" UniqueName="Phone" /> 
                <telerik:GridBoundColumn SortExpression="Email" HeaderText="Email" HeaderButtonType="TextButton" DataField="Email" UniqueName="Email" /> 
                <telerik:GridBoundColumn SortExpression="Cancelled" HeaderText="Cancelled" HeaderButtonType="TextButton" DataField="Cancelled" UniqueName="Cancelled" /> 
                <telerik:GridBoundColumn SortExpression="Accepted" HeaderText="Accepted" HeaderButtonType="TextButton" DataField="Accepted" UniqueName="Accepted" />                                                                  
            </Columns> 
        </MasterTableView> 
        <ClientSettings AllowDragToGroup="true" /> 
    </telerik:RadGrid> 

And here is my codebehind:

    Protected WithEvents RadTabStrip1 As RadTabStrip  
    Protected WithEvents RadMultiPage1 As RadMultiPage  
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load  
 
        Dim cPageRoutines As New CPageRoutines  
        Dim cWorkshops As New CWorkshops  
 
        If HttpContext.Current.Session("UserID") Is Nothing Then  
            cPageRoutines.Login(User)  
        End If  
        cPageRoutines.VerifyRole("SystemAdministrator")  
        cPageRoutines.VerifyAdminWorkshop("AdminWorkshopID")  
 
    End Sub  
 
    Private Sub AddPageView(ByVal tab As RadTab)  
 
        For Each nestedItem As GridNestedViewItem In RadGrid1.MasterTableView.GetItems(GridItemType.NestedView)  
            Dim RadMultiPage1 As RadMultiPage = DirectCast(nestedItem.FindControl("RadMultiPage1"), RadMultiPage)  
            Dim pageView As RadPageView = New RadPageView  
            pageView.ID = tab.Text.Replace(" ", "")  
            RadMultiPage1.PageViews.Add(pageView)  
            pageView.CssClass = "pageView" 
            tab.PageViewID = pageView.ID  
        Next  
 
    End Sub  
 
    Private Sub AddTab(ByVal tabName As String)  
 
        For Each nestedItem As GridNestedViewItem In RadGrid1.MasterTableView.GetItems(GridItemType.NestedView)  
            Dim RadTabStrip1 As RadTabStrip = DirectCast(nestedItem.FindControl("RadTabStrip1"), RadTabStrip)  
            Dim tab As RadTab = New RadTab  
            tab.Text = tabName 
            RadTabStrip1.Tabs.Add(tab)  
        Next  
 
    End Sub  
 
    Protected Sub RadGrid1_PreRender(ByVal sender As Object, ByVal e As EventArgs) Handles RadGrid1.PreRender  
 
        If Not Page.IsPostBack Then  
            RadGrid1.MasterTableView.Items(0).Expanded = False 
            RadGrid1.MasterTableView.Items(0).ChildItem.FindControl("InnerContainer").Visible = True 
        End If  
 
    End Sub  
 
    Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As GridCommandEventArgs) Handles RadGrid1.ItemCommand  
 
        If e.CommandName = RadGrid.ExpandCollapseCommandName Then  
            DirectCast(e.Item, GridDataItem).ChildItem.FindControl("InnerContainer").Visible = Not e.Item.Expanded  
        End If  
 
    End Sub  
 
    Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles RadGrid1.ItemCreated  
 
        If TypeOf e.Item Is GridNestedViewItem Then  
            e.Item.FindControl("InnerContainer").Visible = (DirectCast(e.Item, GridNestedViewItem)).ParentItem.Expanded  
 
            Dim nestedItem As GridNestedViewItem = DirectCast(e.Item, GridNestedViewItem)  
            Dim RadTabStrip1 As RadTabStrip = DirectCast(nestedItem.FindControl("RadTabStrip1"), RadTabStrip)  
            AddTab("Attendee")  
            AddPageView(RadTabStrip1.FindTabByText("Attendee"))  
            AddTab("Additional Questions")  
            Dim cCustomFields As New CCustomFields  
            Dim dt As DataTable = cCustomFields.dsCustomFieldList(HttpContext.Current.Session("UserID").ToString, HttpContext.Current.Session("AdminWorkshopID").ToString).Tables(0)  
            If dt.Rows.Count > 0 Then  
                AddTab("Additional Questions")  
            End If  
            AddTab("Orders")  
            AddTab("Payments")  
        End If  
 
    End Sub  
 
    Protected Sub RadMultiPage1_PageViewCreated(ByVal sender As Object, ByVal e As RadMultiPageEventArgs) Handles RadMultiPage1.PageViewCreated  
 
        Dim userControlName As String = e.PageView.ID & ".ascx"  
        Dim userControl As Control = Page.LoadControl(userControlName)  
        userControl.ID = e.PageView.ID & "_userControl"  
        userControl.GetType().GetProperty("RegistrationID").SetValue(userControl, RadGrid1.MasterTableView.DataKeyValues(??)("RegistrationID").ToString, Nothing)  
        e.PageView.Controls.Add(userControl)  
 
    End Sub  
 
    Protected Sub RadTabStrip1_TabClick(ByVal sender As Object, ByVal e As RadTabStripEventArgs) Handles RadTabStrip1.TabClick  
 
        AddPageView(e.Tab)  
        e.Tab.PageView.Selected = True 
 
    End Sub 
Tsvetoslav
Telerik team
 answered on 24 Feb 2012
2 answers
83 views
Hi,

I am not able to set the collapse value when i am reading from table. I can save the collapse value. plz help me out for this issue. i tried manually but not working. in table i am storing only dock id,dockname,collapse value and zone id.my codes are below: 

   Protected Sub RadDockLayout1_LoadDockLayout(ByVal sender As Object, ByVal e As DockLayoutEventArgs) Handles RDLOccurrence.LoadDockLayout
        If Not Page.IsPostBack Then
            Dim stateList1 As List(Of Widget) = Me.Presenter.GetWidgetInfo() ' getting all values from table
            For Each state1 As Widget In stateList1
                 Dim state As New DockState
                e.Positions(state.UniqueName) = zoneid & zone
                e.Indices(state.UniqueName) = 0
            Next
        End If
    End Sub

Here stateList1 or state1 contains the widgetid,widgetname,zoneid and collapse value. state have only 2 properties e.Position and e.Indices, here no any properties who can handle the collapse value and same it can display.

Please provide the solution.
Rajesh
Top achievements
Rank 1
 answered on 24 Feb 2012
1 answer
100 views
hi in my web page
the RadGrid updated by RadTreeview
and RadTreeView updated By RadGrid
RadGrid updated by itself
when i add Ajaxifing for Linkbutton inside Template Column for a Panel
i getting the followinf error msg
Microsoft JScript runtime error: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'ctl00_ContentPlaceHolder1_ctl00_ContentPlaceHolder1_PanelViewerPagePanel'. If it is being updated dynamically then it must be inside another UpdatePanel.
i add new linkbutton outside of RadGrid for testing
i add ajaxifing for the outside link button for the same panel at runtime
the panel updated without the above error msg
so the pbm is not the Panel the pbm is Linkbutton inside RadGrid
how to solve this pbm
Johnny
Top achievements
Rank 2
 answered on 24 Feb 2012
1 answer
96 views
hi i set visible and hide the controls in the Javascript depend on hidden filed value
i call this function from AjaxManager OnRequestEnd working fine
in the RadWindow close time i postback the page by
form1.submit()
the form is postback and the event is called but the visibles not happening
how to solve this problem

Johnny
Top achievements
Rank 2
 answered on 24 Feb 2012
5 answers
355 views
Hello.

I am trying to set up the grid default filter, but i cannot. Your example is wrong.

Why?

I am binding the grid using the NeedDataSource in the same way as you are writing in Advanced Data-binding (using NeedDataSourceEvent).

I can read:

If you are binding the grid using the NeedDataSource event, you can set the initial filter in the NeedDataSource event handler and omit the call to the Rebind method. The code for setting the filter must still be placed inside an if statement that checks that Page.IsPostBack is False.

No, It cannot be done.

Reason?

Grid has no columns at this time. RadGrid1.MasterTableView.GetColumnSafe("") always returns null. (although datasource has already be assigned).

I also don't need to call  RadGrid1.MasterTableView.FilterExpression = "SQL expression" because my data has been already filtered. I am using SQL SERVER power to do that and I think that everybody must prefer server technology for this type of task.

So I must use PreRender event, but:

(!)

I must call this.RadGrid1.Rebind(); If I don't, the filter function is preselected, but filter value TextBox is empty !!!!

What does Rebind do really? MY grid has thousands of rows. Is it really needed to call rebind because of one value needs to be inserted in a TextBox? The filter function is preselected, so why TextBox is empty?

Thank you very much.

Tom


OfficeBooks Team
Top achievements
Rank 1
 answered on 24 Feb 2012
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?