Telerik Forums
UI for WinForms Forum
1 answer
141 views
Is this possible?

I have a scenario where I am displaying a list of flat files.  The user can expand a row and display the contents of the file in the child grid.

However, some files are quite large, and I'll need to virtualize the child grids....OR simply display a multiline textbox instead of a grid.

Either way, I'm really re-thinking my approach on this because I'm dealing with 300k+ rows...

Are either of these paths possible?  Virtualize the child grid, or replace it with a text box?

Thanks,

Wayne
Ivan Petrov
Telerik team
 answered on 05 Jun 2013
4 answers
851 views
I am doing a new UserControl in studio.
I then add the Telerik RadGridView to said control and change the Dock property to FILL.

When the grid loads I do

if (dataSet == null) //TODO TESTING
{
    dataSet = new DataSet();
    dataTable = dataSet.Tables.Add("Results");
}
 
dataTable.Columns.Add("ID");
dataTable.Columns.Add("Name");
 
dataTable.Rows.Add(i++, "Jack");
dataTable.Rows.Add(i++, "Donna");
dataTable.Rows.Add(i++, "Jack");
dataTable.Rows.Add(i++, "Donna");
dataTable.Rows.Add(i++, "Jack");
dataTable.Rows.Add(i++, "Donna");
dataTable.Rows.Add(i++, "Jack");
dataTable.Rows.Add(i++, "Donna");
dataTable.Rows.Add(i++, "Jack");
dataTable.Rows.Add(i++, "Donna");
dataTable.Rows.Add(i++, "Jack");
dataTable.Rows.Add(i++, "Donna");

(dataSet is a DataSet that is a member of the usercontrol so is around for the life time of the control.

I then bind the data table to the control 

this.batchDisplay.DataSource = dataSet.Tables[0];

Now I have a button on my app that simply adds data to the datatable

dataTable.Rows.Add(i++, "Ralph"); //TODO TEST CODE
dataTable.Rows.Add(i++, "Walf");
dataTable.Rows.Add(i++, "Ralph");
dataTable.Rows.Add(i++, "Walf");


My problem is I can't figure out how to get the scroll bar to do what I want.

What I want is for the scroll bar to stay where it is in the collection while items are added to the bottom.

If I just straight up add the items to the dataTable my scroll bar jumps to the bottom.

I have tried doing:

this.batchDisplay.BeginUpdate();
 
 dataTable.Rows.Add(i++, "Ralph"); //TODO TEST CODE
 dataTable.Rows.Add(i++, "Walf");
 dataTable.Rows.Add(i++, "Ralph");
 dataTable.Rows.Add(i++, "Walf");
 
 this.batchDisplay.EndUpdate();
 this.batchDisplay.TableElement.RowScroller.UpdateScrollRange();


But this causes the scroll bar to do some kind of odd warp where the bar grows and shrinks depending on where you are in the scroll.

The only way I could find to make the bar actually size correctly was 

this.batchDisplay.BeginUpdate();
 
dataTable.Rows.Add(i++, "Ralph"); //TODO TEST CODE
dataTable.Rows.Add(i++, "Walf");
dataTable.Rows.Add(i++, "Ralph");
dataTable.Rows.Add(i++, "Walf");
 
this.batchDisplay.Height += 1;
this.batchDisplay.Height -= 1;
 
this.batchDisplay.EndUpdate();

But that seems just silly, and while the scroll bar does size right it jumps to the top.

I am sure I am just making this harder than it needs to be, but I just can't seem to find a way to make the scroll bar stay where it is while I  add items.
Any assistance on this would be greatly appreciated.

Thanks,
Ralph
Ralph
Top achievements
Rank 1
 answered on 05 Jun 2013
3 answers
268 views
I have a 4-level RadGridView with a total of 3 Sibling ChildGridViewTemplates for a total of 7 GridViewTemplates (2 of them sharing a DataSet with 1 each of the other ChildGridViewTemplates).   I have one case that currently loads 44 k Rows total (between all GridViewTemplates) into the DataSets used by RadGridView taking ~8 seconds.  I'd like to cut that time down to no more than 1, maybe 2 seconds by suppressing data loads for ChildGridViewTemplates until each one is opened (i.e. it's ParentRow is expanded).  Once it's opened, the data for its Rows would stay in memory and possibly be cleared when it's closed (i.e. it's ParentRow is collapsed).  Of course, it would need to allow for multiple Cousin ChildGridViewTemplates being open at the same time (but if necessary, even that's optional if I can force close all other open Cousins).  I'm binding to DataSet's filled by SqlDataAdapter's.  My grid is read-only (well at the grid-level anyways, Rows will be edited using a separate Form per Row).

I imagine I need to handle the ChildViewExpanded Event, but I wanted to get your input before I stray too far down the wrong path.  Maybe I even need to change my binding method?

NOTE: I'm also considering a GridViewTemplate-level "Refresh" option.

2009Q2 (2009.2.9.729), VS 2005 (v8.0.50727.762 SP.050727-7600), .Net2 (2.0.50727), XP SP3, Core2Duo 2.99GHZ with 3GB.

Stefan
Telerik team
 answered on 05 Jun 2013
2 answers
171 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
611 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
156 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
229 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
234 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
677 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
479 views

How to make user entry in RadTextbox as uppercase?

in win forms?

Stefan
Telerik team
 answered on 04 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
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
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
SmartPasteButton
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?