function Callme() {
var
Input1 = $find("<%= TextBox1.ClientID %>");
Input1.SetValue(15);
}
i am calling this onblur function of Textbox ,i have added attribute on page load as
TextBox1.Attributes.Add(
"onblur", "Callme();");
It is throughing an error Null object.
Please help me how to resolve this
<
telerik:RadCodeBlock
ID
=
"RadCodeBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function RowDblClick(sender, eventArgs)
{
sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
}
</
script
>
</
telerik:RadCodeBlock
>
<
telerik:RadGrid
ID
=
"rgKalkulation"
runat
=
"server"
AutoGenerateEditColumn
=
"false"
AutoGenerateDeleteColumn
=
"false"
OnNeedDataSource
=
"rgKalkulation_NeedDataSource"
AllowAutomaticDeletes
=
"True"
AllowAutomaticInserts
=
"True"
PageSize
=
"10"
AllowAutomaticUpdates
=
"True"
OnDeleteCommand
=
"rgKalkulation_DeleteCommand"
OnInsertCommand
=
"rgKalkulation_InsertCommand"
OnUpdateCommand
=
"rgKalkulation_UpdateCommand"
OnItemDataBound
=
"rgKalkulation_OnItemDataBound"
>
<
MasterTableView
CommandItemSettings-RefreshText
=
""
CommandItemDisplay
=
"Bottom"
AutoGenerateColumns
=
"false"
Font-Size
=
"8pt"
Font-Names
=
"Verdana"
runat
=
"server"
NoMasterRecordsText
=
"Keine Datensätze vorhanden."
InsertItemDisplay
=
"Bottom"
CommandItemSettings-AddNewRecordText
=
"Datensatz hinzufügen"
EditMode
=
"InPlace"
ShowGroupFooter
=
"true"
DataKeyNames
=
"id"
>
<
GroupByExpressions
>
<
telerik:GridGroupByExpression
>
<
SelectFields
>
<
telerik:GridGroupByField
HeaderText
=
"Art.-Gr."
FieldName
=
"artgrkopf"
></
telerik:GridGroupByField
>
</
SelectFields
>
<
GroupByFields
>
<
telerik:GridGroupByField
FieldName
=
"artgr"
SortOrder
=
"Ascending"
></
telerik:GridGroupByField
>
</
GroupByFields
>
</
telerik:GridGroupByExpression
>
</
GroupByExpressions
>
<
Columns
>
<
telerik:GridEditCommandColumn
ButtonType
=
"ImageButton"
UniqueName
=
"EditCommandColumn"
>
<
ItemStyle
CssClass
=
"MyImageButton"
/>
</
telerik:GridEditCommandColumn
>
<
telerik:GridBoundColumn
DataField
=
"artgr"
HeaderText
=
"ArtGr"
UniqueName
=
"artgr"
Visible
=
"false"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"artbzl"
HeaderText
=
"Artikelbezeichnung"
DefaultInsertValue
=
""
UniqueName
=
"artbzl"
FooterText
=
"Anzahl Artikel"
Aggregate
=
"Count"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"herstellerbezeichnung"
HeaderText
=
"Herstellerbezeichnung"
DefaultInsertValue
=
""
UniqueName
=
"herstellerbezeichnung"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"artext"
HeaderText
=
"Art.-Nr."
DefaultInsertValue
=
""
UniqueName
=
"artext"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"palettengewicht"
HeaderText
=
"Palettengewicht"
DefaultInsertValue
=
""
UniqueName
=
"palettengewicht"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"mdevsx"
HeaderText
=
"Inhalt"
DefaultInsertValue
=
""
UniqueName
=
"mdevsx"
>
</
telerik:GridBoundColumn
>
<
telerik:GridNumericColumn
HeaderText
=
"Absatz (to)"
DataField
=
"absatz"
ColumnEditorID
=
"GridNumericColumnEditor1"
UniqueName
=
"absatz"
>
</
telerik:GridNumericColumn
>
<
telerik:GridNumericColumn
HeaderText
=
"Nettoumsatz (T€)"
>
</
telerik:GridNumericColumn
>
<
telerik:GridNumericColumn
HeaderText
=
"Bruttoerlös (alt)"
>
</
telerik:GridNumericColumn
>
<
telerik:GridNumericColumn
HeaderText
=
"Nettoerlös (alt)"
>
</
telerik:GridNumericColumn
>
<
telerik:GridNumericColumn
HeaderText
=
"Bruttoerlös (neu)"
>
</
telerik:GridNumericColumn
>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
>
<
Scrolling
AllowScroll
=
"True"
UseStaticHeaders
=
"True"
ScrollHeight
=
"650px"
/>
<
ClientEvents
OnRowDblClick
=
"RowDblClick"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
<
telerik:GridNumericColumnEditor
ID
=
"GridNumericColumnEditor1"
runat
=
"server"
>
</
telerik:GridNumericColumnEditor
>
I need (quick) help please, because tomorrow I have a meeting where I have to present this.
Kind regards
Michael
i am trying to load the appointments thru an xml file, the xml file is generated dynamically and its displaying all the appointments. however the recurrence and the enddate time does not seem to work correctly, i have attached the xml for your reference please take a look and let me know what am i missing?
The Problem:
if the start time is 10:00AM and the end time is 11:00AM and the start date is 10/25/2010 and the end date is 10/30/2010, the recurrence rule is not stopping on the end date, but continues infinetely. if i want an event to span 6 days continously from say 10/25 - 10/30 at 10:00AM to 11:00AM
what should be value of
<Start> tag?
<End> tag?
<RecurrenceRule>DTSTART:?
<RecurrenceRule>DTEND:?
<RecurrenceRule>UNTIL:?
<?
xml version="1.0" encoding="utf-8"?><Appointments><Resources><Resource><Key>1</Key><Text>Classes</Text></Resource><Resource><Key>2</Key><Text>Workshops</Text></Resource><Resource><Key>3</Key><Text>Salon Series</Text></Resource><Resource><Key>4</Key><Text>Teachers Symposium</Text></Resource><Resource><Key>5</Key><Text>Kids Art Camp</Text></Resource><Resource><Key>6</Key><Text>Teen Art Camp</Text></Resource><Resource><Key>7</Key><Text>Portfolio Development</Text></Resource><Resource><Key>8</Key><Text>Spring Break Art Camp</Text></Resource><Resource><Key>9</Key><Text>Summer Saturday Art Camp</Text></Resource><Resource><Key>10</Key><Text>Exhibitions</Text></Resource><Resource><Key>11</Key><Text>Events</Text></Resource><Resource><Key>12</Key><Text>Alerts</Text></Resource></Resources><Appointment><ID>1</ID><Subject>Test Event</Subject><Description>some Description<br/><a href='http://www.google.com'>Click here for more details</a></Description><Start>2010-09-25T11:30Z</Start><End>2010-09-26T14:00Z</End><RecurrenceRule>
<
![CDATA[
DTSTART:20100925T113000Z
DTEND:20100925T140000Z
RRULE:FREQ=DAILY;UNTIL:20100926T140000Z;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR,SA,SU]]
>
</
RecurrenceRule><Resources><Resource Key="4" /></Resources></Appointment><Appointment><ID>2</ID><Subject>Sunday Event</Subject><Description>sample event</Description><Start>2010-09-26T10:00Z</Start><End>2010-09-26T11:00Z</End><RecurrenceRule>
<
![CDATA[
DTSTART:20100926T100000Z
DTEND:20100926T110000Z
RRULE:FREQ=DAILY;UNTIL:20100926T110000Z;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR,SA,SU]]
>
</
RecurrenceRule><Resources><Resource Key="12" /></Resources></Appointment><Appointment><ID>3</ID><Subject>Special Event</Subject><Description>some description</Description><Start>2010-09-28T15:00Z</Start><End>2010-09-28T19:30Z</End><RecurrenceRule>
<
![CDATA[
DTSTART:20100928T150000Z
DTEND:20100928T193000Z
RRULE:FREQ=DAILY;UNTIL:20100928T193000Z;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR,SA,SU]]
>
</
RecurrenceRule><Resources><Resource Key="10" /></Resources></Appointment><Appointment><ID>4</ID><Subject>testing recurrence</Subject><Description>testing recurrence</Description><Start>2010-10-18T10:30Z</Start><End>2010-10-30T12:45Z</End><RecurrenceRule>
<
![CDATA[
DTSTART:20101018T103000Z
DTEND:20101018T124500Z
RRULE:FREQ=DAILY;UNTIL:20101030T124500Z;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR,SA,SU]]
>
</
RecurrenceRule><Resources><Resource Key="12" /></Resources></Appointment><Appointment><ID>5</ID><Subject>second event</Subject><Description>second event</Description><Start>2010-10-25T10:00Z</Start><End>2010-10-29T11:15Z</End><RecurrenceRule>
<
![CDATA[
DTSTART:20101025T100000Z
DTEND:20101025T111500Z
RRULE:FREQ=DAILY;UNTIL:20101029T111500Z;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR,SA,SU]]
>
</
RecurrenceRule><Resources><Resource Key="11" /></Resources></Appointment></Appointments>
public static string GetRecurranceString(DateTime StartDate, DateTime EndDate, string StartTime,string EndTime)
{
StringBuilder sb = new StringBuilder();
StringBuilder RecStr = new StringBuilder();
RecStr.Append(
"\r\n<![CDATA[");
sb.Append(StartDate.Month.ToString()).Append(
"/");
sb.Append(StartDate.Day.ToString()).Append(
"/");
sb.Append(StartDate.Year.ToString()).Append(
" ");
sb.Append(StartTime.Replace(
"AM", ":00 AM").Replace("PM", ":00 PM"));
DateTime mystartdate = Convert.ToDateTime(sb.ToString());
RecStr.Append(
"\r\nDTSTART:" + mystartdate.ToString("yyyyMMddTHHmm00Z"));
StringBuilder eb = new StringBuilder();
eb.Append(StartDate.Month.ToString()).Append(
"/");
eb.Append(StartDate.Day.ToString()).Append(
"/");
eb.Append(StartDate.Year.ToString()).Append(
" ");
eb.Append(EndTime.Replace(
"AM", ":00 AM").Replace("PM", ":00 PM"));
DateTime myenddate = Convert.ToDateTime(eb.ToString());
StringBuilder until = new StringBuilder();
until.Append(EndDate.Month.ToString()).Append(
"/");
until.Append(EndDate.Day.ToString()).Append(
"/");
until.Append(EndDate.Year.ToString()).Append(
" ");
until.Append(EndTime.Replace(
"AM", ":00 AM").Replace("PM", ":00 PM"));
DateTime myuntildate = Convert.ToDateTime(until.ToString());
RecStr.Append(
"\r\nDTEND:" + myenddate.ToString("yyyyMMddTHHmm00Z"));
RecStr.Append(
"\r\nRRULE:FREQ=DAILY;").Append("UNTIL:" + myuntildate.ToString("yyyyMMddTHHmm00Z")).Append(";INTERVAL=1;BYDAY=MO,TU,WE,TH,FR,SA,SU");
RecStr.Append(
"]]>\r\n");
return RecStr.ToString();
}
function
returnToParent() {
//create the argument that will be returned to the parent page
var
oArg =
new
Object();
//THE NULL OBJECT ERROR IS ON THIS LINE
var
gridView = $find(
"<%= RdGRoles.ClientID %>"
).get_masterTableView();
oArg.selGroup = gridView.get_selectedItems();
//get a reference to the current RadWindow
var
oWnd = GetRadWindow();
oWnd.close(oArg);
}
Protected
Sub
btnOk_Click(
ByVal
sender
As
Object
,
ByVal
e
As
System.EventArgs)
Handles
btnOk.Click
ClientScript.RegisterStartupScript(Page.
GetType
(),
"mykey"
,
"returnToParent();"
,
True
)
End
Sub