<
telerik:RadGrid
ID
=
"RadGrid2"
Skin
=
"Vista"
runat
=
"server"
ShowFooter
=
"true"
CommandItemStyle-HorizontalAlign
=
"Center"
Width
=
"200px"
>
<
MasterTableView
ShowFooter
=
"true"
CommandItemDisplay
=
"bottom"
EditMode
=
"InPlace"
>
<
CommandItemTemplate
>
<
asp:LinkButton
ID
=
"LinkButton1"
Visible
=
"false"
CommandName
=
"CalculDistance"
Runat
=
"server"
CssClass
=
"TexteBlanc16"
>Calculer</
asp:LinkButton
>
</
CommandItemTemplate
>
<
Columns
>
<
telerik:GridTemplateColumn
UniqueName
=
"CodePostal"
HeaderText
=
"Destinations"
>
<
ItemTemplate
>
<
asp:DropDownList
ID
=
"LstCodePostal"
runat
=
"server"
></
asp:DropDownList
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
<
asp:Panel
ID
=
"Panel1"
runat
=
"server"
>
<
asp:LinkButton
ID
=
"LKBtnAjouterDestination"
runat
=
"server"
>Ajouter une destination</
asp:LinkButton
>
<
asp:LinkButton
ID
=
"LKBtnEnleverDestination"
runat
=
"server"
>Enlever une destination</
asp:LinkButton
>
</
asp:Panel
>
Public
dt
As
DataTable
Protected
Sub
Page_Load(
ByVal
sender
As
Object
,
ByVal
e
As
System.EventArgs)
Handles
Me
.Load
If
Not
IsPostBack =
True
Then
dt =
New
DataTable()
dt.Columns.Add(
New
DataColumn(
"RowNumber"
,
GetType
(
String
)))
AjouterLigne(dt)
End
If
Private
Sub
LKBtnAjouterDestination_Click(
ByVal
sender
As
Object
,
ByVal
e
As
System.EventArgs)
Handles
LKBtnAjouterDestination.Click
Dim
countitem
As
Integer
Dim
dt
As
DataTable =
DirectCast
(ViewState(
"dt"
), DataTable)
countitem = RadGrid2.Items.Count
Dim
cpt
As
Integer
= 0
For
Each
Item
As
GridDataItem
In
RadGrid2.Items
Dim
Lstcode
As
DropDownList =
DirectCast
(Item(
"CodePostal"
).FindControl(
"LstCodePostal"
), DropDownList)
If
Not
(Lstcode.Text
Is
Nothing
)
And
Lstcode.Text <>
""
Then
liste.Add(Lstcode.Text)
End
If
Next
ViewState(
"dt"
) = AjouterLigne(dt)
listcount = liste.Count
RadGrid2.Rebind()
While
cpt < listcount
Dim
Lstcode
As
DropDownList =
DirectCast
(RadGrid2.Items(cpt)(
"CodePostal"
).FindControl(
"LstCodePostal"
), DropDownList)
Lstcode.Text = liste.Item(cpt)
cpt = cpt + 1
End
While
End
Sub
Private
Sub
LKBtnEnleverDestination_Click(
ByVal
sender
As
Object
,
ByVal
e
As
System.EventArgs)
Handles
LKBtnEnleverDestination.Click
Dim
countitem
As
Integer
Dim
dt
As
DataTable =
DirectCast
(ViewState(
"dt"
), DataTable)
countitem = RadGrid2.Items.Count
ViewState(
"dt"
) = EnleverLigne(dt, countitem)
listcount = liste.Count
RadGrid2.Rebind()
End
Sub
Public
Function
AjouterLigne(
ByVal
dt
As
DataTable)
As
DataTable
' method to create row
Dim
dr
As
DataRow = dt.NewRow()
dr(
"RowNumber"
) =
""
dt.Rows.Add(dr)
Return
dt
End
Function
Public
Function
EnleverLigne(
ByVal
dt
As
DataTable,
ByVal
IndexDernier
As
Integer
)
As
DataTable
' method to delete row
If
IndexDernier > 0
Then
dt.Rows(IndexDernier - 1).Delete()
End
If
Return
dt
End
Function
Private
Sub
RadGrid2_ColumnCreated(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.Web.UI.GridColumnCreatedEventArgs)
Handles
RadGrid2.ColumnCreated
If
(e.Column.UniqueName =
"RowNumber"
)
Then
e.Column.Visible =
False
End
If
End
Sub
Private
Sub
RadGrid2_ItemDataBound(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.Web.UI.GridItemEventArgs)
Handles
RadGrid2.ItemDataBound
Dim
cpt
As
Integer
= 0
Do
While
cpt < RadGrid2.Items.Count
'Dim Lstcode As DropDownList = DirectCast(Item("CodePostal").FindControl("LstCodePostal"), DropDownList)
Dim
Lstcode
As
DropDownList =
DirectCast
(RadGrid2.Items(cpt)(
"CodePostal"
).FindControl(
"LstCodePostal"
), DropDownList)
Lstcode.DataSource = DsVilleCodePostal
Lstcode.DataTextField =
"VILLE"
Lstcode.DataValueField =
"CODE_POSTAL"
Lstcode.DataBind()
Lstcode.SelectedValue =
"G5Y7R7"
cpt = cpt + 1
Loop
End
Sub
Private
Sub
RadGrid2_NeedDataSource(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.Web.UI.GridNeedDataSourceEventArgs)
Handles
RadGrid2.NeedDataSource
If
Not
IsPostBack
Then
dt = AjouterLigne(dt)
' call the method to create row
ViewState(
"dt"
) = dt
End
If
dt =
DirectCast
(ViewState(
"dt"
), DataTable)
RadGrid2.DataSource = dt
End
Sub
Private
Sub
RadGrid2_PreRender(
ByVal
sender
As
Object
,
ByVal
e
As
System.EventArgs)
Handles
RadGrid2.PreRender
RadGrid2.MasterTableView.RenderColumns(1).Display =
False
End
Sub
protected
void
pageImageEditor_ImageSaving(
object
sender, ImageEditorSavingEventArgs args)
{
// maybe check is not required, but just in case
if
(args.Image !=
null
&& args.Image.Image !=
null
)
{
// saved modified image clone to session for 'btnSaveImageChangesInternal_Click' usage
SessionObjects.ImageEditorHelper.TempStorageForEditedProjectContentElementImage = (Image)args.Image.Image.Clone();
}
args.Cancel =
true
;
}
function
imageEditorOnSaved(sender, e) {
$(
"#<%= btnSaveImageChangesInternal.ClientID %>"
).click();
}
function
saveChangesInImageEditor()
{
var
imEditor = $find(
"<%= pageImageEditor.ClientID %>"
);
imEditor.saveImageOnServer(
"<%= Guid.NewGuid().ToString() %>"
,
true
);
}
protected
void
pageImageEditor_ImageLoading(
object
sender, ImageEditorLoadingEventArgs args)
{
..
....
......
using
(EditableImage image =
new
EditableImage(imgPath))
{
args.Image = image.Clone();
args.Cancel =
true
;
}
}
GetRadWindow().BrowserWindow.refreshGrid(args);
it returns a error saying "BrowserWindow is null or not an object".font-size: 8pt; color: #214013; font-weight: bold; font-family: verdana; vertical-align: top; text-decoration: none; width: 165px !important; padding-left: 5px;for calender fields but calender width is working in IE8 but in IE9 it showing long not working
47 | Test Beginning | 10/10/2011 8:00:00 AM | 10/10/2011 8:15:00 AM | The Test Beginning Description. | NULL | DTSTART:20111010T080000Z DTEND:20111010T081500Z RRULE:FREQ=HOURLY;COUNT=6;INTERVAL=1 EXDATE:20111010T090000Z,20111010T100000Z |
1 | NULL |
48 | Test Beginning 2 | 10/10/2011 9:00:00 AM | 10/10/2011 9:15:00 AM | The Test Beginning Description. 2 | 47 | NULL | 1 | NULL |
<AdvancedForm Modal="true" />
<AdvancedEditTemplate>
<div class="rsAdvancedEdit" style="position: relative; border: 1px solid black; background-color: white;
height: auto;">
<div class="rsAdvTitle" style="background-color: White; height: auto; padding:10px;">
<h3><%# eval("subject") %></h3>
<asp:LinkButton runat="server" ID="AdvancedEditCloseButton" CssClass="rsAdvEditClose"
CommandName="Cancel" CausesValidation="false" >
</asp:LinkButton>
<div style="display: block; float: left; width: 320px; height: 400px;
background-color: transparent; padding: 10px;">
<b>Time slot specific information:</b><br />
<%
# Eval("description") %>
</div>
</div>
</AdvancedEditTemplate>
<telerik:RadScheduler ID="RadScheduler1" runat="server" DataDescriptionField="description"
DataEndField="endTime" DataKeyField="id" DataRecurrenceField="recData" DataRecurrenceParentKeyField="recurranceParent"
DataSourceID="SqlDataSource1" DataStartField="startTime" DataSubjectField="subject"
AllowDelete="False" AllowInsert="False" EnableDescriptionField="True"
EnableRecurrenceSupport="False" OverflowBehavior="Expand" OnClientRecurrenceActionDialogShowing="OnClientRecurrenceActionDialogShowing"
OnClientAppointmentMoveStart="OnClientAppointmentMoveStart" OnClientAppointmentResizeStart="OnClientAppointmentResizeStart"
EnableCustomAttributeEditing="True"
CustomAttributeNames="classOverviewId,cssColor"
SelectedView="MonthView" >
<AdvancedForm Modal="true" />
<AdvancedEditTemplate>
<div class="rsAdvancedEdit" style="position: relative; border: 1px solid black; background-color: white;
height: auto;">
<div class="rsAdvTitle" style="background-color: White; height: auto; padding:10px;">
<h3><%# eval("subject") %></h3>
<asp:LinkButton runat="server" ID="AdvancedEditCloseButton" CssClass="rsAdvEditClose"
CommandName="Cancel" CausesValidation="false" >
</asp:LinkButton>
<div style="display: block; float: left; width: 320px; height: 400px;
background-color: transparent; padding: 10px;">
<b>Time slot specific information:</b><br />
<%
# Eval("description") %>
</div>
</div>
</AdvancedEditTemplate>
</telerik:RadScheduler>