Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
95 views
I'm looking at your popup example at http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=window

I would like to implement a simple popup in this fashion.  As usual I'm not sure I completely understand it.

First of all, is this up to date?  (The link to the knowledge base article is dead and I was wondering about your use of a conventional asp.net DetailsView.)

Second, I'm not sure I understand the code in EditFormcs.aspx.cs.  I'm going to be using LinqToSQL, not a SQL Data Source.  Would putting the update call in the ItemCommand work as well?


Boris
Top achievements
Rank 1
 answered on 29 Apr 2013
1 answer
89 views
We are trying to upgrading to 2013.1.417.35 for many, many GridTableViews.  This is the source HTML for one column in a grid:

<telerik:GridTemplateColumn UniqueName="ShowButton"  HeaderText=""  > 
      <ItemTemplate>  
  <INPUT type="button" value="watch" name="btnWatch" onClick="window.location='Players/player.aspx?sh=<%# Eval( "ShowNum" ) %>&se=<%# Eval( "SeriesNum" ) %>'" class="smallwatchbutton">
      </ItemTemplate> 
      <ItemStyle HorizontalAlign="Right" VerticalAlign="Middle"  ></ItemStyle>
</telerik:GridTemplateColumn>

Here is what gets rendered:
<input class="smallwatchbutton" type="button" onclick="window.location='Players/player.aspx?sh=233&se=52" id="btnWatch" value="watch">

It's hard to see, but the second single quote does not come down, and therefore, clicking on the button does nothing.  Tested on previous version of RadGrid and it works fine.  Why does it want to eat my quote.
Angel Petrov
Telerik team
 answered on 29 Apr 2013
2 answers
126 views
Hi,

I've recently had the misfortune to use IE10 (have to still use if on the dev PC).  I've noticed that the scroll bars get converted from the prior attractive ones to ugly (understatement) Metro based bars.  

How do you get the form decorator to override the IE10 bars?

Even better is there a way to disable the IE10 rendering in code?

Regards

Jon
Jon
Top achievements
Rank 1
 answered on 29 Apr 2013
1 answer
226 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
118 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
111 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
158 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
208 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
554 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
271 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?