function OnKeyPress(key) { var e = window.event; if(e.keyCode==13) { if (e.srcElement.outerHTML.indexOf("AddNewRecordButton") > -1 || e.srcElement.outerHTML.indexOf("$InitInsertButton") > -1) { __doPostBack('ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl02$ctl00$InitInsertButton', ''); return false; } if (e.srcElement.outerHTML.indexOf("ctl02_CancelButton") > -1) { __doPostBack('ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl02$ctl02$CancelButton', ''); return false; } if (e.srcElement.outerHTML.indexOf("ctl04_CancelButton") > -1) { //__doPostBack('ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl04$CancelButton', ''); WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl04$CancelButton", "", true, "StateAllocationValidation", "", false, true)); return false; } if (e.srcElement.outerHTML.indexOf("$PerformInsertButton") > -1) { WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl02$ctl02$PerformInsertButton", "", true, "", "", false, true)); return false; } if (e.srcElement.outerHTML.indexOf("$EditButton") > -1) { __doPostBack('ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl04$EditButton', ''); return false; } if (e.srcElement.outerHTML.indexOf("Delete") > -1) { __doPostBack('ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl04$ctl00', ''); return false; } if (e.srcElement.outerHTML.indexOf("UpdateButton") > -1) { WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl04$UpdateButton", "", true, "StateAllocationValidation", "", false, true)); return false; } } }
string jsFunction =
@" //Search TAB //cmbSearchType - shows relevant input fields function DefineView(sender, eventArgs) {
var comboSearch = $find('%%cmbSearchType%%'); //cmbSearch Section switch (comboSearch.get_selectedItem().get_value()) { [[MY CODE HERE]
} }
function onPageLoad(){ $(document).ready(function(){ DefineView(); }); }";
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "SearchVisibilityPPSA",jsFunction.Replace("%%cmbSearchType%%", cmbSearchType.ClientID),true);
string onLoadScript = @"Sys.Application.add_load(function(){ onPageLoad();}) ";
ScriptManager.RegisterStartupScript(this, this.GetType(), "onLoadScript", onLoadScript, true);In some cases tooltip for close button in rad windows is not localized. For example it can be reproduced when opening RadFileUpload window and also when creating new folder in RadFileExplorer.
Steps to reproduce:
We also found in RadWindowLocalization class of Telerik.Web.UI project properties which are marked with Localize attribute. But for some reason it is not working.
Any ideas how to localize this tooltip? We think the problem is related to RadWindow localization.
Probably some additional resource file or new resource line should be added to App_GlobalResources for RadWindow localization?
On this screenshot you can see a problem. (tooltip on 'close' button)
<style type="text/css"> .rpItem .customHeaderItem:hover{ background-position: 0 -200px !important; cursor: pointer; } .rpFirst .customHeaderItem:hover{ background-position: 0 -201px !important; cursor: pointer; } .ItemCheckbox{ float: right; padding-right: 10px; } label{ font-style:normal; font-weight:normal; }</style> <telerik:RadPanelBar runat="server" ID="RadPanelBar1" Width="100%" Skin="Default" ExpandMode="MultipleExpandedItems"> <Items> <telerik:RadPanelItem CssClass="customHeaderItem" Expanded="true"> <HeaderTemplate> <span class="rpOut"> <span class="rpExpandHandle"></span> <asp:CheckBox runat="server" ID="chkIncludeItem1" Text="Include" Checked="true" CssClass="ItemCheckbox" /> <span class="rpText">Panel Item 1</span> </span> </HeaderTemplate> <ContentTemplate> <p>Content....</p> </ContentTemplate> </telerik:RadPanelItem> <telerik:RadPanelItem CssClass="customHeaderItem"> <HeaderTemplate> <span class="rpOut"> <span class="rpExpandHandle"></span> <asp:CheckBox runat="server" ID="chkIncludeItem2" Text="Include" Checked="true" CssClass="ItemCheckbox" /> <span class="rpText">Panel Item 2</span> </span> </HeaderTemplate> <ContentTemplate> <p>Content....</p> </ContentTemplate> </telerik:RadPanelItem> </Items></telerik:RadPanelBar><telerik:RadPanelBar runat="server" ID="RadPanelBar2" Width="50%" SkinID="Default" ExpandMode="MultipleExpandedItems"> <Items> <telerik:RadPanelItem Text="Item 1" Expanded="true"> <ContentTemplate> <p>Content...</p> </ContentTemplate> </telerik:RadPanelItem> <telerik:RadPanelItem Text="Item 2"> <ContentTemplate> <p>Content...</p> </ContentTemplate> </telerik:RadPanelItem> </Items> </telerik:RadPanelBar>Hi
I have a div with a CSS overflow: auto; and a rad grid, and other controls, inside with the grids scroll value set...
<ClientSettings>
<Scrolling AllowScroll="true" ScrollHeight="325px" />
</ClientSettings>
This causes the outer div to get a vertical scroll bar unnecessarily as if the grid height had been drawn in full rather than just 325px.
This does not happen in Chrome, only IE (I am specifically using IE9). It doesn't look like a telerik grid bug, but do you know a way to solve this?
Thanks
Russell Mason
<%@ Page EnableEventValidation="false" Language="C#" AutoEventWireup="true" MaintainScrollPositionOnPostback="true" CodeBehind="Dome1.aspx.cs" Inherits="WebApplication1.Dome1" %><%@ Import Namespace="System.Data" %><%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %><script runat="server"> protected void RadGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e) { DataTable dt = new DataTable(); DataRow dr; int colsNum = 12; int rowsNum = 10; string colName = "Column"; for (int j = 1; j <= colsNum; j++) { dt.Columns.Add(String.Format("{0}{1}", colName, j)); } for (int i = 1; i <= rowsNum; i++) { dr = dt.NewRow(); for (int k = 1; k <= colsNum; k++) { dr[String.Format("{0}{1}", colName, k)] = String.Format("{0}{1} Row{2}", colName, k, i); } dt.Rows.Add(dr); } (sender as RadGrid).DataSource = dt; } </script><!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 id="Head1" runat="server"> <%-- Comment the following line to remove the problem --%> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>RadGrid problem</title></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" OnNeedDataSource="RadGrid_NeedDataSource" Width="100%"> <MasterTableView TableLayout="fixed"> <Columns> <telerik:GridBoundColumn DataField="Column1" HeaderText="Header 1" /> <telerik:GridBoundColumn DataField="Column2" HeaderText="Header 2" /> </Columns> </MasterTableView> <HeaderStyle Width="200px" /> <ClientSettings> <Scrolling AllowScroll="true" UseStaticHeaders="true" /> </ClientSettings> </telerik:RadGrid> </form></body></html>
function OnItemSelected(sender, args) { var fexplorer = $find("<%=FileExplorer.ClientID %>"); var txtDocumentDescription = $find("<%=TxtActionDocumentDescription.ClientID %>"); // find the description from custom fields to set it var grid = fexplorer.get_grid(); var gridSelectedItems = grid.get_selectedItems(); var gridSelectedItem = gridSelectedItems[0]; var description = gridSelectedItem.get_dataItem()["Description"]; txtDocumentDescription.set_value(description);}