Fill RadGrid

2 posts, 0 answers
  1. Allan
    Allan avatar
    121 posts
    Member since:
    Jun 2008

    Posted 31 May 2011 Link to this post

    Is it possible to output the following to a RadGrid rather than just the page?

    Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
        Dim newPaswordSecureString As System.Security.SecureString = New System.Security.SecureString()
        Dim newPassword As String = "password"
        For Each c As Char In newPassword
        Dim credential As PSCredential
        credential = New PSCredential("userame", newPaswordSecureString)
        'Set the connection Info
        Dim connectionInfo As WSManConnectionInfo = New WSManConnectionInfo(New Uri("http://tusdcas1.tusd.local/powershell"), "", credential)
        Dim runspace As Runspace = System.Management.Automation.Runspaces.RunspaceFactory.CreateRunspace(connectionInfo)
        Dim newMbx As Command
        newMbx = New Command("Get-MailboxStatistics")
        newMbx.Parameters.Add("Server", "TUSDMBSTORAGE1.tusd.local")
        Dim cmd As Pipeline = runspace.CreatePipeline()
        Dim commandResults As Collection(Of PSObject)
        commandResults = cmd.Invoke()
        For Each cmdlet As PSObject In commandResults
            Dim _cmdletDisplayName As String = cmdlet.Properties("DisplayName").Value.ToString()
            Dim _cmdletTotalItemSize As String = cmdlet.Properties("TotalItemSize").Value.ToString()
            Dim _cmdletLegacydn As String = cmdlet.Properties("LegacyDN").Value.ToString()
            Response.Write("Mailbox No.:" + _cmdletDisplayName + "," + _cmdletTotalItemSize + "," + _cmdletLegacydn)
    End Sub

    Thank you.
  2. Hus Damen
    Hus Damen avatar
    33 posts
    Member since:
    Dec 2009

    Posted 06 Jun 2011 Link to this post


    I am not sure what you want to accomplish but as far as I knows telerik grid is data bound control. Just as MS gridview. So to display something you in it, you have to bind it first. For example you can use template column and display anything you need in its templates.


Back to Top