Hi there,
The OnItemCommand, OnSortCommand got triggered unexpectly when pressing enter key in a textbox. Here is my scenario:
1 Click in a textbox below a RadGrid.
2 Press Enter key, OnItemCommand, OnSortCommand wil be triggered.
However, as soon as I remove the HeaderImageUrl property in telerik:GridTemplateColumn, everything works perfectly.
Please see the demo code below:
TestEnterKey.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestEnterKey.aspx.cs" Inherits="TestEnterKey" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
style
=
"margin-bottom:20px;"
>
<
asp:scriptmanager
id
=
"ScriptManager1"
runat
=
"server"
>
</
asp:scriptmanager
>
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
AllowPaging
=
"True"
CellSpacing
=
"0"
AllowSorting
=
"True"
OnItemCommand
=
"grid_RowCommand"
OnSortCommand
=
"grid_SortCommand"
GridLines
=
"None"
Width
=
"800px"
AllowFilteringByColumn
=
"true"
EnableLinqExpressions
=
"false"
AutoGenerateColumns
=
"false"
OnNeedDataSource
=
"RadGrid1_NeedDataSource"
ShowFooter
=
"True"
>
<
MasterTableView
AutoGenerateColumns
=
"false"
EditMode
=
"InPlace"
AllowFilteringByColumn
=
"true"
ShowFooter
=
"True"
TableLayout
=
"Auto"
>
<
Columns
>
<
telerik:GridTemplateColumn
DataField
=
"Freight"
HeaderText
=
"Freight"
SortExpression
=
"Freight"
HeaderImageUrl
=
"~/images/datePickerPopup.png"
AutoPostBackOnFilter
=
"true"
CurrentFilterFunction
=
"GreaterThanOrEqualTo"
ShowFilterIcon
=
"false"
>
<
ItemTemplate
>
<
asp:LinkButton
ID
=
"lbl_freight"
runat
=
"server"
Text='<%#Eval("Freight")%>' Visible="true"/>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
DataField
=
"ShipName"
HeaderText
=
"Ship Name"
SortExpression
=
"ShipName"
AutoPostBackOnFilter
=
"true"
CurrentFilterFunction
=
"Contains"
ShowFilterIcon
=
"false"
>
<
ItemTemplate
>
<
asp:LinkButton
ID
=
"lbl_name"
runat
=
"server"
Text='<%#Eval("ShipName")%>' Visible="true"/>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
</
div
>
<
asp:TextBox
ID
=
"tb_componentname"
TextMode
=
"SingleLine"
MaxLength
=
"250"
runat
=
"server"
CssClass
=
"STD"
></
asp:TextBox
>
</
form
>
</
body
>
</
html
>
TestEnterKey.aspx.cs:
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Text;
using System.Configuration;
using System.Collections.Generic;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using Telerik.Web.UI;
public partial class TestEnterKey : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
public class MyOrder
{
public int OrderID { get; set; }
public DateTime OrderDate { get; set; }
public double Freight { get; set; }
public string ShipName { get; set; }
public string ShipCountry { get; set; }
}
protected void grid_RowCommand(object sender, GridCommandEventArgs e)
{
}
protected void grid_SortCommand(object source, GridSortCommandEventArgs e)
{
}
protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
{
LoadData();
}
private void LoadData()
{
MyOrder _order1 = new MyOrder();
_order1.OrderID = 1;
_order1.OrderDate = new DateTime(2014, 1, 18);
_order1.Freight = 15.61;
_order1.ShipCountry = "Canada";
_order1.ShipName = "David";
MyOrder _order2 = new MyOrder();
_order2.OrderID = 2;
_order2.OrderDate = new DateTime(2015, 9, 12);
_order2.Freight = 12.39;
_order2.ShipCountry = "US";
_order2.ShipName = "Jack";
MyOrder _order3 = new MyOrder();
_order3.OrderID = 3;
_order3.OrderDate = new DateTime(2015, 6, 2);
_order3.Freight = 6.81;
_order3.ShipCountry = "Mexico";
_order3.ShipName = "Howard";
MyOrder _order4 = new MyOrder();
_order4.OrderID = 4;
_order4.OrderDate = new DateTime(2014, 3, 26);
_order4.Freight = 19.92;
_order4.ShipCountry = "Canada";
_order4.ShipName = "William";
MyOrder _order5 = new MyOrder();
_order5.OrderID = 5;
_order5.OrderDate = new DateTime(2015, 5, 15);
_order5.Freight = 9.96;
_order5.ShipCountry = "US";
_order5.ShipName = "Don";
List<
MyOrder
> _myList = new List<
MyOrder
>();
_myList.Add(_order1);
_myList.Add(_order2);
_myList.Add(_order3);
_myList.Add(_order4);
_myList.Add(_order5);
RadGrid1.DataSource = _myList;
}
}
Any help is much appreciated!
When I try to set a default filter on combobox filter the grid filters correctly but checkboxes in the filter do not display correctly. The filter says "All Items" instead of the two selected items.
01.
protected
void
gridviewRequests_PreRender(
object
sender, EventArgs e)
02.
{
03.
gridviewRequests.MasterTableView.FilterExpression =
"(ErrorStatus = 'Critical Errors' OR ErrorStatus ='Non-critical Errors')"
;
04.
05.
GridFilteringItem filterItem = gridviewRequests.MasterTableView.GetItems(GridItemType.FilteringItem)[0]
as
GridFilteringItem;
06.
RadComboBox combo = (RadComboBox)filterItem.FindControl(
"ErrorStatusFilter"
);
07.
combo.Items.FindItemByValue(
"No Errors"
).Checked =
false
;
08.
09.
gridviewRequests.MasterTableView.Rebind();
10.
}
Is RadPageLayout compatible with SharePoint 2010/2013 master-page and layouts?
I used below code in SharePoint project , it's working in desktop browsers but in mobile devices i got same desktop view not mobile view.
<telerik:RadPageLayout ID="RadPageLayout1" runat="server" HtmlTag="None" GridType="Fluid"
CssClass="t-rwd-tr t-rwd-overview">
<telerik:LayoutRow WrapperCssClass="t-rwd-white-row" WrapperHtmlTag="Div" RowType="Container">
<Rows>
<telerik:LayoutRow CssClass="t-rwd-row-pad" RowType="Generic">
<Content>
<h1>
Responsive Web Design new</h1>
</Content>
</telerik:LayoutRow>
<telerik:LayoutRow CssClass="t-rwd-row-pad">
<Columns>
<telerik:LayoutColumn Span="6" SpanSm="12" SpanXs="12">
<p>
In times when the sales of tablets and smartphones exceed the sales of desktop PCs,
when people use all kinds of mobile devices to browse the web and are allowed to
bring their own device to work, ASP.NET developers face the challenge of building
web applications targeting all screen resolutions.
</p>
<p>
No surprise “responsive web design” has become such a buzzword—it’s what enables
developers to build one website or app and deliver good user experience across all
browsers and devices.</p>
</telerik:LayoutColumn>
<telerik:LayoutColumn Span="6" HiddenSm="true" HiddenXs="true" CssClass="t-rwd-right">
<h5>Percentage of People Accessing the Web From Mobile Devices </h5>
<img style="max-width: 100%" src="https://commons.wikimedia.org/wiki/File:Dell_Logo.png"
alt="Percentage of People Accessing the Web From Mobile Devices" />
</telerik:LayoutColumn>
</Columns>
</telerik:LayoutRow>
</Rows>
</telerik:LayoutRow>
</telerik:RadPageLayout>
Best Regards
Ali
Customer is trying to download the data from radgrid on our page at the same institution,
one user works fine
the other user it downloads the aspx source file
have you seen this before.
Thanks in advance
Hi,
I'm currently working on a project where I need a radgrid with a couple of date columns. When the grid is in edit mode, the culture of the Datepickers however is always en-US. I need the culture to be nl-BE.
My columns are implemented as follows:
<
Telerik:GridDateTimeColumn
HeaderText
=
"Start Date"
UniqueName
=
"StartDate"
DataType
=
"System.DateTime"
DataFormatString
=
"{0:dd/MM/yyyy}"
></
Telerik:GridDateTimeColumn
>
I have tried setting the page culture, setting the culture of the grid in code and as suggested elsewhere on these forums the approach below
GridEditableItem item = e.Item as GridEditableItem;
RadDatePicker dpStartDate = item["StartDate"].Controls[0] as RadDatePicker;
dpStartDate.Culture = new CultureInfo("nl-BE");
All the datepickers on my form are correctly set to correct culture, except for the ones in the grid.
Am I doing something wrong?
Hi support,
We have upgraded our Telerik RadEditor to 2015.1.401.45 version.
We are facing issue in IE as mentioned below:
In IE when we select an image and change from Design to HTML mode or try to apply any paragraph style to it, the browser gets unresponsive.
I am able to reproduce the same behaviour with the Telerik demo: http://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx?skin=Default
Can you please help us in solving this issue ?
Regards,
Khush