Telerik Forums
UI for WinForms Forum
2 answers
164 views
I am returning bound data to a RadGridView via a DataTable.  In the process I need to modify one of the columns which is contains a timestamp value (seconds from midnight) to display time.  The code below shows where I intercept the column in the CellFormatting event and convert the timestamp value to a DateSerial, which I then set the CellElement.Text to. 

Based on this function the grid displays the timestamp exactly as I want - ie: 44233 is displayed correctly as 12:17:13 PM in the grid.  However, when export the grid to Excel, the timestamp value (44233) is exported and not the new CellElement.Text.

Am I doing something wrong or can I modify the column via the exporter before it gets into Excel?  Thanks

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 Sub
 
Function 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 Try
End Function


   
Brendan
Top achievements
Rank 1
 answered on 04 Jun 2013
5 answers
596 views
How to bind dataset to Radgrid in Windows Application(Normally used DataBind() method not available)
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;

Thanks.
Nikolay
Telerik team
 answered on 04 Jun 2013
1 answer
152 views
Hi,

I am suppose to make an upgrade from a very old version of telerik to the latest version. I am trying to do this in small steps. Currently I have upgraded to Q3 2010, but I get the following error  'DataAccessComponent' does not exist in the namespace 'Telerik.WinControls.Data'. I understand that DataAccessComponent is not supported anymore, but I cannot find any information in the release notes on when it was modified and what it was modified with.

If you could provide some feedback on this, it would be great.

Thanks
Ivan Petrov
Telerik team
 answered on 04 Jun 2013
1 answer
211 views
e.g. MinDate = #5/30/2013#
When I set the MinDate to a value the value is also set to MinDate.

   With calStartDate
    .MinDate = MinimumDate
    .MaxDate = MaxDate
    .SetToNullValue()
   End With

Applying SetToNullValue does not reset the value to null/nothing. How can I ensure the value (default) is always set to NULL

 Telerik  WnForms Q1 2013 SP1
VS2010

Stefan
Telerik team
 answered on 04 Jun 2013
4 answers
224 views
Hello,

how can I handle the click events of the Exit and Option Button in the RadRibbonBar?

THX.
Stefan
Telerik team
 answered on 04 Jun 2013
28 answers
656 views
Hi, I'm having issue with save/load layout of a grid control.

I have a date column that I filter between date 1 and date 2. If I save the layout I cannot reload it. I get an error message in Visual Studio :

Exception has been thrown by the target of an invocation.
{"Invalid filter expression."}

I noticed that the filter menu changed since last version and I can now select dates with a calendar control instead of a textbox. Maybe it has something to do with it...


thanks
Peter
Telerik team
 answered on 04 Jun 2013
4 answers
462 views

How to make user entry in RadTextbox as uppercase?

in win forms?

Stefan
Telerik team
 answered on 04 Jun 2013
1 answer
356 views
hi,is it possible to create animated charts in windows form or it's just possible in wpf and silverlight?
Peter
Telerik team
 answered on 03 Jun 2013
1 answer
100 views
HI


I am newly using RadCarousel in windows winform application.  I want to show different controls like analog meters, images in it.
No idea how to make a attractive look. Need some guidance.

Thanks in advance.
Paul
Telerik team
 answered on 03 Jun 2013
11 answers
574 views
The spell checking is catching the misspelled words, but not suggesting an alternative. Any suggestions?
Anton
Telerik team
 answered on 03 Jun 2013
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Form
Chart (obsolete as of Q1 2013)
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?