Protected Sub rgd_Authorizers_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles rgd_Authorizers.ItemCreated Dim IDPurchaseRequisition = Request.QueryString("IDPurchaseRequisition") Dim connectionString As String = DirectCast(ConfigurationManager.ConnectionStrings("Purchasing_PRS_ConnectionString").ConnectionString, String) Dim conn As New SqlConnection(connectionString) Dim comm As New SqlCommand("SELECT * FROM [PRS_PurchaseRequisitionsApprovals] WHERE IDPurchaseRequisition = @IDPurchaseRequisition", conn) comm.Connection.Open() comm.Parameters.Add("@IDPurchaseRequisition", SqlDbType.Int).Value = IDPurchaseRequisition Dim myDataAdapter As New SqlDataAdapter(comm) Dim myDataSet As New DataSet Dim dtData As New DataTable Dim dtRow As DataRow myDataAdapter.Fill(myDataSet) conn.Close() For Each dtRow In myDataSet.Tables(0).Rows Dim IDAuthorizer = dtRow.Item("IDAuthorizer") If TypeOf e.Item Is GridDataItem Then Dim item As GridDataItem = TryCast(e.Item, GridDataItem) Dim value1 As String = item("IDAuthorizer").Text If value1 = IDAuthorizer Then Dim btn_Approve As Button = DirectCast(item("TemplateColumn").Controls(0), Button) btn_Approve.Visible = False End If End If NextEnd Sub| [WebMethod] |
| public IEnumerable<AppointmentData> GetAppointments(SchedulerInfo schedulerInfo) |
| { |
| return Controller.GetAppointments(schedulerInfo); |
| } |
| [WebMethod(EnableSession = true)] |
| public IEnumerable<AppointmentData> GetAppointments(SchedulerInfo schedulerInfo) |
| { |
| string callerName = Context.User.Identity.Name; // I can obtain the caller, but how can I make use of it? |
| return Controller.GetAppointments(schedulerInfo); |
| } |
<telerik:RadEditor ID="Instructions" runat="server" Width="640px" Height="300px" Skin="Office2007" EnableResize="false" EditModes="Design">
<Tools>
<telerik:EditorToolGroup >
<telerik:EditorTool Name="Cut" />
<telerik:EditorTool Name="Copy" />
<telerik:EditorTool Name="Paste" />
</telerik:EditorToolGroup>
</Tools>
</telerik:RadEditor>
GridDataItem gdi = (GridDataItem)((sender as ImageButton).NamingContainer);//hide the deleted recordgdi.Visible = false;
We are trying to implement the self referencing hierarchy in RadGrid. But the example provided in the Telerik demo site creates expand\collapse button explicitly for each row of the GridDataItem. Besides , It hide\expand the columns through iterating the each GridNestedViewItem and their nested tables recursively. Is there any other way to implement this functionality without creating explicit button control and avoiding the recursive loop for each GridDataItem?
