Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
112 views
Hi, I have the following data structure: Management Units and Projects. Management Units may have other management units children or may have projects. Projects in turn may have children Projects. For example:

-Management Unit 1
       -Management Unit 1.1
             -Project 1
                 -Project 1.1
                        -Project 1.1.1
                        -Project 1.1.2
                 -Project 1.2
             -Project 2
       -Management Unit 1.2
       -Management Unit 1.3


-Management Unit 2
             -Project 1
             -Management Unit 2.1


How could represent this structure with RadGrid?

Thanks in advance.




Princy
Top achievements
Rank 2
 answered on 16 Jul 2014
3 answers
66 views
Hi,

I am using telerik RAD Editor for SharePoint 2010.

I have enabled the property <tool name="InsertExternalVideo"/> in the Rad Editior configuration.

I am able to see the dialog in the editor, however the youtube or vimeo video content gets stripped off when the publishing page is saved.

Is there any special settings need to be enabled to save the Video content in the page ?
Ianko
Telerik team
 answered on 16 Jul 2014
1 answer
109 views
Hi all,

we are having issues with the RadComboBox in combination with a fancybox. The combobox is shown on the fancybox div and when clicked to open, the items are loaded on demand. But the items are loaded on the page behind the fancybox. So if we set the z-index to a high number, the items are showing, but the scroll isn't functioning correctly.

How come the items are loaded on the page behind the fancybox?
Any help or pointers would be much appreciated!

Thanks in advance.

Willem
Magdalena
Telerik team
 answered on 16 Jul 2014
1 answer
187 views
Hi,

My project worked on my local with windows 8 and iis8.0 . All the pages are working fine on both IE10 and Chrome. I deployed to Windows Server 2008 R2. Then my page becomes like the attached file. I've tried adding  
<meta http-equiv="X-UA-Compatible" content="IE=edge">
 to master page. It is working on compatiblity   view.  Anyone can help me ? Thanks.
Marin Bratanov
Telerik team
 answered on 16 Jul 2014
2 answers
281 views
Hi to all i need some help:

I have a page with a RadAjaxLoadingPanel that is working propertly when i click on any element on the page that postbak the page, but when i click over a button in a RadWindow, the page makes a complete posback and is not using the RadAjaxLoadingPanel.

The goal is to use the RadWindow as a confirm window for deleting a element in a RadGrid and i whant that when you click "Ok" the RadWindow close and the  RadAjaxLoadingPanel appears over the RadGrid.

I have all my HTML Telerik controls warped in a RadAjaxPanel, but for a reasson is not showing the RadAjaxLoadingPanel and is making a complete postback.

Thanks in advance.

This is my HTML code:

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    <telerik:RadAjaxManager ID="RadAjaxManager" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel"></telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel" runat="server" />
    <telerik:RadAjaxPanel ID="AjaxContent" runat="server">
        <%--Place holder for the reserved for the specific html of the page.--%>
        <div class="divTitle h3">
            <%--Page title.--%>
        Data Imports List
        </div>
        <div class="tabWarper">
            <telerik:RadGrid runat="server" ID="RadGridDataImportsList" AllowPaging="True" AllowSorting="true" DataSourceID="GridDataSource" Height="578" OnItemDataBound="RadGridDataImportsList_ItemDataBound">
                <MasterTableView DataKeyNames="Id, Type" DataSourceID="GridDataSource" AutoGenerateColumns="False" AllowPaging="true"
                    AllowAutomaticInserts="false" ClientDataKeyNames="Id, Type">
                    <Columns>
                        <telerik:GridBoundColumn DataField="Id" HeaderText="Id" SortExpression="Id" UniqueName="Id" Visible="false" MaxLength="100">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Name" HeaderText="Name" SortExpression="Name" UniqueName="Name" Visible="true" MaxLength="100">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Description" HeaderText="Description" SortExpression="Description" UniqueName="Description" Visible="true" MaxLength="100">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Type" HeaderText="Type" SortExpression="Type" UniqueName="Type" Visible="true" MaxLength="100">
                        </telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
                <ClientSettings EnableRowHoverStyle="true">
                    <Selecting AllowRowSelect="True"></Selecting>
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                    <ClientEvents OnRowDblClick="OnRowDblClick" />
                </ClientSettings>
                <PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric" Position="Bottom" PageSizeControlType="RadComboBox"></PagerStyle>
            </telerik:RadGrid>
            <ef:EntityDataSource ID="GridDataSource" runat="server" ContextTypeName="Common.EntityModels.PlatformDB" ConnectionString="name=PlatformDB"
                DefaultContainerName="PlatformDB" EnableUpdate="False" EnableDelete="False" EnableInsert="False" EntitySetName="DataSourceSystems" />
            <%--Delete confirmation window.--%>
            <telerik:RadWindowManager runat="server" ID="DeleteRadWindowManager" Skin="Metro">
                <Windows>
                    <telerik:RadWindow ID="DeleteRadWindow" Modal="true" Behaviors="Close, Move" VisibleStatusbar="false" Width="350px" Height="200px" runat="server">
                        <ContentTemplate>
                            <div class="rwDialogPopup">
                                <div class="rwDialogText">
                                    <asp:Literal ID="lConfirmDeleteMessage" Text="Are you sure you want to delete this item?" runat="server" />
                                </div>
                            </div>
                            <br />
                            <div class="clr fr">
                                <telerik:RadButton runat="server" ID="btnDeleteOK" Text="OK" OnClick="Delete_Click" Skin="Metro" CausesValidation="false" />
                                <telerik:RadButton runat="server" ID="btnDeleteCancel" Text="Cancel" OnClientClicked="closeDeleteConfirm" Skin="Metro" CausesValidation="false" AutoPostBack="false" />
                            </div>
                        </ContentTemplate>
                    </telerik:RadWindow>
                </Windows>
            </telerik:RadWindowManager>
            <div class="bottomButtons">
                <asp:Label ID="lblErrorMessage" runat="server" CssClass="text-danger text-message fl" />
                <asp:Label ID="lblInformationMessage" runat="server" CssClass="text-message fl" />
                <telerik:RadButton ID="btnDelete" runat="server" OnClientClicked="openDeleteConfirm" Text="Delete" SingleClick="false" Skin="Metro" CssClass="fr" AutoPostBack="false" />
                <telerik:RadButton ID="btnNew" runat="server" OnClick="New_Click" Text="New" SingleClickText="New" SingleClick="true" Skin="Metro" CssClass="fr" />
            </div>
        </div>
        <script type="text/javascript">
            function OnRowDblClick(sender, eventArgs) {
                ClikedDataKey = eventArgs._dataKeyValues.Id;
                window.location.href = 'DataImports.aspx?id=' + ClikedDataKey; // Redirect the page          
                return;
            }
        </script>
    </telerik:RadAjaxPanel>
</asp:Content>

This is the code behind:

    public partial class DataImportsList : DetailBasePage
    {
        // RadAjaxManager setup
        public override void SetAjaxManagerSettings()
        {
            base.AjaxManagerSettings.Add("AjaxContent", new string[] { "AjaxContent" });
        }
    }

This is the function of the override:

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            //If exists RadAjaxManager in the page, add the page AjaxManagerSettings
            if (this.Master.FindControl("MainContent") != null && this.Master.FindControl("MainContent").FindControl("RadAjaxManager") is RadAjaxManager)
            {
                var tRadAjaxManager = this.Master.FindControl("MainContent").FindControl("RadAjaxManager") as RadAjaxManager;

                foreach (var tAjaxManagerSetting in this.AjaxManagerSettings)
                {
                    // Check if exists the control
                    if (this.Master.FindControl("MainContent").FindControl(tAjaxManagerSetting.Key) != null)
                    {
                        var tAjaxSetting = new AjaxSetting { AjaxControlID = tAjaxManagerSetting.Key };

                        foreach (var tUpdatedControlId in tAjaxManagerSetting.Value)
                        {
                            // Check if exists the control
                            if (this.Master.FindControl("MainContent").FindControl(tUpdatedControlId) != null)
                                tAjaxSetting.UpdatedControls.Add(new AjaxUpdatedControl { ControlID = tUpdatedControlId, LoadingPanelID = tRadAjaxManager.DefaultLoadingPanelID });
                        }

                        if (tAjaxSetting.UpdatedControls.Count > 0)
                            tRadAjaxManager.AjaxSettings.Add(tAjaxSetting);
                    }
                }
            }
        }





Marco
Top achievements
Rank 2
 answered on 16 Jul 2014
3 answers
79 views
Hi,

I've added a mark for the current hour on the scheduler.

This function finds the cell of the current half hour, and adds a light-green border bottom:

function markCurrentHour() {
    var currentHour = (new Date()).format("HH");
    var currentMinutes = (new Date()).format("mm");
    if (+currentHour < 13) {
        currentHour += "AM";
    }
    else {
        currentHour = (+currentHour - 12) + "PM";
    }
    var verticalHeaderTables = $(".rsVerticalHeaderTable"); // Each view type has a table (day view, week view, etc.)
    if (verticalHeaderTables) {
        $.each(verticalHeaderTables, function (index, item) {
            var hourCells = $(item).find(".rsAmPm"); // 24 cells with the hours (12AM, 1AM, 2AM, etc.)
            $.each(hourCells, function (index, item) {
                if (item.parentNode.innerText.trim() == currentHour) { // Current hour cell
                    if (+currentMinutes < 30) { // First 30 minutes cell
                        item.parentNode.parentNode.style.borderBottomColor = "lightgreen";
                        item.parentNode.parentNode.style.borderBottomWidth = "5px";
                    }
                    else { // Next 30 minutes cell
                        $(item.parentNode.parentNode.parentNode).next().children()[0].style.borderBottomColor = "lightgreen";
                        $(item.parentNode.parentNode.parentNode).next().children()[0].style.borderBottomWidth = "5px";
                    }
                }
            });
        });
    }
}


I call this function in this event:

function onClientAppointmentsPopulated() {
    markCurrentHour();
}

You can see the result in the attached screenshot (at 4PM).
Hope it will help someone.

Guy.
Segev
Top achievements
Rank 1
 answered on 16 Jul 2014
6 answers
785 views
I have radgrid on my page. When user clicks "Edit" on the grid item and never click "Cancel"/"Update", when page is loaded next time the row is still in edit mode. ..

I have a toolbar at the top of my page having 2 items -- save and cancel. When Cancel on tollbar is clicked is there some way to cancel the edit mode of the radgrid row...
Princy
Top achievements
Rank 2
 answered on 16 Jul 2014
3 answers
73 views
Any page that has a grid with batch editing enabled breaks all other grids with a GridHyperLinkColumn for IE 8.

See screen shot of error when debugging in visual studio. The error happens after the GridHyperLinkColumn  is clicked but the linked page is never navigated to.

As soon as I remove the one grid with batch editing, all other grids work normally. This happened right after I updated to Q2 2014 from Q1 2014 (SP1 maybe? what ever your last major update was). Chrome and Firefox work fine in this scenario. 

Also the demo you have for batch editing does not add new items when I use IE8
http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultcs.aspx

Is anyone else seeing this?

Thanks
Milena
Telerik team
 answered on 16 Jul 2014
2 answers
131 views
Dear All,

I'm using

protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            RadGrid1.DataSource = GridDataSource;            
        }


to bind the grid, and in the front page (aspx) it's like

<telerik:RadGrid ID="RadGrid1" runat="server" MasterTableView-CommandItemDisplay="Top" OnNeedDataSource="RadGrid1_NeedDataSource" AllowPaging="True" AllowSorting="True" AllowFilteringByColumn="True" ShowGroupPanel="True" PageSize="20" Skin="WebBlue">
                        <ClientSettings AllowDragToGroup="True">
                            <Scrolling AllowScroll="True" UseStaticHeaders="True"></Scrolling>
                        </ClientSettings>
                    </telerik:RadGrid>

I'd just like to ask how can I set the dataformatstring = "{0:d}" to certain columns for example?

Thanks
Tim
Top achievements
Rank 1
 answered on 16 Jul 2014
6 answers
154 views
Hello,

I am currently working on a project with a RadGrid.
The Grid has 2 levels: master and detail.

The Settings of the Grid and the DetailView are in the
Page_Load: 
RadGrid1.MasterTableView.AllowPaging = False
Dim tableViewOrders = New GridTableView(RadGrid1)
RadGrid1.MasterTableView.DetailTables.Add(tableViewOrders)
tableViewOrders.AllowPaging = True
tableViewOrders.PageSize = 10
RadGrid1.AllowSorting = True
RadGrid1.ClientSettings.Scrolling.UseStaticHeaders = True
RadGrid1.AllowFilteringByColumn = True
RadGrid1.MasterTableView.HeaderStyle.Width = Unit.Pixel(200)
RadGrid1.ClientSettings.EnableRowHoverStyle = True
RadGrid1.MasterTableView.AllowNaturalSort = False
tableViewOrders.AllowNaturalSort = False

This is the code for the event DetailTableDataBind:
Private Sub RadGrid1_DetailTableDataBind(sender As Object, e As GridDetailTableDataBindEventArgs) Handles RadGrid1.DetailTableDataBind
        'If rep.Ready_Data.Tables.Count > 1 Then
        Dim dataItem As GridDataItem = CType(e.DetailTableView.ParentItem, GridDataItem)
        Dim cellID As TableCell = dataItem("_key_id")
  
        Dim ConnectID As String = cellID.Text
        rep.Ready_Data.Tables(1).DefaultView.RowFilter = ""
        rep.Ready_Data.Tables(1).DefaultView.RowFilter = "_parent_key_id = " & ConnectID
        e.DetailTableView.DataSource = rep.Ready_Data.Tables(1).DefaultView
  
    End Sub

How can I hide some of the columns in detailView?

If I add the following lines into Page_Load:
tableViewOrders.GetColumn("_parent_key_id").Display = False
tableViewOrders.GetColumn("key_id").Display = False

It gives me the following error: 
Cannot find a column with UniqueName '_parent_key_id'
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
 
Exception Details: Telerik.Web.UI.GridException: Cannot find a column with UniqueName '_parent_key_id'
 
Source Error:
Line 208:        tableViewOrders.GetColumn("_parent_key_id").Display = False
Line 209:        tableViewOrders.GetColumn("key_id").Display = False

(It seems the RadGrid doesn’t yet recognize these columns)
 
How can I hide these columns?

 
Thanks,

Daniel.
Daniel
Top achievements
Rank 1
 answered on 16 Jul 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?