<
telerik:RadTextBox
ID
=
"rtbAddress"
runat
=
"server"
Label
=
"Address:"
ToolTip
=
"Search for an address"
Width
=
"300px"
Columns
=
"200"
>
Hello,
I have a telerik rad grid on the page and when I click on ASP.NET dropdowns, I get an issue in the Telerik resources file on the following line.
Quarter 3 2009 is the controls we are using.
if
((typeof (_97.srcElement)!="undefined")&&(_97.srcElement!=null)){
Thanks
Thomas
Hi,
I wish to disable my radcombobox whilst the page loads, this is within a "usercontrol" and I am using jquery in the main page (which includes this control), and can use it here if that helps?
This returns a null reference for the combobox! I have looked at many threads to no avail, hopefully you can post an example for me.
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="buyersguidefinderUserControl.ascx.cs"
Inherits="usercontrol_seo_buyersguidefinderUserControl" %>
<div class="fl">
<telerik:RadComboBox ID="RadComboBox1" AllowCustomText="true" runat="server" Width="250px"
Height="300px" Filter="Contains" LoadingMessage="Finding Buyers Guide ..." EmptyMessage="Type which guide you would like to read..."
HighlightTemplatedItems="true" OnSelectedIndexChanged="RadComboBox1_SelectedIndexChanged"
AutoPostBack="true">
</telerik:RadComboBox>
</div>
<div class="guidesearchbtn fl">
<asp:Button ID="Button1" runat="server" Text="Go" OnClick="Button1_Click" /></div>
<script language="javascript" type="text/javascript">
// <!CDATA[
// disable control otherwise it breaks page state
var combo = $find("<%= RadComboBox1.ClientID %>");
combo.Disable();
$(document).ready(function() {
combo.Enable();
});
// ]]>
</script>
Thanks again,
Matt
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default1.aspx.cs" Inherits="_Default1" %>
<%@ 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">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
<
link
href
=
"Grid.Office2010Silver.css"
rel
=
"stylesheet"
type
=
"text/css"
/>
<
link
href
=
"Ajax.Office2010Silver.css"
rel
=
"stylesheet"
type
=
"text/css"
/>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
/>
<
div
>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadGrid1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid1"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
Visible
=
"true"
CssClass
=
"RadAjax_Office2010Silver"
MinDisplayTime
=
"2000"
Transparency
=
"1"
>
<
asp:Image
ID
=
"img"
runat
=
"server"
ImageUrl
=
"~/loading.gif"
/>
</
telerik:RadAjaxLoadingPanel
>
<
telerik:RadGrid
ID
=
"RadGrid1"
ShowFooter
=
"false"
CssClass
=
"RadGrid_Office2010Silver"
AllowMultiRowSelection
=
"false"
OnItemCommand
=
"RadGrid1_ItemCommand"
AllowPaging
=
"true"
AllowSorting
=
"true"
PageSize
=
"10"
runat
=
"server"
OnPageIndexChanged
=
"RadGrid1_PageIndexChanged"
EnableAjaxSkinRendering
=
"false"
AllowCustomPaging
=
"True"
OnPageSizeChanged
=
"RadGrid1_PageSizeChanged"
OnNeedDataSource
=
"RadGrid1_NeedDataSource"
>
<
PagerStyle
Mode
=
"NextPrevAndNumeric"
/>
<
ClientSettings
EnableRowHoverStyle
=
"true"
>
<
Scrolling
AllowScroll
=
"True"
UseStaticHeaders
=
"True"
ScrollHeight
=
"200"
SaveScrollPosition
=
"true"
FrozenColumnsCount
=
"3"
></
Scrolling
>
<
Selecting
AllowRowSelect
=
"true"
/>
</
ClientSettings
>
<
MasterTableView
DataKeyNames
=
"EmployeeID"
AutoGenerateColumns
=
"false"
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"EmployeeID"
UniqueName
=
"EmployeeID"
HeaderText
=
"EmployeeID"
HeaderStyle-HorizontalAlign
=
"Center"
ItemStyle-HorizontalAlign
=
"Center"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"FirstName"
HeaderStyle-HorizontalAlign
=
"Center"
ItemStyle-HorizontalAlign
=
"Center"
UniqueName
=
"FirstName"
HeaderText
=
"FirstName"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"LastName"
UniqueName
=
"LastName"
HeaderText
=
"LastName"
HeaderStyle-HorizontalAlign
=
"Center"
ItemStyle-HorizontalAlign
=
"Center"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Address"
UniqueName
=
"Address"
HeaderText
=
"Address"
HeaderStyle-HorizontalAlign
=
"Center"
ItemStyle-HorizontalAlign
=
"Center"
>
</
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
</
div
>
</
form
>
</
body
>
</
html
>
<
telerik:radgrid
ID
=
"gradeGrid"
runat
=
"server"
AllowPaging
=
"True"
GridLines
=
"None"
CellPadding
=
"5"
AutoGenerateColumns
=
"false"
Width
=
"850px"
Skin
=
"Metro"
>
</
telerik:radgrid
>
<
asp:SqlDataSource
ID
=
"SqlDataSource1"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:connection %>">
</
asp:SqlDataSource
>
Dim
conn = System.Configuration.ConfigurationManager.ConnectionStrings(
"connection"
).ToString
'this sub adds a column to the rad grid
Protected
Friend
Sub
addColumn(
ByVal
dataField
As
String
,
ByVal
header
As
String
)
Dim
col
As
New
GridBoundColumn
col.DataField = dataField
col.HeaderText = header
gradeGrid.MasterTableView.Columns.Add(col)
End
Sub
'addColumn
Protected
Sub
Page_Load(
ByVal
sender
As
Object
,
ByVal
e
As
System.EventArgs)
Handles
Me
.Load
If
(
Not
Page.IsPostBack)
Then
bindGrid()
gradeGrid.DataBind()
End
If
'if its not a post back
End
Sub
'this sub gets the data for the rad grid
Protected
Sub
bindGrid()
Dim
reader
As
SqlDataReader
'add the columns we know about
addColumn(
"lgrade"
,
"Letter Grade"
)
addColumn(
"ngrade"
,
"Percent Grade"
)
addColumn(
"Course Code"
,
"sectno"
)
addColumn(
"Completed"
,
"enddate"
)
Dim
itemSql =
"SELECT lgrade, ngrade, sectno, enddate, "
'now find all the other ones we need
Dim
sql =
"SELECT columnName, label FROM hstuclsDefinedColumns ORDER BY position"
Using myconn
As
New
SqlConnection(conn)
myconn.Open()
reader =
New
SqlCommand(sql, myconn).ExecuteReader()
If
(reader.HasRows)
Then
While
reader.Read()
addColumn(reader(
"columnName"
), reader(
"label"
))
itemSql &=
"["
& reader(
"columnName"
) &
"]"
&
", "
End
While
'reader.read
reader.Close()
End
If
'if reader.hasrows
itemSql &=
" 'blah' FROM hstucls WHERE stuid = "
& MyFunctions.getStudentId
myconn.Close()
End
Using
'using myconn
SqlDataSource1.SelectCommand = itemSql
gradeGrid.DataSource = SqlDataSource1
End
Sub
'bindGrid
Protected
Sub
gradeGrid_NeedDataSource(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.Web.UI.GridNeedDataSourceEventArgs)
Handles
gradeGrid.NeedDataSource
bindGrid()
End
Sub
<
telerik:RadScheduler
runat
=
"server"
ID
=
"RadScheduler1"
Width
=
"100%"
Height
=
"100%"
Enabled
=
"false"
DayStartTime
=
"08:00:00"
DayEndTime
=
"22:00:00"
WorkDayStartTime
=
"08:00:00"
WorkDayEndTime
=
"22:00:00"
FirstDayOfWeek
=
"Monday"
LastDayOfWeek
=
"Friday"
HoursPanelTimeFormat
=
"HH:mm"
ShowViewTabs
=
"true"
StartInsertingInAdvancedForm
=
"true"
StartEditingInAdvancedForm
=
"true"
ShowAllDayRow
=
"false"
Culture
=
"nl-NL"
OnDataBinding
=
"RadScheduler1_DataBinding"
OnAppointmentDataBound
=
"RadScheduler1_AppointmentDataBound"
OnClientFormCreated
=
"schedulerFormCreated"
CustomAttributeNames
=
"intSelectedProspectID,intSelectedLocID,RecurrenceRule,id_prospect,strLine1, strLine2, strLine3, strCSS, strBezichtingPand, strTelefoon1, strTelefoon2"
EnableDescriptionField
=
"true"
AppointmentStyleMode
=
"Default"
OnAppointmentUpdate
=
"RadScheduler1_AppointmentUpdate"
OnRecurrenceExceptionCreated
=
"RadScheduler1_OnRecurrenceExceptionCreated"
OnAppointmentInsert
=
"RadScheduler1_AppointmentInsert"
OnAppointmentCreated
=
"RadScheduler1_AppointmentCreated"
OnFormCreated
=
"RadScheduler1_FormCreated"
>
<
AdvancedForm
Modal
=
"false"
/>
<
Reminders
Enabled
=
"false"
/>
<
AdvancedEditTemplate
>
<
scheduler:AdvancedForm
runat
=
"server"
ID
=
"AdvancedEditForm1"
Mode
=
"Edit"
Subject='<%# Bind("Subject") %>'
Description='<%# Bind("Description") %>' Start='<%# Bind("Start") %>' End='<%# Bind("End") %>'
RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' UserID='<%# Bind("intPersoneelID") %>'
RoomID='<%# Bind("intKamerID") %>' AfspraakType='<%# Bind("intAfspraakTypeID") %>'
ProspectID='<%# Bind("id_prospect") %>' Locatie='<%# Bind("intLocatieID") %>' />
</
AdvancedEditTemplate
>
<
AdvancedInsertTemplate
>
<
scheduler:AdvancedForm
runat
=
"server"
ID
=
"AdvancedInsertForm1"
Mode
=
"Insert"
Subject='<%# Bind("Subject") %>'
Start='<%# Bind("Start") %>' End='<%# Bind("End") %>' Description='<%# Bind("Description") %>'
RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' UserID='<%# Bind("intPersoneelID") %>'
RoomID='<%# Bind("intKamerID") %>' AfspraakType='<%# Bind("intAfspraakTypeID") %>'
ProspectID='<%# Bind("id_prospect") %>' Locatie='<%# Bind("intLocatieID") %>' />
</
AdvancedInsertTemplate
>
<
AppointmentTemplate
>
<
div
class
=
"rsAptSubject"
>
<%# Eval("strLine1") %></
div
>
<
div
>
<%# Eval("strLine2") %></
div
>
<
div
>
<%# Eval("strLine3") %></
div
>
</
AppointmentTemplate
>
<
TimelineView
UserSelectable
=
"false"
/>
<
TimeSlotContextMenuSettings
EnableDefault
=
"true"
/>
<
AppointmentContextMenuSettings
EnableDefault
=
"true"
/>
</
telerik:RadScheduler
>
protected
void
RadScheduler1_AppointmentInsert(
object
sender, Telerik.Web.UI.SchedulerCancelEventArgs e)
{
try
{
ArrayList paramList =
new
ArrayList();
paramList.Add(
new
SqlParameter(
"@afspraakdatum"
, Convert.ToDateTime(e.Appointment.Start.ToShortDateString() +
" "
+ e.Appointment.Start.ToShortTimeString())));
paramList.Add(
new
SqlParameter(
"@afspraakdatumEind"
, Convert.ToDateTime(e.Appointment.End.ToShortDateString() +
" "
+ e.Appointment.End.ToShortTimeString())));
paramList.Add(
new
SqlParameter(
"@intAfspraakTypeID"
, Supervisor.convInt32DBNULL(e.Appointment.Attributes[
"intAfspraakTypeID"
])));
paramList.Add(
new
SqlParameter(
"@strAfspraakOnderwerp"
, Supervisor.convStringDBNULL(e.Appointment.Subject)));
paramList.Add(
new
SqlParameter(
"@afspraakopmerkingen"
, Supervisor.convStringDBNULL(e.Appointment.Description)));
paramList.Add(
new
SqlParameter(
"@adviseur_id"
, Supervisor.convInt32DBNULL(e.Appointment.Attributes[
"intPersoneelID"
])));
paramList.Add(
new
SqlParameter(
"@fiat"
, fiat));
paramList.Add(
new
SqlParameter(
"@intKamerID"
, Supervisor.convInt32DBNULL(e.Appointment.Attributes[
"intKamerID"
])));
paramList.Add(
new
SqlParameter(
"@intLocatie"
, Supervisor.convInt32DBNULL(e.Appointment.Attributes[
"intLocatieID"
])));
paramList.Add(
new
SqlParameter(
"@id_prospect"
, Supervisor.convInt32DBNULL(e.Appointment.Attributes[
"id_prospect"
])));
paramList.Add(
new
SqlParameter(
"@RecurrenceRule"
, Supervisor.convStringDBNULL(e.Appointment.RecurrenceRule)));
paramList.Add(
new
SqlParameter(
"@RecurrenceParentKeyField"
, Supervisor.convStringDBNULL(e.Appointment.RecurrenceParentID)));
string
strSQL =
"exec sp_insAfspraakFromPlan4 @afspraakdatum, @afspraakdatumEind, @intAfspraakTypeID, @strAfspraakOnderwerp, @afspraakopmerkingen, @id_prospect, @adviseur_id, @fiat, @intKamerID, @intLocatie,@RecurrenceRule,@RecurrenceParentKeyField"
;
string
foutmelding = MSSQL_Comm.ExecuteNonQuery(strSQL, paramList,
"ConnWB"
);
if
(foutmelding.Length > 0)
{
e.Cancel =
true
;
Label Label1 =
new
Label();
Label1.Text = foutmelding;
//NOT WORKING YET!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ScriptManager.RegisterClientScriptBlock(
this
, GetType(),
"LabelUpdated"
,
"$telerik.$('.lblError').show().animate({ opacity: 0.9 }, 2000).fadeOut('slow');"
,
true
);
}
}
catch
(Exception ex)
{
e.Cancel =
true
;
Label Label1 =
new
Label();
Label1.Text = ex.Message;
//NOT WORKING YET!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ScriptManager.RegisterClientScriptBlock(
this
, GetType(),
"LabelUpdated"
,
"$telerik.$('.lblError').show().animate({ opacity: 0.9 }, 2000).fadeOut('slow');"
,
true
);
}
}
protected
void
RadScheduler1_AppointmentUpdate(
object
sender, Telerik.Web.UI.AppointmentUpdateEventArgs e)
{
try
{
ArrayList paramList =
new
ArrayList();
paramList.Add(
new
SqlParameter(
"@afspraakdatum"
, Convert.ToDateTime(e.ModifiedAppointment.Start.ToShortDateString() +
" "
+ e.ModifiedAppointment.Start.ToShortTimeString())));
paramList.Add(
new
SqlParameter(
"@afspraakdatumEind"
, Convert.ToDateTime(e.ModifiedAppointment.End.ToShortDateString() +
" "
+ e.ModifiedAppointment.End.ToShortTimeString())));
paramList.Add(
new
SqlParameter(
"@intAfspraakTypeID"
, Supervisor.convInt32DBNULL(e.ModifiedAppointment.Attributes[
"intAfspraakTypeID"
])));
paramList.Add(
new
SqlParameter(
"@strAfspraakOnderwerp"
, Supervisor.convStringDBNULL(e.ModifiedAppointment.Subject)));
paramList.Add(
new
SqlParameter(
"@afspraakopmerkingen"
, Supervisor.convStringDBNULL(e.ModifiedAppointment.Description)));
paramList.Add(
new
SqlParameter(
"@adviseur_id"
, Supervisor.convInt32DBNULL(e.ModifiedAppointment.Attributes[
"intPersoneelID"
])));
paramList.Add(
new
SqlParameter(
"@fiat"
, 1));
paramList.Add(
new
SqlParameter(
"@intKamerID"
, Supervisor.convInt32DBNULL(e.ModifiedAppointment.Attributes[
"intKamerID"
])));
paramList.Add(
new
SqlParameter(
"@intLocatie"
, Supervisor.convInt32DBNULL(e.ModifiedAppointment.Attributes[
"intLocatieID"
])));
paramList.Add(
new
SqlParameter(
"@id_prospect"
, Supervisor.convInt32DBNULL(e.ModifiedAppointment.Attributes[
"id_prospect"
])));
paramList.Add(
new
SqlParameter(
"@id"
, e.ModifiedAppointment.ID));
paramList.Add(
new
SqlParameter(
"@RecurrenceRule"
, Supervisor.convStringDBNULL(e.ModifiedAppointment.RecurrenceRule)));
paramList.Add(
new
SqlParameter(
"@RecurrenceParentKeyField"
, Supervisor.convStringDBNULL(e.ModifiedAppointment.RecurrenceParentID)));
string
strSQL =
"exec sp_updAfspraakFromPlan3 @afspraakdatum, @afspraakdatumEind, @intAfspraakTypeID, @strAfspraakOnderwerp, @afspraakopmerkingen, @id_prospect, @adviseur_id, @fiat, @intKamerID, @id, @RecurrenceRule, @RecurrenceParentKeyField"
;
string
foutmelding = MSSQL_Comm.ExecuteNonQuery(strSQL, paramList,
"ConnWB"
);
if
(foutmelding.Length > 0)
{
e.Cancel =
true
;
Label Label1 =
new
Label();
Label1.Text = foutmelding;
ScriptManager.RegisterClientScriptBlock(
this
, GetType(),
"LabelUpdated"
,
"$telerik.$('.lblError').show().animate({ opacity: 0.9 }, 2000).fadeOut('slow');"
,
true
);
}
}
catch
(Exception ex)
{
e.Cancel =
true
;
Label Label1 =
new
Label();
Label1.Text = ex.Message;
ScriptManager.RegisterClientScriptBlock(
this
, GetType(),
"LabelUpdated"
,
"$telerik.$('.lblError').show().animate({ opacity: 0.9 }, 2000).fadeOut('slow');"
,
true
);
}
}
protected
void
RadScheduler1_OnRecurrenceExceptionCreated(
object
sender, Telerik.Web.UI.RecurrenceExceptionCreatedEventArgs e)
{
int
intMasterOccurrenceID = Convert.ToInt32(e.OccurrenceAppointment.ID);
string
RecurrenceRule = e.Appointment.RecurrenceRule;
string
newRecurrenceRule =
"?????????????????????????????????????????????????????"
;
e.Cancel =
true
;
}