I have a radgrid that I am dynamically creating in the Page_Init method as mentioned here. I have multiple templated columns that dispaly a label in the ItemTemplate and a RadComboBox and RadTimePicker in the EditItemTemplate. Both are properly displayed. However, on editing in batch mode, I am only able to get the value of the radcombobox and not of the time picker. I have noticed that the DataBinding events of my EditItemTemplate controls do not fire at all. Even the overridden ExtractValues method doesnt hit my breakpoint. Have attached the code..Any help is appreciated.
public
class
MyItemTemplate : IBindableTemplate
{
protected
Label lblProj;
private
string
colName;
public
MyItemTemplate(
string
cName)
{
colName = cName;
}
public
void
InstantiateIn(System.Web.UI.Control container)
{
lblProj =
new
Label();
lblProj.ID =
"ProjTime_"
+ colName;
lblProj.Width = Unit.Pixel(140);
lblProj.DataBinding +=
new
EventHandler(lblProj_DataBinding);
container.Controls.Add(lblProj);
}
void
lblProj_DataBinding(
object
sender, EventArgs e)
{
Label lblProj = (Label)sender;
GridDataItem container = (GridDataItem)lblProj.NamingContainer;
lblProj.Text = ((DataRowView)container.DataItem)[colName].ToString();
}
public
IOrderedDictionary ExtractValues(Control container)
{
OrderedDictionary values =
new
OrderedDictionary();
return
values;
}
}
public
class
MyEditTemplate : ITemplate
{
protected
RadComboBox PDay;
protected
static
string
date;
protected
static
string
time;
protected
RadTimePicker PTime;
private
string
colName;
public
MyEditTemplate(
string
cName)
{
colName = cName;
}
public
IOrderedDictionary ExtractValues(Control container)
{
//breakpoint here doesnt get hit
OrderedDictionary values =
new
OrderedDictionary();
return
values;
}
public
void
InstantiateIn(System.Web.UI.Control container)
{
PDay =
new
RadComboBox();
PDay.ID =
"PDay_"
+ colName;
PDay.Width = Unit.Pixel(150);
PDay.AllowCustomText =
true
;
PDay.DataBinding +=
new
EventHandler(PDay_DataBinding);
//adding Items to PDay.Items here
PTime =
new
RadTimePicker();
PTime .ID =
"PTime_"
+ colName;
PTime .Width = Unit.Pixel(100);
PTime .DataBinding +=
new
EventHandler(PTime_DataBinding);
PTime .DateInput.ReadOnly =
true
;
container.Controls.Add(PDay);
container.Controls.Add(PTime );
}
void
PTime_DataBinding(
object
sender, EventArgs e)
{
//breakpoint here doesnt get hit
RadTimePicker timePicker = (RadTimePicker)sender;
GridDataItem container = (GridDataItem)timePicker.NamingContainer;
timePicker.SelectedDate = Convert.ToDateTime(((DataRowView)container.DataItem)[colName].ToString());
}
public
void
PDay_DataBinding(
object
sender, EventArgs e)
{
//breakpoint here doesnt get hit
RadComboBox cBox = (RadComboBox)sender;
GridDataItem container = (GridDataItem)cBox.NamingContainer;
cBox.Text = ((DataRowView)container.DataItem)[colName].ToString();
}
}
<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Register Tagprefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2011.3.1115.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MyCustomUpload.aspx.cs" Inherits="LargeFileUploadSP.Layouts.LargeFileUploadSP.MyCustomUpload" DynamicMasterPageFile="~masterurl/default.master" %>
<
asp:Content
ID
=
"PageHead"
ContentPlaceHolderID
=
"PlaceHolderAdditionalPageHead"
runat
=
"server"
>
</
asp:Content
>
<
asp:Content
ID
=
"Main"
ContentPlaceHolderID
=
"PlaceHolderMain"
runat
=
"server"
>
<
telerik:RadProgressManager
ID
=
"Radprogressmanager1"
runat
=
"server"
/>
<
table
>
<
tr
>
<
td
>
<
telerik:RadUpload
ID
=
"RadUpload1"
runat
=
"server"
/>
</
td
>
<
td
>
<
div
>
<
asp:Label
ID
=
"labelNoResults"
runat
=
"server"
Visible
=
"True"
>No uploaded files yet</
asp:Label
>
<
asp:Repeater
ID
=
"repeaterResults"
runat
=
"server"
Visible
=
"False"
>
<
HeaderTemplate
>
<
div
>Uploaded files in the target folder:</
div
>
</
HeaderTemplate
>
<
ItemTemplate
>
<%#DataBinder.Eval(Container.DataItem, "FileName")%>
<%#DataBinder.Eval(Container.DataItem, "ContentLength").ToString() + " bytes"%>
<
br
/>
</
ItemTemplate
>
</
asp:Repeater
>
</
div
>
</
td
>
</
tr
>
</
table
>
<
div
class
=
"submitArea"
>
<
asp:Button
runat
=
"server"
ID
=
"SubmitButton"
Text
=
"Upload files"
OnClick
=
"SubmitButton_Click"
/>
</
div
>
<
telerik:RadProgressArea
runat
=
"server"
ID
=
"ProgressArea1"
>
</
telerik:RadProgressArea
>
</
asp:Content
>
<
asp:Content
ID
=
"PageTitle"
ContentPlaceHolderID
=
"PlaceHolderPageTitle"
runat
=
"server"
>
My custom upload page
</
asp:Content
>
<
asp:Content
ID
=
"PageTitleInTitleArea"
ContentPlaceHolderID
=
"PlaceHolderPageTitleInTitleArea"
runat
=
"server"
>
My custom upload page
</
asp:Content
>
using
System;
using
Microsoft.SharePoint;
using
Microsoft.SharePoint.WebControls;
using
System.Web.UI;
using
Telerik.Web.UI;
namespace
LargeFileUploadSP.Layouts.LargeFileUploadSP
{
public
partial
class
MyCustomUpload : LayoutsPageBase
{
private
ScriptManager scriptManager;
protected
void
Page_Load(
object
sender, EventArgs e)
{
RadUpload1.TargetPhysicalFolder = @
"C:\telerik_uploads\"
;
}
protected
void
SubmitButton_Click(
object
sender, EventArgs e)
{
if
(RadUpload1.UploadedFiles.Count > 0)
{
repeaterResults.DataSource = RadUpload1.UploadedFiles;
repeaterResults.DataBind();
labelNoResults.Visible =
false
;
repeaterResults.Visible =
true
;
}
else
{
labelNoResults.Visible =
true
;
repeaterResults.Visible =
false
;
}
}
}
}
<
system.webServer
>
<
security
>
<
requestFiltering
allowDoubleEscaping
=
"true"
>
<
requestLimits
maxAllowedContentLength
=
"2147483647"
/>
</
requestFiltering
>
</
security
>
...
<
httpRuntime
maxRequestLength
=
"1024000"
executionTimeout
=
"3600"
/>
...
<
modules
runAllManagedModulesForAllRequests
=
"true"
>
...
<!-- For Telerik RadUpload control -->
<
add
name
=
"RadUploadHttpModule"
type
=
"Telerik.Web.UI.SPRadUploadHttpModule, Telerik.Web.UI, Version=2011.3.1115.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
preCondition
=
"integratedMode"
/>
</
modules
>
<
handlers
>
...
<!-- For Telerik RadUpload control -->
<
add
path
=
"Telerik.RadUploadProgressHandler.ashx"
type
=
"Telerik.Web.UI.RadUploadProgressHandler, Telerik.Web.UI, Version=2011.3.1115.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
verb
=
"*"
preCondition
=
"integratedMode"
name
=
"Telerik_RadUploadProgressHandler_ashx"
/>
</
handlers
>
</
system.webServer
>
<
location
path
=
"Telerik.RadUploadProgressHandler.ashx"
>
<
system.web
>
<
authorization
>
<
allow
users
=
"*"
/>
</
authorization
>
</
system.web
>
</
location
>
<
location
path
=
"WebResource.axd"
>
<
system.web
>
<
authorization
>
<
allow
users
=
"*"
/>
</
authorization
>
</
system.web
>
</
location
>
<
location
path
=
"Telerik.Web.UI.WebResource.axd"
>
<
system.web
>
<
authorization
>
<
allow
users
=
"*"
/>
</
authorization
>
</
system.web
>
</
location
>
<
section
name
=
"requestFiltering"
overridemodedefault
=
"Allow"
/>
Hi Telerik Team
I am getting the combo Box Design different in Chrome and Firefox and i haven't tried with other browsers Check the ​attached image for clear idea.
Actually the design come perfect in chrome and as coming to Firefox the text is displayed in next line.
Please help to solve this .
Thank You in Advance .
The scenarios:
I have a MasterTableView and it contains one DetailsTable. And the GridTableView contains a button in its CommandItemTemplate section. I want to fetch the parent table ID (MasterTableView) against the button click in the hierarchical child table (GridTableView). The e.CommandArgument property in the grid's ItemCommand event is empty.
The markup for the CommandItemTemplate is below:
<CommandItemTemplate>
<div style="padding: 5px 5px; text-align:right" >
<asp:Button ID="btnSaveAction" runat="server" SkinID="Save"
CausesValidation="false" Text='​Save' CommandName="​Save" CommandArgument='<%# Eval("ID") %>' />
</div>
</CommandItemTemplate>​
<
script
type
=
"text/javascript"
>
function closeCustomConfirm() {
$find("<%=rwApproveInstance.ClientID %>").close();
}
function ShowRadWindow() {
var oWnd = $find("<%=rwApproveInstance.ClientID %>");
oWnd.show();
}
</
script
>
<
telerik:RadWindowManager
runat
=
"server"
ID
=
"RadWindowManager1"
>
<
Windows
>
<
telerik:RadWindow
ID
=
"rwApproveInstance"
Modal
=
"true"
Behaviors
=
"Close, Move"
VisibleStatusbar
=
"false"
Width
=
"800px"
Height
=
"700px"
runat
=
"server"
ReloadOnShow
=
"True"
ShowContentDuringLoad
=
"False"
>
<
ContentTemplate
>
<
div
class
=
"rwDialogPopup radconfirm"
>
<
div
>
<
telerik:RadGrid
ID
=
"rgApprovalInstance"
runat
=
"server"
AutoGenerateColumns
=
"False"
CellSpacing
=
"0"
GridLines
=
"None"
OnNeedDataSource
=
"rgApprovalInstance_NeedDataSource"
>
<
MasterTableView
DataKeyNames
=
"FieldName"
>
<
CommandItemSettings
ExportToPdfText
=
"Export to PDF"
></
CommandItemSettings
>
<
RowIndicatorColumn
Visible
=
"True"
FilterControlAltText
=
"Filter RowIndicator column"
>
<
HeaderStyle
Width
=
"20px"
></
HeaderStyle
>
</
RowIndicatorColumn
>
<
ExpandCollapseColumn
Visible
=
"True"
FilterControlAltText
=
"Filter ExpandColumn column"
>
<
HeaderStyle
Width
=
"20px"
></
HeaderStyle
>
</
ExpandCollapseColumn
>
<
Columns
>
<
telerik:GridBoundColumn
AllowFiltering
=
"False"
AllowSorting
=
"False"
FilterControlAltText
=
"Filter FieldName column"
Groupable
=
"False"
HeaderText
=
"FieldName"
UniqueName
=
"FieldName"
DataField
=
"FieldName"
>
<
HeaderStyle
CssClass
=
"documents-table"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
AllowFiltering
=
"False"
AllowSorting
=
"False"
DataField
=
"FieldValue"
FilterControlAltText
=
"Filter FieldValue column"
Groupable
=
"False"
HeaderText
=
"FieldValue"
ReadOnly
=
"True"
UniqueName
=
"FieldValue"
>
<
HeaderStyle
CssClass
=
"documents-table"
/>
</
telerik:GridBoundColumn
>
</
Columns
>
<
EditFormSettings
>
<
EditColumn
FilterControlAltText
=
"Filter EditCommandColumn column"
>
</
EditColumn
>
</
EditFormSettings
>
</
MasterTableView
>
</
telerik:RadGrid
>
</
div
>
<
div
>
<
telerik:RadButton
runat
=
"server"
ID
=
"rbConfirm_Cancel"
Text
=
"Close"
OnClientClicked
=
"closeCustomConfirm"
>
</
telerik:RadButton
>
</
div
>
</
div
>
</
ContentTemplate
>
</
telerik:RadWindow
>
</
Windows
>
</
telerik:RadWindowManager
>
i tried that code without radgrid and is working fine
<script type="text/javascript">
function sum() {
var txtFirstNumberValue = document.getElementById('txt1').value;
var txtSecondNumberValue = document.getElementById('txt2').value;
var result = parseInt(txtFirstNumberValue) + parseInt(txtSecondNumberValue);
if (!isNaN(result)) {
document.getElementById('txt3').value = result;
}
}
</script>
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If (Not Page.ClientScript.IsStartupScriptRegistered("test")) Then
Page.ClientScript.RegisterStartupScript(Me.GetType(), "test", "sum();", True)
End If
End Sub
But my problem was that i'm working with radgrid editform template, i have same 3 text boxes inside radgrid editform template, how to implement the above scenario with radgrid editform template
​
I'm trying to do a fluid slider where it adjust to screen size. According to the fluid design documentation, if I were to add the control on page, I simply need to set: Width="100%" RenderMode="Lightweight":
http://docs.telerik.com/devtools/aspnet-ajax/controls/slider/mobile-support/responsive,-adaptive-and-elastic-capabilities#fluid-design-with-radslider
This work fine, but I need to create the sliders dynamically. The problem here is when creating in code behind, the Width property is integer only, I can't set to percent, so it can only be set to pixels. Any workaround?
Thanks
Aaron
Hi,
How to fire an OnItemClick event of a RadMenu from code-behind?
Thank you,
ETS
New to the forums so hello to all. I have been using Telerik components for about 6 months now and have noticed an occasional hiccup with the scheduler and (I believe exclusively) IE.
I have attached a file with the worst case scenario. All of the contents of the calendar are squashed to the left of the view which results in a vertical blue line. Sometimes it is less severe with about 50% white space and 50% of the actual calendar so that the information can still be discerned, but just barely. This is not consistently reproducible for me and what works on one machine may not work on another with the same website and browser version.
Has anyone else experienced this? Are there any known IE tweaks or anything to help assist with this problem? I did a search but did not find anything pertaining to this issue so I appreciate any feedback. I am using product version 2010.3.1317.40
​