Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
289 views
Dear Team,

We are facing an issue to set the MinutesPerRow to 15 mins. Work days starts at 8.30 morning and ends at 16.45 evening.
If I set the MinutesPerRow to 15, the whole time slot will be 30 mins (15+15) because there are two Rows in a 1 time slots.

Could you please advise how to set the time with current two rows or how to reduce the Rows per time slot.

Note- Im using a Day View,

 <telerik:RadScheduler ID="RadScheduler1" runat="server" AllowInsert="true" Skin="Simple"<br>                DataKeyField="ID" DataSubjectField="Subject" DataStartField="Startdate" DataEndField="Enddate"<br>                AppointmentStyleMode="Auto" EnableAdvancedForm="false" OnAppointmentInsert="RadScheduler1_AppointmentInsert"<br>                MinutesPerRow="15" NumberOfHoveredRows="1" AllowDelete="false" AllowEdit="false" DayStartTime="08:15:00"<br>                BackColor="#4D4D4F" DayEndTime="17:00:00" EnableDatePicker="false" Localization-Show24Hours=""<br>                ShowHeader="true" ShowViewTabs="false" ShowNavigationPane="false" ShowFooter="false"<br>                OnLoad="RadScheduler1_Load" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound"<br>                DayView-WorkDayStartTime="08:15:00" DayView-DayEndTime="17:00:00" ShowAllDayRow="false"<br>                Height="700px" OnTimeSlotCreated="RadScheduler1_TimeSlotCreated" HoursPanelTimeFormat="hh:mm"<br>                OnFormCreated="RadScheduler1_FormCreated"></telerik:RadScheduler>
Plamen
Telerik team
 answered on 23 Aug 2013
5 answers
225 views
Hi

I am trying to use the RadMaskedTextBox for the first time and have hit an issue. Where is the MaskType property?

RadMaskedTextBox m1 = new RadMaskedTextBox();
m1.ID = ID;
m1.Mask = "d";
//m1.MaskType  << No such property
c2.Controls.Add(m1);

(where c2 is a TableCell() control)

Yet it is clearly documented on this page as a property of the RadMaskedTextBox

http://www.telerik.com/help/wpf/radmaskedtextbox-features-numeric-mask.html

Here is a sample of the code from that page.
<telerik:RadMaskedTextBox MaskType="Numeric" Mask="d" Value="111.234" Margin="0,5,0,10" />

How do I set the MaskType on a dynamically created RadMaskedTextbox?

Note: I tried this

m1.Attributes.Add("MaskType", "Numeric");

Ugly and heavy handed way to do something that should be a property of the control. Does not work however.

To make matters worse, the textbox that gets written to the page has the letter 'd' in it, AND it cannot be edited..

The textbox input is disabled.

What's going on?

How do I add a dynamically created RadMaskedTextBox to a page, set it's MaskType property and have a functioning textbox once the page loads?








satish
Top achievements
Rank 1
 answered on 23 Aug 2013
3 answers
422 views
I posted my question as a reply by mistake (I am new here!!!)
I would be grateful if you guys could go over there and answer it?  Thanks!
http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-add-new-record.aspx#2756269

Jayesh Goyani
Top achievements
Rank 2
 answered on 23 Aug 2013
7 answers
859 views
I've got a grid bound to an ObjectDataSource. It has one boolean column and I'd like for the grid to be filtered on this column when the page loads.

I've tried using the FilterExpression both declaratively and in code on the page_load event, but neither works. I keep getting an error that says Expression expected. I've also tried using the NeedsDataSource event to bind the grid's datasource instead of an ObjectDataSource control but the filter expression still gives me the same error.

I'm not sure what the problem is. My expression is as follows:
([Submitted] = False)

FYI: My ObjectDataSource method returns a datatable rather than a .net collection.
Rayne
Top achievements
Rank 1
 answered on 22 Aug 2013
2 answers
457 views
Hello,

I am currently attempting to design a RadGrid with GridBoundColumns and GridButtonColumns. Obviously the button sizes will never change since the images will always be the same.

My issue is when resizing columns with the Best Fit option in the context menu of the RadGrid, or when resizing any column in general, the GridButtonColumns change width size when I do not want them to ever change width size.  Is there a way to Override the Best Fit and Resize functionality of the grid to not include specific columns in its recalculations, or is there a better way of handling this?

I have tried setting the HeaderStyle width to a specific size, as well as ItemStyle width, but they are always being overwritten.  I've also made the GridButtonColumns Resizable="false" with a TableLayout="Fixed" and the width of the MasterTableView is set to be a specific size so the grid does not grow or contract from left to right.  I am running the most recent version of RadControls for ASP.NET AJAX, as of 8/13/2013.

Thank you in advance for your assistance.
Ron Weingarten
Top achievements
Rank 1
 answered on 22 Aug 2013
6 answers
164 views
Hi,

I'm adding the RadRating control to an existing user control. It works and looks correct in both Firefox and Chrome, but in IE 9 the stars displayed after selecting a rating all have a black background, like the transparency is not working. I've tried with several of the skins and it is the same result. My setup for the control is:

<telerik:RadRating ID="RadRating1" runat="server" ItemCount="5" SelectionMode="Continuous"
                        Precision="Half" Skin="Default">
                    </telerik:RadRating>

The demos on your site look correct for me though.

Here is a link to a screen capture showing the problem.

Thank you for any assistance.

Greg
ktell
Top achievements
Rank 1
 answered on 22 Aug 2013
5 answers
320 views
protected void DisplayRadChart(Guid UserID, int CourseID)
{
    //CLEAR INFO
    Chart_Code.PlotArea.Chart.Series.Clear();
    Chart_Code.PlotArea.XAxis.Clear();
    //GET THE INFO
    i2d2LMSProgress i2d2progress = new i2d2LMSProgress();
    UserLessonProgressCollection progress = i2d2progress.GetUserProgress(UserID, CourseID);
    ChartSeries failedSeries = new ChartSeries("FTW");
    failedSeries.Clear();
    failedSeries.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.SeriesName;
    failedSeries.Appearance.LabelAppearance.Visible = false;
    failedSeries.Appearance.FillStyle.MainColor = Color.Red;
    failedSeries.Type = ChartSeriesType.StackedBar100;
    ChartSeries completedSeries = new ChartSeries("Completed");
    completedSeries.Clear();
    completedSeries.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.SeriesName;
    completedSeries.Appearance.LabelAppearance.Visible = false;
    completedSeries.Appearance.FillStyle.MainColor = Color.Green;
    completedSeries.Type = ChartSeriesType.StackedBar100;
    ChartSeries startedSeries = new ChartSeries("Started");
    startedSeries.Clear();
    startedSeries.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.SeriesName;
    startedSeries.Appearance.LabelAppearance.Visible = false;
    startedSeries.Appearance.FillStyle.MainColor = Color.Yellow;
    startedSeries.Type = ChartSeriesType.StackedBar100;
    ChartSeries notstartedSeries = new ChartSeries("Not Started");
    notstartedSeries.Clear();
    notstartedSeries.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.SeriesName;
    notstartedSeries.Appearance.LabelAppearance.Visible = false;
    notstartedSeries.Appearance.FillStyle.MainColor = Color.PowderBlue;
    notstartedSeries.Type = ChartSeriesType.StackedBar100;
    Chart_Code.Legend.Items.Clear();
    foreach (UserLessonProgress ulp in progress)
    {
        failedSeries.AddItem(new ChartSeriesItem(Convert.ToDouble(ulp.Failed)));
        completedSeries.AddItem(new ChartSeriesItem(Convert.ToDouble(ulp.Completed)));
        startedSeries.AddItem(new ChartSeriesItem(Convert.ToDouble(ulp.Started)));
        notstartedSeries.AddItem(new ChartSeriesItem(Convert.ToDouble(ulp.NotStarted)));
        Chart_Code.PlotArea.XAxis.AddItem(new ChartAxisItem(ulp.Title, Color.Violet));
    }
    Chart_Code.AddChartSeries(failedSeries);
    Chart_Code.AddChartSeries(completedSeries);
    Chart_Code.AddChartSeries(startedSeries);
    Chart_Code.AddChartSeries(notstartedSeries);
    //SPECIFY THE CHART
    Chart_Code.DefaultType = ChartSeriesType.StackedBar100;
    Chart_Code.Visible = true;
    Chart_Code.PlotArea.Appearance.FillStyle.MainColor = Color.FromArgb(255, 255, 255);
    Chart_Code.PlotArea.Appearance.FillStyle.SecondColor = Color.FromArgb(255, 255, 255);
    Chart_Code.PlotArea.EmptySeriesMessage.TextBlock.Text = "No data available";
    Chart_Code.PlotArea.EmptySeriesMessage.Appearance.FillStyle.MainColor = Color.FromArgb(255, 255, 255);
    Chart_Code.PlotArea.EmptySeriesMessage.Appearance.FillStyle.SecondColor = Color.FromArgb(255, 255, 255);
    //** CHART TITLE **
    Chart_Code.ChartTitle.TextBlock.Appearance.Dimensions.Height = 0;
    Chart_Code.ChartTitle.TextBlock.Visible = false;
    Chart_Code.Chart.Appearance.Corners.SetCornersType(Telerik.Charting.Styles.CornerType.Round);
    Chart_Code.Appearance.Border.Color = Color.LightGray;
    Chart_Code.Skin = "Outlook";
    //** YAXIS **
    Chart_Code.PlotArea.YAxis.AxisLabel.TextBlock.Appearance.TextProperties.Font = new Font("Arial", 8, FontStyle.Bold);
    Chart_Code.PlotArea.YAxis.AxisLabel.TextBlock.Appearance.TextProperties.Color = Color.FromArgb(50, 50, 50);
    Chart_Code.PlotArea.YAxis.MaxValue = 110;
    Chart_Code.PlotArea.YAxis.MaxValue = 0;
    Chart_Code.PlotArea.YAxis.AutoScale = false;
    Chart_Code.PlotArea.YAxis.AddRange(0, 100, 20);
    Chart_Code.PlotArea.YAxis.AxisLabel.TextBlock.Text = "%";
    Chart_Code.PlotArea.YAxis.AxisLabel.Visible = true;
    Chart_Code.PlotArea.YAxis.Appearance.MinorGridLines.Visible = false;
    //** XAXIS **
    Chart_Code.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Font = new Font("Arial", 8, FontStyle.Bold);
    Chart_Code.PlotArea.XAxis.AutoScale = true;
    //Chart_Code.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 320;
    Chart_Code.PlotArea.XAxis.Appearance.LabelAppearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.Top;
    Chart_Code.PlotArea.XAxis.Appearance.TextAppearance.AutoTextWrap = Telerik.Charting.Styles.AutoTextWrap.True;
    Chart_Code.PlotArea.XAxis.LayoutMode = Telerik.Charting.Styles.ChartAxisLayoutMode.Between;
      
      
    Chart_Code.PlotArea.Appearance.Dimensions.Margins.Bottom.Value = 30;
    Chart_Code.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 90;
    //** CHART HEIGHT/WIDTH/PADDING/MARGINS
    Chart_Code.PlotArea.Appearance.Dimensions.Margins.Bottom = Telerik.Charting.Styles.Unit.Percentage(40);
    Chart_Code.PlotArea.Appearance.Dimensions.Margins.Top = Telerik.Charting.Styles.Unit.Percentage(10);
    Chart_Code.PlotArea.Appearance.Dimensions.Margins.Left = Telerik.Charting.Styles.Unit.Percentage(8);
    Chart_Code.PlotArea.Appearance.Dimensions.Margins.Right = Telerik.Charting.Styles.Unit.Percentage(5);
    Chart_Code.PlotArea.Appearance.Dimensions.Width = Telerik.Charting.Styles.Unit.Pixel(400);
    //// ** LEGEND STYLE **
    Chart_Code.Legend.TextBlock.Appearance.FillStyle.SecondColor = Color.White;
    Chart_Code.Legend.Appearance.FillStyle.SecondColor = Color.White;
    Chart_Code.Legend.Appearance.ItemMarkerAppearance.Visible = false;
    Chart_Code.Legend.Appearance.Corners.SetCornersType(Telerik.Charting.Styles.CornerType.Round);
    Chart_Code.Legend.Appearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.BottomLeft;
    Chart_Code.Legend.Appearance.Dimensions.Margins.Left = 70;
    Chart_Code.Legend.Appearance.Dimensions.Margins.Bottom = 20;
    Chart_Code.Legend.Appearance.Dimensions.AutoSize = false;
    Chart_Code.Legend.Appearance.Dimensions.Width = Telerik.Charting.Styles.Unit.Pixel(830);
    Chart_Code.Legend.Appearance.Dimensions.Height = Telerik.Charting.Styles.Unit.Pixel(30);
    //// ** PLOTAREA STYLE **
    Chart_Code.PlotArea.Appearance.Border.Visible = false;
    Chart_Code.PlotArea.Appearance.FillStyle.MainColor = Color.White;
    Chart_Code.PlotArea.Appearance.FillStyle.SecondColor = Color.White;
    
}

When I use the code above I am only getting the numbers rather than the titles for the columns.

I am adding the information with the line "Chart_Code.PlotArea.XAxis.AddItem(new ChartAxisItem(ulp.Title, Color.Violet)); " but the numbers still show up (and aren't violet).

Any ideas where I might be going wrong? If I put in a break I can check the values at the end of the procedure and they are there.

Below is a more stripped down version of the code that still shows 1,2,3 etc. rather than the titles.

//CLEAR INFO
Chart_Code.PlotArea.Chart.Series.Clear();
Chart_Code.PlotArea.XAxis.Clear();
//GET THE INFO
i2d2LMSProgress i2d2progress = new i2d2LMSProgress();
UserLessonProgressCollection progress = i2d2progress.GetUserProgress(UserID, CourseID);
ChartSeries failedSeries = new ChartSeries("FTW");
failedSeries.Clear();
failedSeries.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.SeriesName;
failedSeries.Appearance.LabelAppearance.Visible = false;
failedSeries.Appearance.FillStyle.MainColor = Color.Red;
failedSeries.Type = ChartSeriesType.StackedBar100;
ChartSeries completedSeries = new ChartSeries("Completed");
completedSeries.Clear();
completedSeries.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.SeriesName;
completedSeries.Appearance.LabelAppearance.Visible = false;
completedSeries.Appearance.FillStyle.MainColor = Color.Green;
completedSeries.Type = ChartSeriesType.StackedBar100;
ChartSeries startedSeries = new ChartSeries("Started");
startedSeries.Clear();
startedSeries.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.SeriesName;
startedSeries.Appearance.LabelAppearance.Visible = false;
startedSeries.Appearance.FillStyle.MainColor = Color.Yellow;
startedSeries.Type = ChartSeriesType.StackedBar100;
ChartSeries notstartedSeries = new ChartSeries("Not Started");
notstartedSeries.Clear();
notstartedSeries.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.SeriesName;
notstartedSeries.Appearance.LabelAppearance.Visible = false;
notstartedSeries.Appearance.FillStyle.MainColor = Color.PowderBlue;
notstartedSeries.Type = ChartSeriesType.StackedBar100;
Chart_Code.Legend.Items.Clear();
foreach (UserLessonProgress ulp in progress)
{
    failedSeries.AddItem(new ChartSeriesItem(Convert.ToDouble(ulp.Failed)));
    completedSeries.AddItem(new ChartSeriesItem(Convert.ToDouble(ulp.Completed)));
    startedSeries.AddItem(new ChartSeriesItem(Convert.ToDouble(ulp.Started)));
    notstartedSeries.AddItem(new ChartSeriesItem(Convert.ToDouble(ulp.NotStarted)));
    Chart_Code.PlotArea.XAxis.AddItem(new ChartAxisItem(ulp.Title, Color.Violet));
}
Chart_Code.AddChartSeries(failedSeries);
Chart_Code.AddChartSeries(completedSeries);
Chart_Code.AddChartSeries(startedSeries);
Chart_Code.AddChartSeries(notstartedSeries);
//SPECIFY THE CHART
Chart_Code.DefaultType = ChartSeriesType.StackedBar100;
Chart_Code.Visible = true;

Evgenia
Telerik team
 answered on 22 Aug 2013
1 answer
129 views
Hello,

I have a "View More" button which, upon clicking, increases the page size of my ListView control to show more entries. Functionally this works fine, however the panel my list view is in disappears and then reappears with the new content. I'd prefer to have it stay on the page while it loads more content, like it does in the integrated paging demo here: http://demos.telerik.com/aspnet-ajax/listview/examples/paging/integratedpaging/defaultcs.aspx

<telerik:RadAjaxManagerProxy runat="server" ID="Proxy1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="ddlCategories">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ddlCategories" UpdatePanelRenderMode="Inline" LoadingPanelID="AjaxPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="pnlLittleVideos" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="pnlLittleVideos">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlLittleVideos" LoadingPanelID="AjaxPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
    <telerik:RadAjaxLoadingPanel runat="server" ID="AjaxPanel1">
        <img src="/bh/corporate/includes/img/loaders/style2_white.gif" />
    </telerik:RadAjaxLoadingPanel>

<asp:Panel runat="server" ID="pnlLittleVideos">
    <telerik:RadListView ID="rptLittleVideos" runat="server" AllowPaging="true" PageSize="2" ItemPlaceholderID="plcVideoContainer">
        <LayoutTemplate>
            <asp:PlaceHolder runat="server" ID="plcVideoContainer"></asp:PlaceHolder>
            <asp:Button runat="server" ID="btnNext" Text="More" OnClick="btnMore_Click" ></asp:Button>
        </LayoutTemplate>
        <ItemTemplate>
            <section class="box li-video">
                <!-- CONTENT HERE -->
            </section>
        </ItemTemplate>
    </telerik:RadListView>
</asp:Panel>

public void btnMore_Click(object sender, EventArgs e)
{
    rptLittleVideos.PageSize = 5;
    rptLittleVideos.CurrentPageIndex = 0;
    rptLittleVideos.Rebind();
}

private void rptLittleVideos_NeedDataSource(object sender, RadListViewNeedDataSourceEventArgs e)
    {
        if (!IsPostBack) PopulateTags();
        
        var featurettes = CurrentItem
                        .ChildrenByTemplate("Little Inspiration Featurette")
                        .As(i => new LittleVideo(i))
                        .Where(i => i.IsSet) // && i.Tags.Contains(tag)
                        .ToList();
 
        // Check to see if we need to filter by category
        if (ddlCategories.SelectedIndex > 0)
        {
            var tagFiltered = new List<LittleVideo>();
            tagFiltered = featurettes.Where(i => i.Tags.Contains(ddlCategories.SelectedValue)).ToList();
 
            featurettes.Clear();
            featurettes.AddRange(tagFiltered);
        }
 
        rptLittleVideos.ItemDataBound += rptLittleVideos_ItemDataBound;
        rptLittleVideos.DataSource = featurettes;
 
        RadAjaxManager.GetCurrent(Page).ResponseScripts.Add("jQuery.app.pages.global.reloadJS()");
    }

Konstantin Dikov
Telerik team
 answered on 22 Aug 2013
0 answers
131 views
Hi All

I have a List<> which contains multiple items and  is built at dynamically when a user clicks Search.

I need to bind this list to a Radchart programmatically and need to add each item in this list to a series then add this to the
Radchart.

I have tried with the code below but i am getting an error - can anyone help?
foreach (ProductsAndPrices yl in YearlyAverage)
{
       string name = yl.Product + " " + yl.ProductStrength + " " + yl.Pack_Size;
       chart.Name = name;
       int av = int.Parse(yl.Average.ToString());
       chart.AddItem(int.Parse(yl.Average.ToString()), name);
}
 
testing.Series.Add(chart);

I need to get all the values from the list in the format yl[0].Average , yl[1].average etc etc and bind this to the radchart...

Many thanks
Ram

Ram
Top achievements
Rank 1
 asked on 22 Aug 2013
1 answer
1.9K+ views
I want to display rad window on button click . My button inside radgrid, when i click on button rad window will open but problem is i was not able to set width and height for windows.


Please help me urgent
A2H
Top achievements
Rank 1
 answered on 22 Aug 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?