Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
576 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
84 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
767 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.7K+ 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
118 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
145 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
246 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
5 answers
279 views

Hi,

I have a radtreeview control.  I bind this during the page load event.  I’d like to add some attributes to the nodes.

So far I have done this via the NodeDataBound event.  However what I really need to do is store some data from the original datatable in some attributes.

I guess to do this I need to create the radtreeview by looping through the datable and creating the nodes individually.  When I do this I can’t see a way to set the parent IDs?

Any suggestions?

Anton
Telerik team
 answered on 09 Nov 2016
3 answers
137 views
Please check in image  Grids are not Binding Correctly for the First Time when i search an ID . But after opening any FORM from these Binded Grids and came back to home then its looks fine . But why its not bind first time. ???Check in image Grid Blue Strips that's causing issue to perform task!..  Please Help me .
Quest
Top achievements
Rank 1
 answered on 09 Nov 2016
1 answer
106 views

Hi,

 

I have integrated radslider on one ouf our website, unfortunately it was not displying after deployment, it just shows 'Decrease' and 1 only. Please help

 

Dileep

Marin Bratanov
Telerik team
 answered on 09 Nov 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?