or
Protected
Sub
rbt_VehicleImage_CheckedChanged(
ByVal
sender
As
Object
,
ByVal
e
As
System.EventArgs)
Dim
item
As
GridDataItem =
DirectCast
(TryCast(sender, RadioButton).NamingContainer, GridDataItem)
Dim
rdBtn
As
RadioButton = TryCast(sender, RadioButton)
If
rdBtn.Checked =
True
Then
Dim
sql
As
String
Dim
strConnString
As
[
String
] = System.Configuration.ConfigurationManager.ConnectionStrings(
"CF_SQL_Connection"
).ConnectionString()
sql =
"UPDATE CF_Images SET DefaultImage = @Value WHERE IDVehicles = 175"
Dim
connection
As
New
SqlConnection(strConnString)
Dim
command
As
New
SqlCommand(sql, connection)
command.Parameters.Add(
"@Value"
, SqlDbType.Int).Value =
"0"
command.Connection.Open()
command.ExecuteNonQuery()
command.Connection.Close()
Dim
sql1
As
String
Dim
strConnString1
As
[
String
] = System.Configuration.ConfigurationManager.ConnectionStrings(
"CF_SQL_Connection"
).ConnectionString()
sql1 =
"UPDATE CF_Images SET DefaultImage = @Value WHERE IDVehicles = 175 AND IDImages = @IDImages"
Dim
connection1
As
New
SqlConnection(strConnString1)
Dim
command1
As
New
SqlCommand(sql1, connection1)
command1.Parameters.Add(
"@Value"
, SqlDbType.Int).Value =
"1"
command1.Parameters.Add(
"@IDImages"
, SqlDbType.Int).Value = 333
command1.Connection.Open()
command1.ExecuteNonQuery()
command1.Connection.Close()
Dim
ID
As
GridBoundColumn =
DirectCast
(rg_VehicleImages.MasterTableView.GetColumn(
"IDImages"
), GridBoundColumn)
Dim
ID2
As
String
= Convert.ToString(ID)
Label1.Text = ID2
Else
End
If
End
Sub
End
Class
Protected
Sub
Grid_TimeSheet_PreRender(
ByVal
sender
As
Object
,
ByVal
e
As
System.EventArgs)
Handles
Grid_TimeSheet.PreRender
AddFooterRow(1)
AddFooterRow(2)
End
Sub
Protected
Sub
AddFooterRow(
ByVal
marker
As
Integer
)
' get the current footer
Dim
footer
As
GridItem() = Grid_TimeSheet.MasterTableView.GetItems(GridItemType.Footer)
' get the current TFoot element
Dim
foot
As
GridTFoot =
CType
(footer(0).Parent.Controls(0).Parent, GridTFoot)
Dim
LastFooterPos
As
Integer
= 0
For
n = 0
To
foot.Controls.Count - 1
If
TypeOf
(foot.Controls(n))
Is
GridFooterItem
Then
LastFooterPos = n
End
If
Next
Dim
newFooterItem
As
GridFooterItem =
New
GridFooterItem(Grid_TimeSheet.MasterTableView, 0, 0)
PopulateNewFooterItem(newFooterItem, foot.Controls(LastFooterPos), marker)
foot.Controls.AddAt(LastFooterPos + 1, newFooterItem)
End
Sub
Protected
Sub
PopulateNewFooterItem(
ByVal
footer
As
GridFooterItem,
ByVal
existingfooter
As
GridFooterItem,
ByVal
marker
As
Integer
)
For
Each
fc
In
existingfooter.Cells
Dim
new_fc
As
TableCell =
New
TableCell
new_fc.Text = marker.ToString()
footer.Cells.Add(new_fc)
Next
End
Sub
<
telerik:RadWindowManager
runat
=
"server"
ID
=
"windowManager"
Modal
=
"true"
>
<
Windows
>
<
telerik:RadWindow
ID
=
"main"
runat
=
"server"
Modal
=
"true"
NavigateUrl
=
"mainUp.aspx"
VisibleOnPageLoad
=
"true"
OnClientClose
=
"openWindow()"
>
</
telerik:RadWindow
>
<
telerik:RadWindow
ID
=
"second"
runat
=
"server"
Modal
=
"true"
NavigateUrl
=
"scope.aspx"
>
</
telerik:RadWindow
>
<
telerik:RadWindow
ID
=
"third"
runat
=
"server"
Modal
=
"true"
>
</
telerik:RadWindow
>
</
Windows
>
</
telerik:RadWindowManager
>
function
openWindow() {
var
oWnd = radopen(
null
,
"second"
);
}
function
CloseOnReload() {
GetRadWindow().Close();
}