or

Private Sub grdAccessLogs_CellFormatting(sender As Object, e As CellFormattingEventArgs) Handles grdAuditLogs.CellFormatting Dim sCol As String = e.CellElement.ColumnInfo.Name.ToUpper 'format timestamp column If sCol.IndexOf("TYPE=TS") > 0 Then Dim sTs As String = e.CellElement.Text If e.CellElement.Text.IndexOf(":") = -1 Then e.CellElement.Text = fConvertSysTime(sTs).ToString End If End SubFunction fConvertSysTime(lTime As Integer) As String Dim lHours As Integer Dim lMinutes As Integer Dim lSeconds As Integer Try 'truncate decimals - only want full hours lHours = Int(lTime / 3600) lMinutes = Int((lTime - lHours * 3600) / 60) lSeconds = Int(lTime - lHours * 3600 - lMinutes * 60) 'build time string Return TimeSerial(lHours, lMinutes, lSeconds) Catch e As Exception Return "" End TryEnd Function
SqlConnection conn;SqlDataAdapter da;SqlCommand cmd;conn = new SqlConnection("Data Source=SWAP;Initial Catalog=Swapnil;User ID=sa;Password=************"); cmd = new SqlCommand("select * from Employee", conn); conn.Open(); DataSet ds = new DataSet(); DataTable dt= new DataTable(); da = new SqlDataAdapter(cmd); cmd.ExecuteNonQuery(); conn.Close(); da.Fill(ds); radGridView1.DataSource = ds; Telerik WnForms Q1 2013 SP1
VS2010


in win forms?
