Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
114 views
Hi,
Is it possible to provide for rows in control? I would like to inform loop through the and provide . Please provide a solution.

Thanks,
Amrutha
Bozhidar
Telerik team
 answered on 25 Jan 2017
2 answers
214 views
Hi Team,
i am creating Multi language selection feature in Web App using Global Resources,Local Resources and bootstrap(css and Js). But I am getting the following Error while rending telerik control.

Error:
"The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)."

Aspx Code:
<% if (dirs == "ar-EG")
       { %>

 <link href="../bootstrap-arabic/css/bootstrap-arabic.css" rel="stylesheet" />

    <% }
       else
       { %>

 <link href="../bootstrap/css/bootstrap.css" rel="stylesheet" />

 <% } %>

Aspx control working good with  same code but issue occur while use telerik control.  
What is the possible way solve this issue Please suggest.   

Regrads
Manoj Sahu.
manoj
Top achievements
Rank 1
 answered on 25 Jan 2017
1 answer
93 views

I haven't touched my application in some time.   This is a C# Asp.net web app using Telerik Ajax controls. I've just updated to the latest controls and I'm having a problem adding a new RadComboBox.

Up till now I have not had this problem.  Whenever I added a box it's label would always be in line on the left.

With this new box, no matter what I do, the label is always above the dropdown. 

This is within a div that has a width of 100% of the current page.

What could I be forgetting?

Boris
Top achievements
Rank 1
 answered on 24 Jan 2017
1 answer
155 views

Hi,

I managed to get RadGantt tasks inserts and deletes working fine. But for some strange reason 
UI changes(e.g. Add Child tasks, rename task, change dates...etc.) to the tasks are not being saved.
Am I missing something obvious?

I'm using latest  UI for ASP.NET AJAX version 2017.1.116.40

Below is my declarative 

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ProjectPlan.aspx.cs" Inherits="ModitiPAdmin.Project.ProjectPlan" %><%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %><%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI.Gantt" tagprefix="telerik" %><asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">     <%--     <telerik:RadScriptManager  ID="RadScriptManager1" runat="server">         <Scripts>             <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js">             </asp:ScriptReference>             <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js">             </asp:ScriptReference>             <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js">             </asp:ScriptReference>         </Scripts>     </telerik:RadScriptManager>         --%>      <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">         <AjaxSettings>             <telerik:AjaxSetting AjaxControlID="ConfiguratorPanel">                 <UpdatedControls>                     <telerik:AjaxUpdatedControl ControlID="RadGantt1" />                     <telerik:AjaxUpdatedControl ControlID="ConfiguratorPanel" />                 </UpdatedControls>             </telerik:AjaxSetting>         </AjaxSettings>     </telerik:RadAjaxManager>     <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"></telerik:RadAjaxLoadingPanel>     <div>     </div>     <div>         <telerik:RadGantt RenderMode="Lightweight" runat="server" ID="RadGantt1" Skin="Material"             Height="700px"             ListWidth="520px"             EnableEmbeddedScripts="true"             EnableEmbeddedSkins="true"             EnableEmbeddedBaseStylesheet="true"             DataSourceID="TasksDataSource"             DependenciesDataSourceID="DependenciesDataSource"             ResourcesDataSourceID="ResourcesDataSource"             AssignmentsDataSourceID="AssignmentsDataSource"             SelectedView="MonthView"             AllowTaskInsert="true"             AllowTaskUpdate="true"             AllowTaskMove="true"             AllowTaskReorder="true"             AllowTaskDelete="true"             AllowDependencyInsert="true"             AllowDependencyDelete="true"             AllowPercentCompleteDrag="true"             AllowTaskResize="true"             AllowColumnResize="true"             AllowSorting="True"             DisplayDeleteConfirmation="true"             EnableResources="true"             EnablePdfExport="true"             AutoGenerateColumns="false"             ShowCurrentTimeMarker="true"             ShowTooltip="true"             ShowFullTime="true"             ShowFullWeek="true"             WorkWeekStart="Monday"             WorkWeekEnd="Friday"             >             <ExportSettings>                 <Pdf Landscape="true"                 >                 </Pdf>             </ExportSettings>             <DayView UserSelectable="true"  />             <WeekView UserSelectable="true"                 />             <MonthView UserSelectable="true"                 MonthHeaderDateFormat="Y"                 WeekHeaderDateFormat="ddd M/dd"                 />             <YearView UserSelectable="true" />             <Columns>                 <telerik:GanttBoundColumn DataField="id" AllowEdit="false" AllowSorting="false" Width="50px"  HeaderText="ID" DataType="Number">                 </telerik:GanttBoundColumn>                 <telerik:GanttBoundColumn DataField="Title" DataType="String" Width="120px" HeaderText="Title">                 </telerik:GanttBoundColumn>                 <telerik:GanttBoundColumn DataField="Start" DataType="DateTime" DataFormatString="dd/MM/yy" Width="80px"  HeaderText="Start">                 </telerik:GanttBoundColumn>                 <telerik:GanttBoundColumn DataField="End" DataType="DateTime" DataFormatString="dd/MM/yy" Width="80px" HeaderText="End">                 </telerik:GanttBoundColumn>                 <telerik:GanttBoundColumn DataField="PercentComplete" DataType="Number" Width="80px" HeaderText="% Complete">                 </telerik:GanttBoundColumn>                 <telerik:GanttResourceColumn HeaderText="Asssigned Resources"  Width="100px" ></telerik:GanttResourceColumn>             </Columns>             <CustomTaskFields>                 <telerik:GanttCustomField PropertyName="Description" ClientPropertyName="description"  Type="String" />             </CustomTaskFields>             <DataBindings>                 <TasksDataBindings                     IdField="gantttaskid"                     ParentIdField="parent_gantttaskid"                     StartField="start_datetime"                     EndField="end_datetime"                     OrderIdField="orderid"                     TitleField="title"                     PercentCompleteField="percentcomplete"                     SummaryField="summary"                     />                 <DependenciesDataBindings                     TypeField="type"                     IdField="ganttdependencyid"                     PredecessorIdField="predecessorid"                     SuccessorIdField="successorid" />                 <ResourcesDataBindings                     IdField="ganttresourceid"                     TextField="resourecode"                      ColorField="color"                     />                 <AssignmentsDataBindings                    IdField="ganttresourceassignmentid"                    ResourceIdField="resourceid"                    TaskIdField="taskid"                    UnitsField="units"  />             </DataBindings>         </telerik:RadGantt>     </div>     <div>         <asp:SqlDataSource ID="TasksDataSource" runat="server"             ConnectionString="<%$ ConnectionStrings:DefaultConnection %>"             DeleteCommand="DELETE FROM moditi.gantttask WHERE [gantttaskid] = @gantttaskid"             InsertCommand="INSERT INTO moditi.gantttask (parent_gantttaskid, orderid, title, start_datetime, end_datetime, percentcomplete, expanded, summary) VALUES (@parent_gantttaskid, @orderid, @title, @start_datetime, @end_datetime, @percentcomplete, @expanded, @summary)"             SelectCommand="SELECT * FROM moditi.gantttask"             UpdateCommand="UPDATE moditi.gantttask SET parent_gantttaskid = @parent_gantttaskid, orderid = @orderid, title = @title, start_datetime = @start_datetime, end_datetime = @end_datetime, percentcomplete = @percentcomplete, expanded = @expanded, summary = @summary WHERE gantttaskid = @gantttaskid">             <DeleteParameters>                 <asp:Parameter Name="gantttaskid" Type="Int64" />             </DeleteParameters>             <InsertParameters>                 <asp:Parameter Name="parent_gantttaskid" Type="Int64" />                 <asp:Parameter Name="orderid" Type="Int64" />                 <asp:Parameter Name="title" Type="String" />                 <asp:Parameter Name="start_datetime" Type="DateTime" />                 <asp:Parameter Name="end_datetime" Type="DateTime" />                 <asp:Parameter Name="percentcomplete" Type="Decimal" />                 <asp:Parameter Name="expanded" Type="Boolean" />                 <asp:Parameter Name="summary" Type="Boolean" />             </InsertParameters>             <UpdateParameters>                 <asp:Parameter Name="parent_gantttaskid" Type="Int64" />                 <asp:Parameter Name="orderid" Type="Int64" />                 <asp:Parameter Name="title" Type="String" />                 <asp:Parameter Name="start_datetime" Type="DateTime" />                 <asp:Parameter Name="end_datetime" Type="DateTime" />                 <asp:Parameter Name="percentcomplete" Type="Decimal" />                 <asp:Parameter Name="expanded" Type="Boolean" />                 <asp:Parameter Name="summary" Type="Boolean" />                 <asp:Parameter Name="gantttaskid" Type="Int64" />             </UpdateParameters>         </asp:SqlDataSource>         <asp:SqlDataSource ID="DependenciesDataSource" runat="server"             ConnectionString="<%$ ConnectionStrings:DefaultConnection %>"             SelectCommand="SELECT * FROM moditi.ganttdependency"             InsertCommand="INSERT INTO moditi.ganttdependency ([predecessorid], [successorid], [type]) VALUES (@predecessorid, @successorid, @type)"             UpdateCommand="UPDATE moditi.ganttdependency SET [predecessorid] = @predecessorid, [successorid] = @successorid, [type] = @type WHERE [ganttdependencyid] = @ganttdependencyid"             DeleteCommand="DELETE FROM moditi.ganttdependency WHERE [ganttdependencyid] = @ganttdependencyid"             >             <DeleteParameters>                 <asp:Parameter Name="ganttdependencyid" Type="Int64" />             </DeleteParameters>             <InsertParameters>                 <asp:Parameter Name="predecessorid" Type="Int64" />                 <asp:Parameter Name="successorid" Type="Int64" />                 <asp:Parameter Name="type" Type="Int64" />             </InsertParameters>             <UpdateParameters>                 <asp:Parameter Name="predecessorid" Type="Int64" />                 <asp:Parameter Name="successorid" Type="Int64" />                 <asp:Parameter Name="type" Type="Int64" />                 <asp:Parameter Name="ganttdependencyid" Type="Int64" />             </UpdateParameters>         </asp:SqlDataSource>         <asp:SqlDataSource runat="server" ID="ResourcesDataSource"             ConnectionString="<%$ ConnectionStrings:DefaultConnection %>"             SelectCommand="SELECT * FROM moditi.ganttresource"             DeleteCommand="DELETE FROM moditi.ganttresource WHERE [ganttresourceid] = @ganttresourceid"             >              <DeleteParameters>                 <asp:Parameter Name="ganttresourceid" Type="Int64" />             </DeleteParameters>         </asp:SqlDataSource>         <asp:SqlDataSource ID="AssignmentsDataSource" runat="server"             ConnectionString="<%$ ConnectionStrings:DefaultConnection %>"             SelectCommand="SELECT * FROM moditi.ganttresourceassignment"             DeleteCommand="DELETE FROM moditi.ganttresourceassignment WHERE [ganttresourceassignmentid] = @ganttresourceassignmentid"             InsertCommand="INSERT INTO moditi.ganttresourceassignment (taskid, resourceid, units) VALUES (@taskid, @resourceid, @units)"             UpdateCommand="UPDATE moditi.ganttresourceassignment SET taskid = @taskid, resourceid = @resourceid, units = @units WHERE ganttresourceassignmentid = @ganttresourceassignmentid">             <DeleteParameters>                 <asp:Parameter Name="ganttresourceassignmentid" Type="Int64" />             </DeleteParameters>             <InsertParameters>                 <asp:Parameter Name="taskid" Type="Int64" />                 <asp:Parameter Name="resourceid" Type="Int64" />                 <asp:Parameter Name="units" Type="Decimal" />             </InsertParameters>             <UpdateParameters>                 <asp:Parameter Name="ganttresourceassignmentid" Type="Int64" />                 <asp:Parameter Name="taskid" Type="Int64" />                 <asp:Parameter Name="resourceid" Type="Int64" />                 <asp:Parameter Name="units" Type="Decimal" />             </UpdateParameters>         </asp:SqlDataSource>     </div>

</asp:Content>

Alfred
Top achievements
Rank 1
 answered on 24 Jan 2017
2 answers
103 views

I have an auto-generated grid from a datatable.  I need to find the index of 2 columns and then traverse the columns (i.e. col 4-6) and then grab the data from each cell and make it bold based on a condition. 

1 -How can I get the indexes of these if I know the header name?

2 - how do I traverse the columns and grab it's data?

 

Thanks in advance!

Mark
Top achievements
Rank 1
 answered on 24 Jan 2017
6 answers
231 views
Hello,

We are wondering how to access the low-level appointment data (like recordset ID or internal references) in order to duplicate a selected appointment including all its settings to a new date in timeline view (v. Q2_2009).
We were looking at the exposed properties without finding something, but I guess we certainly missed something...

Edit: The selection of the appointment occurs through a contextual menu.

This has to be done server-side for technical reasons.
Anybody has an idea?

Regards,
David
Veselin Tsvetanov
Telerik team
 answered on 24 Jan 2017
1 answer
872 views

I am testing out the Telerik RadGrid to see if it can replace a custom Silverlight grid we have in our product.  The problem is that our product reads the data from CouchDB as a JSON file which we de-serialize into a class (stored in a Session variable) that contains collections (System.Collections.Generic.List) of other classes.  I bind one of these sub-collections to the RadGrid.DataSource, depending on what I need to display and call RadGrid.DataBind().

Everything there works fine, except when I go to update the InPlace grid values with the RadGrid_UpdateCommand event.  I only get the old values and not the updated ones, possibly due to the PostBack resetting the values. I have found other postings of people with this issue, but they are all binding to a DataSource object like SqlDataSource.

Is it possible to update a collection bound to the RadGrid datasource?

Viktor Tachev
Telerik team
 answered on 24 Jan 2017
1 answer
208 views

Hi,

We have a requirement of having tabs and radDocks in the RadTabStrip. I am saving the RadDock States in the database and using hidden update Panel as shown in the example project.

Is there a way to load only the selected tab Rad Docks and their state when the tab is selected instead of loading both the tabs?

We can have maximum of 19 Widgets on a single tab, and each RadDock inclues grids, images etc... To load all the widgets it is taking a long time. Please let me know if only the selected tab can be loaded instead of both the tabs. I tried using RenderSelectedPageOnly="true" of RadMultiPage, but did not change the loading time.

Attached a sample project with DashboardPage that has 2 tabs as 2 user controls. Please take a look at this and let me know.

PS: How do I attach a zip file which contains the sample project.

Thanks for all of your help.

Nagasree

 

 

 

Nencho
Telerik team
 answered on 24 Jan 2017
3 answers
89 views

Hi,

When using ClickToOpen and ItemTemplates, the menu cannot be closed by touching the root item on mobile Safari (iPad)!

Works if not using ItemTemplates, it also works on desktop browsers!

Sample:

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="menu.aspx.vb" Inherits="TestaTredjepartWeb.menu" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="s" runat="server">
        </asp:ScriptManager>
        <div>
            <telerik:RadMenu ID="menu" runat="server" RenderMode="Lightweight" ClickToOpen="true">
                <Items>
                    <telerik:RadMenuItem Value="item1" Text="Test1">
                        <Items>
                            <telerik:RadMenuItem Text="1"></telerik:RadMenuItem>
                            <telerik:RadMenuItem Text="2"></telerik:RadMenuItem>
                            <telerik:RadMenuItem Text="3"></telerik:RadMenuItem>
                            <telerik:RadMenuItem Text="4"></telerik:RadMenuItem>
                        </Items>
                        <ItemTemplate>
                            Click Here
                        </ItemTemplate>
                    </telerik:RadMenuItem>
                </Items>
            </telerik:RadMenu>
        </div>
    </form>
</body>
</html>

 

On an iPad, click the menu to open it, then it cannot be closed by clicking the menu item again...

Regards
Andreas

Dimitar
Telerik team
 answered on 24 Jan 2017
5 answers
371 views
Hi

   I have a application in VS2010 in which I am using RadPersistenceManager but getting error when trying to save state of  RadGrid. I have attached Error and posting the code. Please help me....

here is the asp code



<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="WebApplication3.WebForm1" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!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>
    <style type="text/css">
        .qsf-demo-canvas
        {
            background: url(bg_img.jpg) no-repeat;
            height: 441px;
            width: 476px;
        }
        .demo-canvas-inner
        {
            height: 100%;
            margin-left: -11px;
            padding-top: 26px;
        }
        
        .controls-container
        {
            clear: both;
            padding-top: 40px;
            zoom: 1;
        }
        .controls-container:after
        {
            content: "";
            clear: both;
            display: block;
        }
        .controls-container .rlbItem
        {
            height: 20px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
        <telerik:RadPersistenceManager runat="server" ID="RadPersistenceManager1">
            <PersistenceSettings>
                <telerik:PersistenceSetting ControlID="rgdemo" />
            </PersistenceSettings>
        </telerik:RadPersistenceManager>
        <asp:Label ID="Label1" runat="server" />
        <br />
        <div style="margin-left: 40px" class="qsf-ib">
            <telerik:RadButton ID="SaveButton" runat="server" Text="Save state" OnClick="SaveButton_Click"
                Skin="Office2007" />
            <telerik:RadButton ID="ResetButton" runat="server" Text="Reset state" OnClick="ResetButton_Click"
                Skin="Office2007" />
            <telerik:RadButton ID="LoadButton" runat="server" Text="Load state" OnClick="LoadButton_Click"
                Enabled="false" Skin="Office2007" />
        </div>
        <div>
            <telerik:RadGrid runat="server" ID="rgdemo" EnableHeaderContextMenu="true" EnableHeaderContextAggregatesMenu="true"
                Skin="Office2007" EnableHeaderContextFilterMenu="true">
            </telerik:RadGrid>
        </div>
        <asp:HiddenField runat="server" ID="SessionID" />
    </div>
    </form>
</body>
</html>
---------------------------------------------------Here is the codbehind-------------------




Imports System.IO
Imports Telerik.Web.UI

Public Class WebForm1
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        
    End Sub
    Public Function GetData() As DataTable
        Dim table As New DataTable()
        table.Columns.Add("ID")
        table.Columns.Add("ParentID")
        table.Columns.Add("Value")
        table.Columns.Add("Text")

        table.Rows.Add(New [String]() {"1", Nothing, "World_Continents", "World Continents"})
        table.Rows.Add(New [String]() {"2", Nothing, "World_Oceans", "World Oceans"})

        table.Rows.Add(New [String]() {"3", "1", "Asia", "Asia"})
        table.Rows.Add(New [String]() {"4", "1", "Africa", "Africa"})
        table.Rows.Add(New [String]() {"5", "1", "Australia", "Australia"})
        table.Rows.Add(New [String]() {"6", "1", "Europe", "Europe"})
        table.Rows.Add(New [String]() {"7", "1", "North_America", "North America"})
        table.Rows.Add(New [String]() {"8", "1", "South_America", "South America"})

        table.Rows.Add(New [String]() {"9", "2", "Arctic_Ocean", "Arctic Ocean"})
        table.Rows.Add(New [String]() {"10", "2", "Atlantic_Ocean", "Atlantic Ocean"})
        table.Rows.Add(New [String]() {"11", "2", "Indian_Ocean", "Indian Ocean"})
        table.Rows.Add(New [String]() {"12", "2", "Pacific_Ocean", "Pacific Ocean"})
        table.Rows.Add(New [String]() {"13", "2", "South_Ocean", "SouthOcean"})

        Return table
    End Function

    Protected Sub SaveButton_Click(ByVal sender As Object, ByVal e As EventArgs)
        SessionID.Value = Guid.NewGuid().ToString()
        LoadButton.Enabled = True
        RadPersistenceManager1.StorageProviderKey = SessionID.Value
        RadPersistenceManager1.SaveState()
    End Sub

    Protected Sub LoadButton_Click(ByVal sender As Object, ByVal e As EventArgs)
        If File.Exists((Server.MapPath("~/App_Data") & "\") + SessionID.Value) Then
            RadPersistenceManager1.StorageProviderKey = SessionID.Value
            RadPersistenceManager1.LoadState()
        Else
            Label1.Text = "Please save some state before load it"
        End If
    End Sub
    Protected Sub ResetButton_Click(ByVal sender As Object, ByVal e As EventArgs)
     
    End Sub
    Protected Sub rgdemo_NeedDataSource(ByVal Sender As Object, ByVal e As GridNeedDataSourceEventArgs) Handles rgdemo.NeedDataSource
        rgdemo.DataSource = GetData()
    End Sub

End Class
Vessy
Telerik team
 answered on 23 Jan 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?