or
node.ImageUrl =
"~/App_Images/images/R.ico";
| <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> |
| <script type="text/javascript"> |
| //Process the click event of a checkbox. When a parent is checked all children should be checked |
| //When a parent is unchecked, no action need be taken. |
| //When a child is unchecked, the parent must be unchecked |
| function processAccessCheckBox(item) { |
| var grid = $find("<%= rgPermission.ClientID %>"); |
| var gridgridSelectedItems = grid.get_masterTableView().get_selectedItems(); |
| alert(gridSelectedItems.count); |
| //get all detail tables in the hierarchy |
| var detailTablesArray = grid.get_detailTables(); |
| if (item.checked) { |
| alert(item.checked); |
| //var ParentID = detailTablesArray[0]. |
| //Check all child items |
| //Check if detail table is a child |
| } |
| else { |
| alert(item.checked); |
| //Uncheck parent item |
| //var parentRow = get_parentView |
| } |
| alert(detailTablesArray.length); |
| return false; |
| } |
| function RowClick(sender, eventArgs) { |
| var MTV = eventArgs.get_tableView(); |
| var cbCol = MTV.getCellByColumnUniqueName(MTV.get_dataItems()[eventArgs.get_itemIndexHierarchical()], "Access"); |
| var text = ""; |
| text += "col content: "; |
| text += cbCol.innerHTML |
| //text += ", Index: " + eventArgs.get_itemIndexHierarchical(); |
| //document.getElementById("OutPut").innerHTML = text; |
| alert(text); |
| } |
| </script> |
| </telerik:RadScriptBlock> |
| <asp:LinqDataSource ID="LinqDataSource1" runat="server" | |
| ContextTypeName="db_vmmDataContext" | |
| Select="new (ServiceDate, ServicedBy, InvoiceNo, Mileage, ServiceType, DateTyresLastPurchased, NextServiceDueMiles, NextServiceDueDt, MOTd, WhatWasDone, ServiceHistoryID)" | |
| TableName="vmm_ServiceHistories" Where="VehicleID == @VehicleID"> | |
| <whereparameters> | |
| <asp:ControlParameter ControlID="lstVehicleSelectByReg" Name="VehicleID" | |
| PropertyName="SelectedValue" Type="Int32" /> | |
| </whereparameters> | |
| </asp:LinqDataSource> | |
| <div> | |
| <telerik:RadGrid ID="rpt_ServiceHistory" runat="server" AllowAutomaticDeletes="True" | |
| AllowAutomaticUpdates="True" AutoGenerateColumns="False" | |
| DataSourceID="LinqDataSource1" GridLines="None" Skin="Hay" | |
| onupdatecommand="rpt_ServiceHistory_UpdateCommand"> | |
| <mastertableview datasourceid="LinqDataSource1" EditMode="InPlace"> | |
| <rowindicatorcolumn> | |
| <HeaderStyle Width="20px" /> | |
| </rowindicatorcolumn> | |
| <expandcollapsecolumn> | |
| <HeaderStyle Width="20px" /> | |
| </expandcollapsecolumn> | |
| <Columns> | |
| <telerik:GridButtonColumn CommandName="Delete" Text="Delete" | |
| UniqueName="column"> | |
| </telerik:GridButtonColumn> | |
| <telerik:GridEditCommandColumn> | |
| </telerik:GridEditCommandColumn> | |
| <telerik:GridBoundColumn DataField="ServiceDate" DataType="System.DateTime" | |
| HeaderText="Service Date" SortExpression="ServiceDate" | |
| UniqueName="ServiceDate"> | |
| </telerik:GridBoundColumn> | |
| <telerik:GridBoundColumn DataField="ServicedBy" HeaderText="Serviced By" | |
| SortExpression="ServicedBy" UniqueName="ServicedBy"> | |
| </telerik:GridBoundColumn> | |
| <telerik:GridBoundColumn DataField="InvoiceNo" DataType="System.Int32" | |
| HeaderText="Invoice No" SortExpression="InvoiceNo" UniqueName="InvoiceNo"> | |
| </telerik:GridBoundColumn> | |
| <telerik:GridBoundColumn DataField="Mileage" DataType="System.Int32" | |
| HeaderText="Mileage" SortExpression="Mileage" UniqueName="Mileage"> | |
| </telerik:GridBoundColumn> | |
| <telerik:GridBoundColumn DataField="ServiceType" HeaderText="Service Type" | |
| SortExpression="ServiceType" UniqueName="ServiceType"> | |
| </telerik:GridBoundColumn> | |
| <telerik:GridBoundColumn DataField="DateTyresLastPurchased" | |
| DataType="System.DateTime" HeaderText="Date Tyres Last Purchased" | |
| SortExpression="DateTyresLastPurchased" | |
| UniqueName="DateTyresLastPurchased"> | |
| </telerik:GridBoundColumn> | |
| <telerik:GridBoundColumn DataField="NextServiceDueMiles" | |
| HeaderText="Next Service Due Miles" SortExpression="NextServiceDueMiles" | |
| UniqueName="NextServiceDueMiles"> | |
| </telerik:GridBoundColumn> | |
| <telerik:GridBoundColumn DataField="NextServiceDueDt" | |
| DataType="System.DateTime" HeaderText="Next Service Due Dt" | |
| SortExpression="NextServiceDueDt" UniqueName="NextServiceDueDt"> | |
| </telerik:GridBoundColumn> | |
| <telerik:GridCheckBoxColumn DataField="MOTd" DataType="System.Boolean" | |
| HeaderText="MOTd?" SortExpression="MOTd" UniqueName="MOTd"> | |
| </telerik:GridCheckBoxColumn> | |
| <telerik:GridBoundColumn DataField="WhatWasDone" HeaderText="Wha tWas Done?" | |
| SortExpression="WhatWasDone" UniqueName="WhatWasDone"> | |
| </telerik:GridBoundColumn> | |
| <telerik:GridBoundColumn DataField="ServiceHistoryID" DataType="System.Int32" | |
| HeaderText="Service History ID" ReadOnly="True" | |
| SortExpression="ServiceHistoryID" UniqueName="ServiceHistoryID" | |
| Display="False"> | |
| </telerik:GridBoundColumn> | |
| </Columns> | |
| <editformsettings> | |
| <editcolumn uniquename="EditCommandColumn1"> | |
| </editcolumn> | |
| </editformsettings> | |
| </mastertableview> | |
| <filtermenu enabletheming="True"> | |
| <collapseanimation duration="200" type="OutQuint" /> | |
| </filtermenu> | |
| </telerik:RadGrid> | |
| </div> |

Dim
task_code As String = (TryCast(editedItem("task_code").Controls(0), TextBox)).Text
Dim
id_tc_type As String = (TryCast(editedItem("id_tc_type").Controls(0), DropDownList)).SelectedValue
