Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
71 views

I have a simple page with an Ajax timer, that updates some controls (A pannel and two link buttons).  When the timer fires, the controls that it should be updating momentarily disappear from the page and then come back, and there is no loading pannel or anything.  Se code below.  What am I missing?

 

Timer:

<asp:Timer ID="ajtTimer" runat="server" Interval="15000" OnTick="ajtTimer_Tick"></asp:Timer>

 

Ajax Settings for Timer:

<telerik:AjaxSetting AjaxControlID="ajtTimer">
    <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="pnlActions" LoadingPanelID="lpActions" />
        <telerik:AjaxUpdatedControl ControlID="lbSaveAndGenerateTop" LoadingPanelID="lpActions" />
        <telerik:AjaxUpdatedControl ControlID="lbSaveAndGenerate" LoadingPanelID="lpActions" />
    </UpdatedControls>
</telerik:AjaxSetting>

 

Loading Pannel:

<telerik:RadAjaxLoadingPanel runat="server" ID="lpActions"></telerik:RadAjaxLoadingPanel>

 

 

Thanks,

Mirek

Eyup
Telerik team
 answered on 10 Nov 2016
12 answers
340 views
Hi,

I need to add a checkbox for each timeslot row in day view of the Scheduler, is there such flexibility for Scheduler control?
Ref: Like how the data grid allows us to include different control in item template, same way is there any option in Scheduler control.

Thanks,
Navya
Veselin Tsvetanov
Telerik team
 answered on 10 Nov 2016
1 answer
315 views

Hello

I have a grid, which I want to get the cell data (Data Bounded) of different column and same row when I click a RadComboBox  (Item template). and use it in ItemRequested server side event.

I don't know how to access the data bounded cell when clicking the combo box in client side.

I appreciate your help.

Eyup
Telerik team
 answered on 10 Nov 2016
1 answer
526 views

I use Skin Bootstrap and RenderMode Lightweight

Bootstrap use AlternatingItemStyle gray. I dont want to use that, i want have White for all items

I try set <AlternatingItemStyle BackColor="#ffffff" /> Not works....

<ItemStyle BackColor="#ffffff" /> works fine....

BackColor="#ffffff" Not works....

 

How to use White for all items in grid?

 

 

Eyup
Telerik team
 answered on 10 Nov 2016
0 answers
79 views

Hi Team

 

I need to hide the Checkbox that are present in Parent Node in MVC program.

 

Kindly help.

 

 

Regards

Sri balaji S

 

Sri
Top achievements
Rank 1
 asked on 10 Nov 2016
2 answers
740 views

Hi,

How can i find the last row of a rad grid and make the last row bold.

I Have a rad grid in which iam fetching the total from the database itself as in attached file. I do not want to add the footer and use aggregate function

Thanks in advance

Sushanth.B

Sushanth
Top achievements
Rank 1
 answered on 10 Nov 2016
11 answers
5.6K+ views
I am having issues when I already have a grid built in the aspx code and am adding columns dynamically from the server side end. The grid will show up with the proper header titles for each column, but as soon as I sort the headers disappear and when I go to the next page each cell is filled with 'System.Data.DataRowView'.

Is their anyway I can make the columns persist in the viewstate? Thanks in advanced.

aspx code:
<telerik:RadGrid ID="Grid1" runat="server" AllowFilteringByColumn="True" 
        AllowPaging="True" OnNeedDataSource="Grid1_NeedDataSource" AllowSorting="True" 
        GridLines="None" ShowGroupPanel="True" AutoGenerateColumns="true" PageSize="50" 
        Skin="Telerik" Visible="false" Width="98%"
        <MasterTableView AutoGenerateColumns="False" > 
           <Columns> 
                
            </Columns> 
        </MasterTableView> 
 
        <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" ReorderColumnsOnClient="True"
        </ClientSettings> 
    </telerik:RadGrid> 

c# code:
NewColumn = new GridBoundColumn();
NewColumn.DataField = 
"COLUMN1";
NewColumn.UniqueName = 
"COLUMN1";
NewColumn.Visible = 
false;
Grid1.MasterTableView.Columns.Add(NewColumn); 
Marin
Telerik team
 answered on 09 Nov 2016
2 answers
111 views

I have a radgrid which is set to "GroupsDefaultExpanded=False" in the MasterTableView.   When a user expands one of the groups they can edit a row within that group which opens a radwindow so they can make changes.  Once they close the RadWindow and it returns to the original page, all of the groups are back to being collapsed, but the user wants the original group they were working on to remain expanded.  I am using vb.net and aspx pages.  How can I expand the original group when returning from the RadWindow?

RadWindow Code:

<script type="text/javascript">
    function RefreshData(oWnd, eventArgs) {
        <%=Page.ClientScript.GetPostBackEventReference(btnRefresh, "")%>
    }
</script>
<telerik:RadWindow ID="rwEditAttendance" Behaviors="Close" VisibleStatusbar="false" AutoSize="true" EnableViewState="false" runat="server" Modal="true" VisibleOnPageLoad="false" OnClientClose="RefreshData" />
<asp:Button runat="Server" ID="btnRefresh" style="display:none; width:0px; height:0px;" />

 

Table code:

<telerik:RadGrid ID="rgAttendanceManager" runat="server" AllowFilteringByColumn="False" AllowSorting="True" ShowGroupPanel="False" AutoGenerateColumns="False" BorderColor="Silver">
    <MasterTableView
        GridLines="None" Width="100%"
        NoDetailRecordsText="No data matching criteria specified"
        NoMasterRecordsText="No data matching criteria specified"
        EnableNoRecordsTemplate="true"
        DataKeyNames="EmployeeId,EventDate,TimecardCommentId,TCUniqueId,Modified"
        ShowGroupFooter="true" 
        GroupsDefaultExpanded="false"
        >
        <GroupByExpressions >
            <telerik:GridGroupByExpression >
                <SelectFields >
                    <telerik:GridGroupByField FieldName="EmployeeName" HeaderValueSeparator=""  HeaderText=" "  />
                </SelectFields>
                <GroupByFields >
                    <telerik:GridGroupByField FieldName="EmployeeName"  />
                </GroupByFields>
            </telerik:GridGroupByExpression>
        </GroupByExpressions>
 
        <Columns>
            <telerik:GridButtonColumn UniqueName="EditComment" Text="Edit Comment" ButtonType="LinkButton" CommandName="EditComment" />
            <telerik:GridDateTimeColumn DataField="EventDate" HeaderText ="Event Date"  SortExpression="EventDate" HeaderStyle-Wrap="false" DataFormatString="{0:d}"/>
             
            <telerik:GridDateTimeColumn DataField="HistoricalDate" HeaderText ="Historical Date"  SortExpression="HistoricalDate" HeaderStyle-Wrap="false" DataFormatString="{0:d}"/>
            <telerik:GridBoundColumn DataField="PaycodeName" HeaderText="Paycode Name" SortExpression="PaycodeName" ItemStyle-Wrap="false" />
            <telerik:GridBoundColumn DataField="CommentText" HeaderText="Comment Text" SortExpression="CommentText" ItemStyle-Wrap="false" />
            <telerik:GridNumericColumn DataField="CommentValue" HeaderText="Comment Value" HeaderStyle-Wrap="false" DataType="System.Decimal" AllowRounding="false" DecimalDigits="2" Aggregate="Sum" FooterText="Total Attendance Score: "/>
            <telerik:GridDateTimeColumn DataField="PunchIn" HeaderText ="Punch In"  SortExpression="PunchIn" HeaderStyle-Wrap="false" DataFormatString="{0:MM/dd/yyyy HH:mm}"/>
            <telerik:GridDateTimeColumn DataField="PunchOut" HeaderText ="Punch Out"  SortExpression="PunchOut" HeaderStyle-Wrap="false" DataFormatString="{0:MM/dd/yyyy HH:mm}"/>
            <telerik:GridCheckBoxColumn HeaderText="Modified" DataField="Modified" HeaderStyle-Wrap="false" />
        </Columns>
 
    </MasterTableView>
</telerik:RadGrid>

 

Patrick
Top achievements
Rank 1
 answered on 09 Nov 2016
1 answer
130 views

Hi There,

Is it possible to merge RadScheduler timeslots in Timeline view? I would like to display the number of appointments over two days. Currently, I managed to do this on one day only. Please see the following example code, I displayed number '7' on Mondays, what I need is to display number '7' over both Mondays and Tuesdays timeslots. Screenshot attached. Any suggestions will be greatly appreciated. Thank you!

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RadSchedulerTimeLineViewModification.aspx.cs" Inherits="RadSchedulerWebForm" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head id="Head1" runat="server">
    <title>Untitled Page</title>
    <style type="text/css">
        .rsMainHeader
        {
                width: auto !important;
                text-align:Left !important;
                padding-right:5px !important;
        }
        .MySlotGreen
       {
        color: #fff !important;  
        text-align:center !important;
        background-color:#69690a !important;
       }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <div style="width: 980px;">
            <telerik:RadScheduler runat="server" ID="RadScheduler1" SelectedView="TimelineView" ShowViewTabs="false" OnTimeSlotCreated="RadScheduler1_TimeSlotCreated"
            OnNavigationComplete="RadScheduler1_NavigationComplete" ColumnWidth="28" StartInsertingInAdvancedForm="true" AppointmentStyleMode="Default">
                <TimelineView SlotDuration="1" NumberOfSlots="30" GroupBy="User, Month" GroupingDirection="Vertical" ColumnHeaderDateFormat="MMM dd ddd" HeaderDateFormat="MMMM, yyyy"/> 
            </telerik:RadScheduler>
        </div>
    </form>
</body>
</html>

 

Code Behind:

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;
using Telerik.Web.UI.Calendar;
using Telerik.Web.UI.Calendar.View;
 
public partial class RadSchedulerWebForm : System.Web.UI.Page
{
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        RadScheduler1.Provider = new XmlSchedulerProvider(Server.MapPath("~/App_Data/Appointments.xml"), true);
    }
 
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack & RadScheduler1.SelectedView == SchedulerViewType.TimelineView)
        {
            int year = RadScheduler1.SelectedDate.Year;
            int month = RadScheduler1.SelectedDate.Month;
            int numberOfDaysInCurrentMonth = DateTime.DaysInMonth(year, month);
            RadScheduler1.SelectedDate = new DateTime(year, month, 1);
            RadScheduler1.TimelineView.NumberOfSlots = numberOfDaysInCurrentMonth;
        }
    }
 
    protected void RadScheduler1_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e)
    {
        if (RadScheduler1.SelectedView == SchedulerViewType.TimelineView)
        {
            int year = RadScheduler1.SelectedDate.Year;
            int month = RadScheduler1.SelectedDate.Month;
            int numberOfDaysInCurrentMonth = DateTime.DaysInMonth(year, month);
            RadScheduler1.SelectedDate = new DateTime(year, month, 1);
            RadScheduler1.TimelineView.NumberOfSlots = numberOfDaysInCurrentMonth;
        }
    }
 
    protected void RadScheduler1_TimeSlotCreated(object sender, Telerik.Web.UI.TimeSlotCreatedEventArgs e)
    {
        if (RadScheduler1.SelectedView == SchedulerViewType.TimelineView)
        {
            if (e.TimeSlot.Start.Date.DayOfWeek == DayOfWeek.Monday)
            {
                Label numberLabel = new Label();
                numberLabel.Text = "7";
                e.TimeSlot.CssClass = "MySlotGreen";
 
                e.TimeSlot.Control.Controls.Add(numberLabel);
            }
        }
    }
}

 

Ivan Danchev
Telerik team
 answered on 09 Nov 2016
3 answers
194 views
I have a webpage that has a RadGrid on it and when the page is opened I create an excel attachment using memory stream and send it in an email, then close the window. 

This all works great, I even don't show a prompt to close the window. 

I firmly beleive it has to do with this setting, OpenInNewWindow.  But when I do that
RadGrid Grid1 = (RadGrid)Page.Master.FindControl("Main").FindControl("RadGrid1");
Grid1.ExportSettings.OpenInNewWindow = true;


However, at the bottom of the page there is a dialog to Open, Save or Cancel. 
How can I disable this prompt? 

I have attached images from IE 9 and FireFox 11.

One trick I have seen and it works is to simply create a new html page and have a Redirect to that page at the end of the export that only has a window.close() in the JavaScript.
Daniel
Telerik team
 answered on 09 Nov 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?