<html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <link rel="Stylesheet" type="text/css" href="./Styles.css" /> <title>Content Tracker</title></head><body class="body"> <form id="form1" runat="server"> <telerik:RadScriptManager runat="server" ID="RadScriptManager1" /> <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" /> <!-- Page Header --> <div class="header"> <table width="1000px"> <tr> <td> <table> <tr> <td> <img alt="" src="./Images/xxxxxx_Logo_Small.gif" /> </td> </tr> </table> </td> <td style="float: right"> <table border="0"> <tr> <td> </td> </tr> <tr> <td> <b>Welcome <asp:Label CssClass="VertexOrangeText" ID="loggedInUser" runat="server" /></b> </td> </tr> </table> </td> </tr> </table> </div> <div id="Nav" class="nav"></div> <div id="Spacer" class="divSpacer"></div> <!-- Page Content --> <div id="Content" class="content" > <div id="PageHeader" class="pageHeader" >Assignments</div> <div id="HeaderSpacer" class="divHeaderSpacer"></div> <telerik:RadGrid ID="RadGrid1" Width="990" runat="server" DataSourceID="EntityDataSourceAssignments" AllowPaging="True" AllowAutomaticUpdates="True" AllowAutomaticInserts="True" GridLines="Both" AllowAutomaticDeletes="True" AllowSorting="true" Skin="Web20" OnItemCreated="RadGrid1_ItemCreated" OnItemInserted="RadGrid1_ItemInserted" OnPreRender="RadGrid1_PreRender"> <PagerStyle Mode="NextPrevAndNumeric" /> <MasterTableView DataSourceID="EntityDataSourceAssignments" AutoGenerateColumns="False" DataKeyNames="AssignmentsID" CommandItemDisplay="Top"> <Columns> <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"> </telerik:GridEditCommandColumn> <telerik:GridBoundColumn DataField="AssignmentsID" SortExpression="AssignmentsID" UniqueName="AssignmentsID" HeaderStyle-Width="120px" Visible="true"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="JurisdictionCode" HeaderText="Jurisdiction Code" SortExpression="JurisdictionCode" UniqueName="JurisdictionCode" HeaderStyle-Width="120px" Visible="true"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ObligationName" HeaderText="Obligation Name" SortExpression="ObligationName" UniqueName="ObligationName" HeaderStyle-Width="120px" Visible="true"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="DevTeamLead" HeaderText="Dev Team Lead" SortExpression="DevTeamLead" UniqueName="DevTeamLead" HeaderStyle-Width="120px" Visible="true"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Developer" HeaderText="Developer" SortExpression="Developer" UniqueName="Developer" HeaderStyle-Width="120px" Visible="true"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="TestTeamLead" HeaderText="Test Team Lead" SortExpression="TestTeamLead" UniqueName="TestTeamLead" HeaderStyle-Width="120px" Visible="true"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="DueDate" HeaderText="Due Date" SortExpression="DueDate" UniqueName="DueDate" HeaderStyle-Width="160px" Visible="true"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="FormsReceived" HeaderText="Forms Received" SortExpression="FormsReceived" UniqueName="FormsReceived" HeaderStyle-Width="120px" Visible="true"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="EFileComplete" HeaderText="EFile Complete" SortExpression="EFileComplete" UniqueName="EFileComplete" HeaderStyle-Width="120px" Visible="true"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ESEXTStatus" HeaderText="ES-EXT Status" SortExpression="ESEXTStatus" UniqueName="ESEXTStatus" HeaderStyle-Width="120px" Visible="true"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="SubmittalStatus" HeaderText="Submittal Status" SortExpression="SubmittalStatus" UniqueName="SubmittalStatus" HeaderStyle-Width="120px" Visible="true"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Priority" HeaderText="Priority" SortExpression="Priority" UniqueName="Priority" HeaderStyle-Width="70px" Visible="true"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="KeyDraftInNeedsAssignment" HeaderText="All Key Draft In and needs to be assigned" SortExpression="KeyDraftInNeedsAssignment" UniqueName="KeyDraftInNeedsAssignment" HeaderStyle-Width="250px" Visible="true"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="KeyFinalInNeedsAssignment" HeaderText="All Key Final In and needs to be assigned" SortExpression="KeyFinalInNeedsAssignment" UniqueName="KeyFinalInNeedsAssignment" HeaderStyle-Width="250px" Visible="true"> </telerik:GridBoundColumn> <telerik:GridButtonColumn Text="Delete" CommandName="Delete" HeaderStyle-Width="32px" ButtonType="ImageButton" /> </Columns> <EditFormSettings> <EditColumn ButtonType="ImageButton" /> </EditFormSettings> </MasterTableView> <ClientSettings> <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" ScrollHeight=""> </Scrolling> </ClientSettings> </telerik:RadGrid> <asp:EntityDataSource ID="EntityDataSourceAssignments" runat="server" ConnectionString="name=ContentTrackerEntities" DefaultContainerName="ContentTrackerEntities" EntityTypeFilter="Assignment" OrderBy="it.[Developer]" EntitySetName="Assignments" EnableUpdate="True" EnableDelete="True" EnableInsert="True"> </asp:EntityDataSource> </div> <div id="page-footer"> <div id="page-footer-copyright">Copyright © 2010-2012 xxxxxx. All rights reserved.</div> </div> </form></body></html><telerik:RadGrid ID="rgBuscar" runat="server" CellSpacing="0" Culture="es-ES" GridLines="None" Height="469px" Skin="Hay" Width="944px"> <ClientSettings> <Scrolling AllowScroll="True" UseStaticHeaders="True" /> </ClientSettings> <MasterTableView> <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings> <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"> <HeaderStyle Width="20px"></HeaderStyle> </RowIndicatorColumn> <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"> <HeaderStyle Width="20px"></HeaderStyle> </ExpandCollapseColumn> <EditFormSettings> <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn> </EditFormSettings> <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle> </MasterTableView> <ClientSettings> <Selecting AllowRowSelect="True" /> <ClientEvents OnRowDblClick="RowDblClick"/> </ClientSettings> <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle> <FilterMenu EnableImageSprites="False"></FilterMenu></telerik:RadGrid><telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> <script type="text/javascript"> function RowDblClick(sender, args) { var index = args.get_itemIndexHierarchical(); sender.get_masterTableView().fireCommand("RowDblClick", index); } </script></telerik:RadCodeBlock>Protected Sub rgBuscar_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles rgBuscar.ItemCommand If e.CommandName = "RowDblClick" Then Dim var As String = e.CommandArgument'here is where i need the value of the cell number 2 of the row 'but im getting the index idValor = e.Item.Cells(2).Text MostrarVentana(idValor) End If End SubPublic Sub MostrarVentana(ByVal IdCampo As Integer) lector = objBd.obtenerConfiguraciones("Cambio Ordenes") While lector.Read rwmCambio.Windows(0).NavigateUrl = lector("OCON_Url") & "?IdCampo=" & IdCampo rwmCambio.Windows(0).Width = Unit.Pixel(lector("OCON_Width")) rwmCambio.Windows(0).Height = Unit.Pixel(lector("OCON_Height")) End While rwmCambio.Windows(0).VisibleOnPageLoad = TrueEnd Sub
Hello,
I have the following CommandItemTemplate (below) in my RadGrid and I am wondering how to access the buttons and checkboxes in that template. Specifically, I want to disable/enable them when appropriate. How do I access those controls programatically serverside? I'll be doing this in the PageLoad() method. VB.NET. Thanks for the help!
<telerik:RadGrid ID="rgT" runat="server" Skin="WebBlue" AutoGenerateColumns="False"
GridLines="None" AllowFilteringByColumn="True" AllowMultiRowEdit="true" AllowMultiRowSelection="true"
OnItemDataBound="rgT_ItemDataBound" OnItemCommand="rgT_ItemCommand" Width="1093px"
Height="500px">
<MasterTableView CommandItemDisplay="Top" EditMode="InPlace">
<Columns>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="FIELD1" HeaderText="" UniqueName="FIELD1"
ReadOnly="True" Display="false">
</telerik:GridBoundColumn>
</Columns>
<
CommandItemTemplate>
<div id="DivUA" runat="server" style="padding-top: 5px; padding-bottom: 5px">
<table>
<tr>
<td>
<asp:Button runat="server" ID="btnUA" Text="Save" ToolTip="Save all changes you've made to the data"
Width="70px" CommandName="UpdateAll" CssClass="CommandButton" /></td>
<td style="padding-left:15px">
<asp:Button runat="server" ID="btnCGC" Text="Cancel Edits" ToolTip="Cancel all unsaved edits made to the data and reload the original data"
Width="100px" CommandName="CancelAll" CssClass="CommandButton" /></td>
<td align="right" style="padding-left:15px">
<asp:Button runat="server" ID="btnEditSelected" Text="Edit Selected" ToolTip="Place all selected grid rows into edit mode."
Width="100px" CommandName="EditSelected" CssClass="CommandButton" />
</td>
<td align="right" style="width: 120px">
<asp:CheckBox ID="cbToggleApproved" runat="server" Text="Hide Approved" CssClass="Normal"
OnCheckedChanged="hideAllApproved" AutoPostBack="True" /></td>
<td align="right" style="width: 100px">
<asp:CheckBox ID="cbApproveAll" runat="server" Text="Approve All" AutoPostBack="True"
OnCheckedChanged="approveAllCheckChanged" CssClass="Normal" /></td>
</tr>
</table>
</div>
</CommandItemTemplate>
<MasterTableView EditMode="PopUp" CommandItemDisplay="Top" DataKeyNames="AddressId"> <EditFormSettings UserControlName="~/AddressEdit.ascx" EditFormType="WebUserControl" InsertCaption="Add new Address" PopUpSettings-Width="800px" FormStyle-BackColor="AliceBlue" FormStyle-BorderWidth="5px" FormStyle-BorderColor="Turquoise" CaptionFormatString="Edit Address ID: {0}" CaptionDataField="AddressId"> <EditColumn UniqueName="EditCommandColumnAddr"/> </EditFormSettings>