Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
212 views
I am able to save data from the radEditor to my table in SQL but can't load data into the editor from the same table. What am I doing wrong?

Here's my code:

public

 

 

static DataView GetSparcHelpContent(string pagePath)

 

{

 

 

Database db = DatabaseFactory.CreateDatabase();

 

 

 

DataView dv = db.ExecuteDataSet("uspGetSparcHelpContent", pagePath).Tables[0].DefaultView;

 

 

 

return dv;
}

 

<

 

 

asp:ObjectDataSource ID="odsHelpContent" runat="server" TypeName="Wf.Sparc.DAL.DbAccess" SelectMethod="

 

GetSparcHelpContent

 

">

</

 

 

asp:ObjectDataSource>

 

<

 

 

asp:LinkButton ID="PageIns" runat="server" Text="View / Edit Help" Font-Underline="true"

 

 

 

toolTip="View more information related to this page" Visible="true" ></asp:LinkButton>

 

 

 

 

 

 

 

<asp:Panel ID="ModalPanel" runat="server" style="display:none; width:480px; height:530px; background-color:White;

 

 

 

border-width:2px; border-color:Black; border-style:solid; padding:20px;" DataSourceID="odsHelpContent" >

 

 

 

<asp:Button ID="OKButton" runat="server" Text="Close" ForeColor="Black" /> <br /><br />

 

 

 

 

 

 

 

<telerik:RadEditor ID="radBody" ToolbarMode="Default" ToolsFile="~/RadControls/ToolsFile.xml" runat="server"

 

 

 

ContentFilters="RemoveScripts" EditModes="All" Height="450" SkinID="RadEditorSkin" Visible="true"

 

 

 

Width="200" EnableResize="true" Content='<%# Bind("pageContent") %>'/>

 

 

 

 

 

 

 

<script type="text/javascript">

 

 

 

 

 

 

 

//This script must be below the RadEditor declaration

 

 

 

 

 

 

 

//It displays the custom toolbar icon formatting FAQ

 

 

 

 

 

 

 

//It replaces embedded scripts from a previous version of Telerik RadEditor

 

 

 

 

 

Telerik.Web.UI.Editor.CommandList[

 

"FormattingFAQ"] = function (commandName, editor, args) {

 

 

 

var args = editor.get_html(true) //returns the HTML of the selection.

 

 

 

 

 

editor.showExternalDialog(

 

 

"/RadControls/FormattingFAQ.aspx",

 

args,

350,

250,

 

 

null,

 

 

 

null,

 

 

 

"Formatting FAQ",

 

 

 

true,

 

Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,

 

 

true,

 

 

 

true);

 

};

 

 

</script>

 

 

 

 

 

 

 

<br /><br />

 

 

 

 

 

 

 

<asp:Button ID="SaveButton" runat="server" Text="Save" ForeColor="Black" OnClientClick="needToConfirm = false;" OnClick="btnSave_Click" />

 

 

 

<asp:Button ID="CancelButton" runat="server" Text="Cancel" ForeColor="Black" /> <br /><br /> <br /><br />

 

 

 

 

 

 

 

</asp:Panel>

 

 

 

 

 

 

 

<ajaxToolkit:ModalPopupExtender ID="mpePopup" runat="server" TargetControlId="PageIns" PopupControlID="ModalPanel"

 

 

 

CancelControlID="CancelButton" OkControlID="OKButton" X="1050" Y="50" Drag="true" PopupDragHandleControlID="ModalPanel"/>

 

protected

 

 

void btnSave_Click(object sender, EventArgs e)

 

{

 

 

string pagePath = System.Web.HttpContext.Current.Request.Path.ToString();

 

Wf.Sparc.DAL.

 

DbAccess.UpdSparcHelpContent("ins", pagePath, radBody.Content, int.Parse(Session["userid"].ToString()));

 

}

Rumen
Telerik team
 answered on 29 Apr 2013
1 answer
114 views
I have a support team of 10 members, My users should be able to block an appointment and they need not know who is the support person and how many support persons are there. I mean if any of the 10 members are free the slot should show free and if all the 10 members are booked for the time slot then it should show busy.

1. Can this be achieved in this control
2. In stead of day , weekly or monthly view, can we customize this to 2 weeks view
3. Suppose if I want my users be able to schedule only for 1 month in advance can I restrict it
Plamen
Telerik team
 answered on 29 Apr 2013
1 answer
103 views
Hi,
How can I change the default background color of column after sorting.
thanks
Allen
Princy
Top achievements
Rank 2
 answered on 29 Apr 2013
1 answer
141 views
Having an issue using the custom attribute, i need the value to use for my combo selected index changed
ddlDealer_SelectedIndexChanged

here is my combo markup
                    <ul>
                            <li class="col4">
                                   <%# DataBinder.Eval(Container.DataItem, "DepartmentId") %>
                                 </li>            
                            </ul>
protected void ddlDealer_ItemDataBound(object sender, RadComboBoxItemEventArgs e)
    {
        DataRowView dataRowSource = (DataRowView) e.Item.DataItem;
        e.Item.Text = ((DataRowView)e.Item.DataItem)["Dealer"].ToString();
        e.Item.Value = ((DataRowView)e.Item.DataItem)["DealerId"].ToString();
        e.Item.Attributes["DepartmentId"] = dataRowSource["DepartmentId"].ToString();
    }

  protected void ddlDealer_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
    {
        try
        {
            int departmentId = Convert.ToInt32(ddlDealer.SelectedItem.Attributes["DepartmentId"]);
            LoadCategoryList(departmentId);
        }
        catch (Exception)
        {
            
            throw;
        }
        
    }
Hristo Valyavicharski
Telerik team
 answered on 29 Apr 2013
1 answer
191 views
Hi,
I'm having some challenges with customizing the look of a column bar diagram;

This is the design from my art director:
Attached picture: wantedlook.png

This is my current design with the chart control:
Attached picture: currentlook.png

1. If I set Visible="false" on the YAxis like this:
<YAxis Color="#dddddd" Visible="false">
    <MajorGridLines Color="#dddddd" />
    <MinorGridLines Visible="false" />
</YAxis>

The MajorGridLines turns into some light green color like this:
Attached picture: greenYlines.png

a. How can I control the color of the YAxis major grid lines while having the YAxis Visible="false"?

b. How can I control the color of the value labels on the YAxis (...should I need to have it visible)?


2. The column bars are defined like this:
<Series>
    <telerik:ColumnSeries Stacked="false">
        <Appearance>
            <FillStyle BackgroundColor="#d5a2bb"></FillStyle>
        </Appearance>
        <LabelsAppearance Position="OutsideEnd">
            <TextStyle FontSize="16px" FontFamily="Verdana" />
        </LabelsAppearance>
        <TooltipsAppearance Visible="false" BackgroundColor="White" DataFormatString="{0}" />
        <Items>
            <telerik:SeriesItem BackgroundColor="#a4b9bd" YValue="7300"  />
            <telerik:SeriesItem BackgroundColor="#fed473" YValue="6900" />
            <telerik:SeriesItem BackgroundColor="#d8e782" YValue="5836" />
        </Items>
    </telerik:ColumnSeries>
</Series>

a. How can I remove the gradient effect on the coloring of the column bars?

b. How can I remove the border on the column bars?

c. How can I remove the effect that makes the column bars go lighter when hovered?

d. How can I control the width of each column? (want them wider and less separated)


3. Column labels placement and coloring

a. Is there any way I could place the column text labels above the column and its' value, as in the wanted look?

b. How can I control the color of the column text and value labels? In the wanted design the text color is dark gray and the value labels are in the same color as the column itself.

c. Is there any way I could left align the column value label with the column, as in the wanted design?

Any input on these challenges are most welcome.

/Dan
Danail Vasilev
Telerik team
 answered on 29 Apr 2013
5 answers
537 views
Hi,

1. I am trying to set back ground color for child item of panel bar but its not setting.
2. How can i remove hover style for panel bar. I don't want hover style on Panel bar. 
3. I want to see multiple items but once i click on different panel bar it collapse. so how can i see multiple items. I wrote following code still its not working.
ExpandMode = PanelBarExpandMode.MultipleExpandedItems


Ascs code


<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<telerik:RadCodeBlock ID="rcbCycleChangeHistoryCodeBlock" runat="server">
    <style type="text/css">
        .RadPanelBar_Windows7 .rpOut
        {
            background-color: #AC0000;               
            font-weight: bold;            
            font-family: Verdana,Helvetica,Calibri;
            font-size: 10px;
            color: #FFFFFF;       
            background-color:  #AC0000;       
        }
        
    </style>
</telerik:RadCodeBlock>


<telerik:RadAjaxPanel ID="rapCycleHistory" runat="server">
</telerik:RadAjaxPanel>


In code behind in page load


RadPanelBar cycleChangeHistory = new RadPanelBar()
            {
                AllowCollapseAllItems = true,
                ID = "rpbCycleHistoriesItem",
                RegisterWithScriptManager = true,
                SkinID = "Windows7",
                ViewStateMode = ViewStateMode.Inherit,
                Width = Unit.Percentage(98),
                CookieName = string.Format("CycleChangeHistory_{0}", base.JcnData.JcnListId),
                PersistStateInCookie = true,
                ExpandMode = PanelBarExpandMode.MultipleExpandedItems


            };
            cycleChangeHistory.ItemClick += new RadPanelBarEventHandler(rpbCycleItems_ItemClick);
            rapCycleHistory.Controls.Add(cycleChangeHistory);


            var changeSets = CycleChangesets.OrderByDescending(jcs => jcs.CycleChangeset);


            if (0 == cycleChangeHistory.Items.Count)
            {
                short changeSetCount = 0;
                IList<string> cycles = changeSets.Select(cs => cs.CycleNumber).ToList();
                foreach (string cycle in cycles.Distinct())
                {
                    RadPanelItem changeSetBlock = new RadPanelItem()
                    {
                        Text = string.Format("Cycle {0} ({1})", cycle, cycles.Where(c => c == cycle).Count()),
                        Expanded = false,
                        ClientIDMode = ClientIDMode.Inherit,
                        TabIndex = changeSetCount,
                        Value = string.Format("Cycle:{0}", cycle),
                        PostBack = true,
                        ChildGroupCssClass = "rpOut",
                    };


                    cycleChangeHistory.Items.Add(changeSetBlock);
                    changeSetCount += 1;
                }
            }


 item click event.


        protected void rpbCycleItems_ItemClick(object sender, RadPanelBarEventArgs e)
        {
            RadPanelItem headerItem = e.Item;


            if (0 == headerItem.Controls.Count)
            {
                if (0 < headerItem.Value.IndexOf("|"))
                {
                    string[] valuePieces = headerItem.Value.Split('|');
                    string cycleNumber = valuePieces[0].Substring((valuePieces[0].IndexOf(":") + 1));
                    string cycle = valuePieces[0].Substring((valuePieces[0].IndexOf(":") + 1)).Trim().Substring(valuePieces[0].Substring((valuePieces[0].IndexOf(":") + 1)).Trim().Length - 3);
                    int changesetId = int.Parse(valuePieces[1].Substring((valuePieces[1].IndexOf(":") + 1)));
                    if (Session["CycleParameters"] != null)
                        cycleParameters = Session["CycleParameters"] as List<CycleParameter>;


                    CycleParameter cp = cycleParameters.Where(p => p.cycleNumber == cycle && p.cycleChangeset == changesetId).FirstOrDefault();
                    GetCycleChangeHistoryData(cp.jcnListId, cp.jcnChangeset, cp.cycleId, cp.cycleChangeset, cp.cycleNumber, cp.cycleChangesetCount);
                    CycleChangeHistoryInformation changeSet = CycleChangesets.Where(ccs => ccs.CycleNumber.Trim() == cycle.Trim() && ccs.CycleChangeset == changesetId).FirstOrDefault();
                    if (changeSet.Items == null)
                        changeSet.Items = new List<CycleChangesetDifferenceItem>();
                    if (changeSet.Comments == null)
                        changeSet.Comments = new List<CycleChangesetCommentItem>();
                    IList<string> sectionHeaders = changeSet.Items.OrderBy(o => o.orderByCycleSectionName).Select(rcd => rcd.SectionName).Distinct().ToList();


                    Table historyInformation = new Table()
                    {
                        CellPadding = 0,
                        CellSpacing = 5
                    };


                    int rowCount = 0;
                    foreach (string section in sectionHeaders)
                    {
                        var itemfound = changeSet.Items.Where(di => di.SectionName.Equals(section)).Count();
                        if (itemfound == 0)
                            continue;
                        if (itemfound == 1 && string.IsNullOrEmpty(changeSet.Items.Where(di => di.SectionName.Equals(section)).FirstOrDefault().FieldName) == true)
                            continue;
                        TableHeaderRow newHeaderRow = new TableHeaderRow();
                        historyInformation.Rows.Add(newHeaderRow);
                        TableHeaderCell newHeaderCell = new TableHeaderCell()
                        {
                            ColumnSpan = 2,
                            Text = section
                        };
                        newHeaderRow.Cells.Add(newHeaderCell);


                        Table dataAreaTable = new Table()
                        {
                            BackColor = Color.FromArgb(255, 255, 255),                         
                            BorderStyle = BorderStyle.Solid,
                            BorderWidth = Unit.Pixel(1),
                            CellPadding = 5,
                            CellSpacing = 0


                        };
                        dataAreaTable.Style.Add("table-layout", "fixed");


                        TableRow dataAreaRow = new TableRow();
                        dataAreaRow.Cells.Add(new TableCell() { Width = Unit.Pixel(10) });
                        historyInformation.Rows.Add(dataAreaRow);


                        TableCell dataAreaCell = new TableCell();
                        dataAreaCell.Controls.Add(dataAreaTable);
                        dataAreaRow.Cells.Add(dataAreaCell);


                        rowCount = 0;
                        foreach (CycleChangesetDifferenceItem item in changeSet.Items.Where(di => di.SectionName.Equals(section)))
                        {
                            rowCount += 1;


                            if (1 == rowCount)
                            {
                                TableHeaderRow headerLabels = new TableHeaderRow();
                                dataAreaTable.Rows.Add(headerLabels);
                                string nextChangeset = (changeSet.CycleChangeset + 1).ToString();
                                if (cp.cycleChangesetCount == changeSet.CycleChangeset)
                                {
                                    nextChangeset = "Current";
                                }
                                headerLabels.Cells.Add(new TableHeaderCell() { CssClass = "changeHistoryHeaderText", HorizontalAlign = HorizontalAlign.Center, Width = Unit.Pixel(175), Text = "Field" });
                                headerLabels.Cells.Add(new TableHeaderCell() { CssClass = "changeHistoryHeaderText", HorizontalAlign = HorizontalAlign.Center, Width = Unit.Pixel(212), Text = "Changeset " + changesetId });
                                headerLabels.Cells.Add(new TableHeaderCell() { CssClass = "changeHistoryHeaderText", HorizontalAlign = HorizontalAlign.Center, Width = Unit.Pixel(212), Text = "Changeset " + nextChangeset });
                                int headerCellCount = 0;
                                foreach (TableHeaderCell cell in headerLabels.Cells)
                                {
                                    if (1 < (headerCellCount += 1))
                                        cell.Style.Add("border-left", "1px #000000 solid");
                                }
                            }


                            if (item.FieldName != "Cycle Changeset Comments")
                            {
                                TableRow newRow = new TableRow();
                                dataAreaTable.Rows.Add(newRow);
                                newRow.Cells.Add(new TableCell() { CssClass = "applicationText", HorizontalAlign = HorizontalAlign.Left, Width = Unit.Pixel(175), Text = item.FieldName });
                                newRow.Cells.Add(new TableCell() { CssClass = "applicationText", HorizontalAlign = HorizontalAlign.Left, Width = Unit.Pixel(212), Text = item.ChangesetValue });
                                newRow.Cells.Add(new TableCell() { CssClass = "applicationText", HorizontalAlign = HorizontalAlign.Left, Width = Unit.Pixel(212), Text = item.CurrentValue });
                                int cellCount = 0;
                                foreach (TableCell cell in newRow.Cells)
                                {
                                    if (1 < (cellCount += 1))
                                        cell.Style.Add("border-left", "1px #000000 solid");
                                    cell.Style.Add("border-top", "1px #000000 solid");
                                }
                            }
                        }
                    }


                    TableRow spacerRow = new TableRow();
                    spacerRow.Cells.Add(new TableCell() { ColumnSpan = 2, Text = "&nbsp;", Height = Unit.Pixel(15) });
                    historyInformation.Rows.Add(spacerRow);


                    TableHeaderRow commentHeaderRow = new TableHeaderRow();
                    commentHeaderRow.Cells.Add(new TableHeaderCell() { ColumnSpan = 2, Text = "Comments" });
                    historyInformation.Rows.Add(commentHeaderRow);


                    foreach (CycleChangesetCommentItem comment in changeSet.Comments)
                    {
                        TableRow newRow = new TableRow();
                        newRow.Cells.Add(new TableCell() { Width = Unit.Pixel(10) });
                        newRow.Cells.Add(new TableCell() { Text = comment.Comment });
                        historyInformation.Rows.Add(newRow);
                    }


                    headerItem.Controls.Add(historyInformation);
                }
                else
                {
                    string cycleNumber = headerItem.Value.Substring((headerItem.Value.IndexOf(":") + 1));
                    var changeSets = CycleChangesets.Where(ccs => ccs.CycleNumber == cycleNumber).OrderByDescending(ccs => ccs.CycleChangeset);                    


                    short changeSetCount = 0;
                    foreach (CycleChangeHistoryInformation changeSet in changeSets)
                    {
                        string nextChangeset = (changeSet.CycleChangeset + 1).ToString();                        
                        string creatorId = string.Empty;
                        string userDate = string.Empty;
                        if (null != changeSet.UpdateDate && changeSet.UpdateDate != DateTime.MinValue)
                            userDate = string.Format("- Date: {0}", changeSet.UpdateDate.ToShortDateString());
                        if (changeSets.Count() == changeSet.CycleChangeset)
                        {
                            nextChangeset = "Current";
                            int ccs = changeSet.CycleChangeset + 1;
                            creatorId = (from mu in MembershipDataProvider.LoadMembershipUsers(false)
                                         where mu.UserId == base.JcnData.Cycles.Where(cn => cn.CycleId == changeSet.CycleId && cn.CycleChangeSet == ccs).FirstOrDefault().CycleChangeSetCreatorId
                                         //where mu.UserId == base.CurrentUser //base.JcnData.Cycles.Where(cn => cn.CycleId == changeSet.CycleId  && cn.CycleChangeSet == changeSet.CycleChangeset).FirstOrDefault().CycleChangeSetCreatorId
                                         select string.Format("{0} {1}", mu.FirstName, mu.LastName)).FirstOrDefault();
                        }
                        else
                            creatorId = changeSet.CycleChangeSetCreatorId;
                      
                        RadPanelItem changeSetBlock = new RadPanelItem()
                        {
                            Text = string.Format("Changeset: {0} - {1}, User: {2} {3}", changeSet.CycleChangeset, nextChangeset, creatorId, userDate),
                            Expanded = false,
                            ClientIDMode = ClientIDMode.Inherit,
                            TabIndex = changeSetCount,
                            Value = string.Format("CycleNumber:{0}|CycleChangeSet:{1}", cycleNumber, changeSet.CycleChangeset),
                            PostBack = true,
                            ClickedCssClass = "rpOut"
                        };


                        changeSetBlock.HoveredImageUrl = null;
                        changeSetBlock.BackColor = Color.FromArgb(173, 0, 0);
                        headerItem.Items.Add(changeSetBlock);
                        changeSetCount += 1;
                    }
                }
            }
        }



Please see attached file with this email.

Thanks
Boyan Dimitrov
Telerik team
 answered on 29 Apr 2013
21 answers
242 views
I recently updated to 2011.2.915, and the update has caused RadScheduler.AllowDelete=false to break. The delete icons are showing when I hover over events. I have tried setting the property on both the scheduler and the individual events, but in both cases, the delete icon still appears.

If you need a workaround, add the following to your CSS:
.rsAptDelete
{
    display: none !important;
}
Plamen
Telerik team
 answered on 29 Apr 2013
2 answers
98 views
Hello,

I have a issue with the timeline view in the compatibility mode of IE8-10. I'm using latest Q1 2013 release.
The problem appears only when i don't set RadScheduler1.ColumnWidth. I don't want to set the width so it automatically sizes the columns to the available space. I was not able to reproduce this issue with your live samples and unfortunately I cannot find what's causing the issue.

i have following html

<!DOCTYPE html>
<head id="Head1" runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <title></title>
    <style>
        .rsArrowLeft, .rsArrowRight
        {
            visibility: hidden;
        }
    </style>
</head>
<body class="stageCRM40" style="margin: 0px;">
    <form id="frmGrid" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div id="scheduler">
        <telerik:RadScheduler ID="RadScheduler1" runat="server" AllowDelete="False" AllowEdit="False"
            AllowInsert="False" EnableDatePicker="False" ReadOnly="True" SelectedView="TimelineView"
            ShowNavigationPane="False" ShowViewTabs="False" ShowHeader="False" FirstDayOfWeek="Monday"
            LastDayOfWeek="Sunday" Culture="German (Germany)" OnClientAppointmentDoubleClick="appDoubleClick"
            OnClientAppointmentContextMenuItemClicked="contextMenuClicked" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound"
            RowHeaderWidth="150px" OverflowBehavior="Scroll">
            <TimelineView ReadOnly="True" ShowInsertArea="False" />
            <AppointmentContextMenuSettings EnableDefault="True" />
            <AppointmentContextMenus>
                <telerik:RadSchedulerContextMenu runat="server" ID="appContextMenu">
                    <Items>
                    </Items>
                </telerik:RadSchedulerContextMenu>
            </AppointmentContextMenus>
        </telerik:RadScheduler>
    </div>
    </form>
</body>
</html>

I also have following custom app template

class CustomAppTemplate : ITemplate
        {
            private int customLines = 0;
            public CustomAppTemplate(int customLines)
            {
                this.customLines = customLines;
            }
            public void InstantiateIn(Control container)
            {
                System.Web.UI.HtmlControls.HtmlGenericControl start = new System.Web.UI.HtmlControls.HtmlGenericControl("span");
                start.DataBinding += new EventHandler(start_DataBinding);
                start.Style.Add("white-space", "nowrap");
                container.Controls.Add(start);
 
                System.Web.UI.HtmlControls.HtmlGenericControl div = new System.Web.UI.HtmlControls.HtmlGenericControl("span");
                div.InnerText = " - ";
                div.Style.Add("white-space", "nowrap");
                container.Controls.Add(div);
 
                System.Web.UI.HtmlControls.HtmlGenericControl end = new System.Web.UI.HtmlControls.HtmlGenericControl("span");
                end.DataBinding += new EventHandler(end_DataBinding);
                end.Style.Add("white-space", "nowrap");
                container.Controls.Add(end);
 
                System.Web.UI.HtmlControls.HtmlGenericControl lineBreak2 = new System.Web.UI.HtmlControls.HtmlGenericControl("div");
                container.Controls.Add(lineBreak2);
 
                System.Web.UI.HtmlControls.HtmlGenericControl subject = new System.Web.UI.HtmlControls.HtmlGenericControl("span");
                subject.DataBinding += new EventHandler(subject_DataBinding);
                subject.Style.Add("white-space", "nowrap");
                container.Controls.Add(subject);
 
 
                for (int i = 0; i < customLines - 1; i++)
                {
                    System.Web.UI.HtmlControls.HtmlGenericControl lineBreak = new System.Web.UI.HtmlControls.HtmlGenericControl("div");
                    container.Controls.Add(lineBreak);
 
                    System.Web.UI.HtmlControls.HtmlGenericControl customLine = new System.Web.UI.HtmlControls.HtmlGenericControl("span");
                    customLine.Style.Add("white-space", "nowrap");
                    customLine.DataBinding += customLine_DataBinding;
                    customLine.InnerText = i.ToString();
                    container.Controls.Add(customLine);
                }
            }
 
            void subject_DataBinding(object sender, EventArgs e)
            {
                System.Web.UI.HtmlControls.HtmlGenericControl customLine = (System.Web.UI.HtmlControls.HtmlGenericControl)sender;
                IDataItemContainer aptContainer = (IDataItemContainer)customLine.BindingContainer;
 
                //Access the appointment object and set its AllowEdit property: 
                Telerik.Web.UI.SchedulerAppointmentContainer aptCont = (Telerik.Web.UI.SchedulerAppointmentContainer)customLine.Parent;
                Telerik.Web.UI.Appointment app = aptCont.Appointment;
                app.AllowEdit = false;
 
                string strSubject = (string)DataBinder.Eval(aptContainer.DataItem, "Subject");
                customLine.InnerText = strSubject;
            }
 
            void end_DataBinding(object sender, EventArgs e)
            {
                System.Web.UI.HtmlControls.HtmlGenericControl customLine = (System.Web.UI.HtmlControls.HtmlGenericControl)sender;
                IDataItemContainer aptContainer = (IDataItemContainer)customLine.BindingContainer;
 
                //Access the appointment object and set its AllowEdit property: 
                Telerik.Web.UI.SchedulerAppointmentContainer aptCont = (Telerik.Web.UI.SchedulerAppointmentContainer)customLine.Parent;
                Telerik.Web.UI.Appointment app = aptCont.Appointment;
                app.AllowEdit = false;
 
                string strSubject = (string)DataBinder.Eval(aptContainer.DataItem, "scheduledend");
                customLine.InnerText = strSubject + " ";
            }
 
            void start_DataBinding(object sender, EventArgs e)
            {
                System.Web.UI.HtmlControls.HtmlGenericControl customLine = (System.Web.UI.HtmlControls.HtmlGenericControl)sender;
                IDataItemContainer aptContainer = (IDataItemContainer)customLine.BindingContainer;
 
                //Access the appointment object and set its AllowEdit property: 
                Telerik.Web.UI.SchedulerAppointmentContainer aptCont = (Telerik.Web.UI.SchedulerAppointmentContainer)customLine.Parent;
                Telerik.Web.UI.Appointment app = aptCont.Appointment;
                app.AllowEdit = false;
 
                string strSubject = (string)DataBinder.Eval(aptContainer.DataItem, "scheduledstart");
                customLine.InnerText = strSubject;
            }
 
            private void customLine_DataBinding(object sender, EventArgs e)
            {
                System.Web.UI.HtmlControls.HtmlGenericControl customLine = (System.Web.UI.HtmlControls.HtmlGenericControl)sender;
                IDataItemContainer aptContainer = (IDataItemContainer)customLine.BindingContainer;
 
                //Access the appointment object and set its AllowEdit property: 
                Telerik.Web.UI.SchedulerAppointmentContainer aptCont = (Telerik.Web.UI.SchedulerAppointmentContainer)customLine.Parent;
                Telerik.Web.UI.Appointment app = aptCont.Appointment;
                app.AllowEdit = false;
 
                int currentLine = Convert.ToInt32(customLine.InnerText);
 
                string strSubject = (string)DataBinder.Eval(aptContainer.DataItem, "additionalline" + currentLine.ToString());
 
                if (strSubject.Contains("[LINK]"))
                {
                    if (strSubject.IndexOf("[LINK]") + 6 == strSubject.Length)
                    {
                        customLine.InnerText = strSubject.Replace("[LINK]", "");
                        return;
                    }
 
                    strSubject = strSubject.Replace("[LINK]", "");
                    string[] links = strSubject.Split(new string[] { "|||" }, StringSplitOptions.RemoveEmptyEntries);
                    strSubject = string.Empty;
                    foreach (string link in links)
                    {
                        string[] values = link.Split(new string[] { "<|>" }, StringSplitOptions.RemoveEmptyEntries);
                        strSubject += "<a href=\"" + values[1] + "\"target=\"_blank\">" + values[0] + "</a>, ";
                    }
 
                    strSubject = strSubject.TrimEnd(", ".ToCharArray());
                    customLine.InnerHtml = strSubject;
 
                }
                else
                    customLine.InnerText = strSubject;
            }
        }


attached are two screenshots. one with compatibility mode enabled and one disabled.
christian
Top achievements
Rank 1
 answered on 29 Apr 2013
6 answers
172 views
Hi,

Is there a way to localize the text inside RadComboBox1_MoreResultsBox div : 'Items 1-10 out of 91' (when ShowMoreResultsBox=true) ?

Thank You
Arnaud
Plamen
Telerik team
 answered on 29 Apr 2013
5 answers
198 views
Hi, 

I'm having an issue with getting the updated value from a radgrid table. 

I've tried:

        GridEditableItem editedItem = e.Item as GridEditableItem;
        Hashtable newValues = new Hashtable();
        e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editedItem);

But newValues hashtable still contains the old value. 

My radgrid table updates on ClientEvent using 

            function RowClick(sender, eventArgs) {
                if (editedRow) {
                    if (hasChanges) {
                        hasChanges = false;
                        if (confirm("Are you sure you want to update this entry?")) {
                            $find("<%= LoadingRadGrid.ClientID %>").get_masterTableView().updateItem(editedRow);
                        }
                    } else {
/////
                    }
                }
            }

Here is my RadGrid:
-----------------------------------------------------------------------------------------------------------------------------------------------------------
            <telerik:RadGrid runat="server" ID="LoadingRadGrid" ShowStatusBar="true" AllowAutomaticUpdates="false"
                OnItemDataBound="LoadingRadGrid_OnDataBinding" OnUpdateCommand="LoadingRadGrid_OnUpdateItem">
                <MasterTableView DataKeyNames="Loading_ID" AutoGenerateColumns="false" EditMode="InPlace"
                    Caption="<b>Load</b>" ShowHeadersWhenNoRecords="true">
                    <Columns>
                        <telerik:GridBoundColumn HeaderText="Comp Index" UniqueName="CompartmentNo" DataField="CompartmentIndex"
                            ReadOnly="true">
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn HeaderText="Prod Code" DataField="PlannedProductName"
                            UniqueName="PlannedProductName">
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lbl_ProdCode"></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <telerik:RadComboBox runat="server" ID="ddl_ProdCodeEditMode">
                                </telerik:RadComboBox>
                            </EditItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn HeaderText="Qty" UniqueName="Qty" DataField="PlannedQuantity">
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn HeaderText="Unit">
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lbl_Unit"></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <telerik:RadComboBox runat="server" ID="ddl_UnitEditMode">
                                </telerik:RadComboBox>
                            </EditItemTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
                </MasterTableView>
                <ClientSettings>
                    <Selecting AllowRowSelect="true" />
                    <ClientEvents 
                            OnRowClick="RowClick" 
                            OnRowDblClick="RowDblClick"
                            OnCommand="GridCommand"
                            OnGridCreated="GridCreated"/>
                </ClientSettings>
            </telerik:RadGrid>
-----------------------------------------------------------------------------------------------------------------------------------------------------------

Any suggestions would be much appreciated as I'm working on a tight schedule. 
Also what is the best way of retrieving the changes value of the CustomControl (Combo box).



Many thanks.

Ali
Top achievements
Rank 1
 answered on 29 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?