Hi ,
I want to change column to row level on my telerik grid. So after we change the grid will be become like this all date will be columns level and ST,Min,Max,CTA,CTD,Stop Sell will be row level . Please kindly see the attachment.
Thanks & Best Regards
HAN
I'm using a RadGrid to load data for one table and when I sort that table and then loud another RadGrid I get the error No property or field 'ElaScaleScore' exists in type 'AssessmentGradePerformanceResultsData'. The ElaScaleScore is the sorted column on the first grid and the column doesn't exist on the second grid. How can I fix the second grid so it doesn't try to sort on a column that doesn't exist?
Hello Team,
I created a Rad grid with a GridBoundColumn which is assigned a DateTime column. I have the allowFilterOnColumns= True.
Since it is a template column i have added a RadDatePicker as said in the demo of basic template filtering.
But the filter is not working.
Here is the code i have now.
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="GridwithFilter.aspx.vb" Inherits="WebApplication1.GridwithFilter" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html>
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
>
<
telerik:RadScriptManager
ID
=
"rdsm1"
runat
=
"server"
></
telerik:RadScriptManager
>
<
telerik:RadGrid
ID
=
"rgdFilter"
runat
=
"server"
AutoGenerateColumns
=
"false"
AllowFilteringByColumn
=
"true"
>
<
MasterTableView
>
<
Columns
>
<
telerik:GridTemplateColumn
HeaderText
=
"Product Name"
UniqueName
=
"ProductNameColumn"
>
<
ItemTemplate
>
<
asp:Label
ID
=
"lblProduct"
runat
=
"server"
Text='<%# Eval("ProductName") %>'></
asp:Label
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridDateTimeColumn
DataField
=
"OrderDate"
HeaderText
=
"OrderDate"
FilterControlWidth
=
"110px"
SortExpression
=
"OrderDate"
PickerType
=
"DatePicker"
EnableTimeIndependentFiltering
=
"true"
DataFormatString
=
"{0:MM/dd/yyyy}"
>
</
telerik:GridDateTimeColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"ShippedDate"
DataField
=
"ShippedDate"
HeaderText
=
"Shipped date"
DataFormatString
=
"{0:d}"
HeaderStyle-Width
=
"100px"
>
<
FilterTemplate
>
<
telerik:RadDatePicker
RenderMode
=
"Lightweight"
ID
=
"ShippedDatePicker"
runat
=
"server"
Width
=
"100px"
ClientEvents-OnDateSelected
=
"DateSelected"
DbSelectedDate='<%# SetShippedDate(Container) %>' />
<
telerik:RadScriptBlock
ID
=
"RadScriptBlock2"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function DateSelected(sender, args) {
var tableView = $find("<%# TryCast(Container, GridItem).OwnerTableView.ClientID %>");
var date = FormatSelectedDate(sender);
tableView.filter("ShippedDate", date, "EqualTo");
}
function FormatSelectedDate(picker) {
var date = picker.get_selectedDate();
var dateInput = picker.get_dateInput();
var formattedDate = dateInput.get_dateFormatInfo().FormatDate(date, dateInput.get_displayDateFormat());
return formattedDate;
}
</
script
>
</
telerik:RadScriptBlock
>
</
FilterTemplate
>
</
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
</
div
>
</
form
>
</
body
>
</
html
>
and My Code behind
Imports Telerik.Web.UI
Public Class GridwithFilter
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
End If
End Sub
Private Sub rgdFilter_NeedDataSource(sender As Object, e As GridNeedDataSourceEventArgs) Handles rgdFilter.NeedDataSource
Dim dt As New DataTable()
dt.Columns.Add("ProductName")
dt.Columns.Add("ShippedDate", GetType(Date))
Dim dr As DataRow
dr = dt.NewRow()
dr("ProductName") = "Product 1"
dr("ShippedDate") = DateTime.Now
dt.Rows.Add(dr)
dr = dt.NewRow()
dr("ProductName") = "Product 2"
dr("ShippedDate") = DateTime.Now.AddMonths(5)
dt.Rows.Add(dr)
rgdFilter.DataSource = dt
End Sub
Protected Function SetShippedDate(ByVal container As GridItem) As System.Nullable(Of DateTime)
If container.OwnerTableView.GetColumn("ShippedDate").CurrentFilterValue = String.Empty Then
Return New System.Nullable(Of DateTime)()
Else
Return DateTime.Parse(container.OwnerTableView.GetColumn("ShippedDate").CurrentFilterValue)
End If
End Function
End Class
Regards
Rajesh
I am having a particular issue where my RadScheduler doesn't respond on the first click, the radscheduler just refreshes the page. When I click it again then it works fine, this appears on every event on the RadScheduler even on the Week/Month/Year change. This only appear on one of my RadScheduler I am using, below is the code for the RadScheduler
div class="col-xs-12">
<telerik:RadScheduler RenderMode="Lightweight" runat="server" ID="RadScheduler1" StartEditingInAdvancedForm="False" SelectedView="WeekView"
DataKeyField="ID" DataSubjectField="Subject" DataStartField="Start" CustomAttributeNames="Confidential"
DataEndField="End"
RowHeight="30px"
OnAppointmentCreated="RadScheduler1_OnAppointmentCreated" OnAppointmentClick="RadScheduler1_OnAppointmentClick" Height="100%" ShowFooter="False">
<AppointmentTemplate>
<strong>
<div>
<asp:Label ID="lblArrival" runat="server"></asp:Label> <asp:Image runat="server" ID="imgFlight" ImageUrl="Content/images/landing.png" />
<asp:Label ID="lblDeparture" runat="server"></asp:Label>
</strong>
<br />
<asp:Label ID="lblAvailableSeats" runat="server" Text="Seats:" /> <asp:Label ID="lblSeats" runat="server" />
</div>
</AppointmentTemplate>
<TimeSlotContextMenuSettings EnableDefault="true"></TimeSlotContextMenuSettings>
<AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings>
</telerik:RadScheduler>
</div>
Hello,
I would like to change the css of my filtered columns. I use the following code:
if (e.CommandName == RadGrid.HeaderContextMenuFilterCommandName)
{
Triplet arguments = e.CommandArgument as Triplet;
Pair filter1 = arguments.Second as Pair;
Pair filter2 = arguments.Third as Pair;
GridColumn column = (sender as RadGrid).MasterTableView.GetColumn(arguments.First.ToString());
if (filter1.First.ToString() == "NoFilter" && filter2.First.ToString() == "NoFilter")
column.ItemStyle.CssClass = "";
else
column.ItemStyle.CssClass = "rgFilterClass";
}
This works well if I use the two filter fields of the context menu, but if I only choose elements from the filter checked list of my context menu, it's not working. :(
How can I access the "filter checked list" of my "header context menu" from my code-behind? Or is there another way to know that my columns are filtered with the "filter checked list"?
Thank you for your help,
Hi. I want to pass extra parameters to SelectMethod in RagGrid.
Important: By default RadGrid will expect SelectMethod with four arguments with the following names and types:
int startRowIndex
int maximumRows
List sortExpression
List filterExpression> and SelectCountMethod with no arguments!
How can i pass extra parameters to SelectMethod in RadGrid ?
Hi, I have used the Asyncuploader , but when the file is uploaded photos page postback and file uploader will be removed from the list , if they are such as zip files, Office...
Hi, I really like your example of "Sales Dashboard" - http://demos.telerik.com/aspnet-ajax/salesdashboard/views/regionalsalesstatus.aspx
Only thing that i would like to change is ability to load page on first click only. Meaning when i come back to the same page there is no need to run load code again.
How can i adapt the "Sales Dashboard" to behave this way?
Thank you
Hello,
Can I add any items to RadContentTemplateTile, I ideally want it to hold the following:
If this is not possible to achieve through tiles and tile lists, then what could I use that will allow me to achieve this, It is mainly the auto arrangement of tiles and drag & drop features that I am interested in.