This is a migrated thread and some comments may be shown as answers.

Fill RadGrid

1 Answer 84 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Allan
Top achievements
Rank 2
Allan asked on 31 May 2011, 11:56 PM
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
        newPaswordSecureString.AppendChar(c)
    Next
    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"), "http://schemas.microsoft.com/powershell/Microsoft.Exchange", credential)
    Dim runspace As Runspace = System.Management.Automation.Runspaces.RunspaceFactory.CreateRunspace(connectionInfo)
    runspace.Open()
    Dim newMbx As Command
    newMbx = New Command("Get-MailboxStatistics")
    newMbx.Parameters.Add("Server", "TUSDMBSTORAGE1.tusd.local")
    Dim cmd As Pipeline = runspace.CreatePipeline()
    cmd.Commands.Add(newMbx)
    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)
    Next
End Sub

Thank you.

1 Answer, 1 is accepted

Sort by
0
Hus Damen
Top achievements
Rank 1
answered on 06 Jun 2011, 07:58 AM
Hi,

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.

Thanks
Hus

Tags
Grid
Asked by
Allan
Top achievements
Rank 2
Answers by
Hus Damen
Top achievements
Rank 1
Share this question
or