Telerik Forums
UI for WinForms Forum
3 answers
114 views
Hello,

We have a project using Q2 SP1. There is a grid with an unbound checkbox in one form. If the data is less than a page, the checkbox column works like a charm. If the data is more than a page, any selection of the checkbox column in the 2nd page and beyond will case the grid scrolls back to page 1. Is there any quick fix for this? Thanks in advance.

BR/shortie
Jack
Telerik team
 answered on 13 Nov 2009
6 answers
330 views
Hi,

I want to have a grid with a combo box column, but for each row, I want to apply different DataSource in the combo cox. The values in the combo box are depending on another column value for each row.

I can't use the MasterGridViewTemplate, because it's applying the SAME datasource for each row, so what should I do?
Nikolay
Telerik team
 answered on 13 Nov 2009
3 answers
174 views
Hi, I'm currently trying the charting component in my winform application. (version 2009.1.9.316)
Now I've got just a treeview and a chart component on my winform.
when I click on a treenode the chart view is loaded with the data, everything works fine.
now as long as my treeview isn't reloaded the chart loads the data, but when in my main form is triggered to reload the treeview and I click a treenode, my program crashes. with the following exception:

general exception:    at Telerik.Charting.Chart.GetException(RenderEngine renderEngine, Exception ex)
   at Telerik.Charting.Chart.GetImage(Int32 width, Int32 height)
   at Telerik.Charting.Chart.GetImage()
   at Telerik.WinControls.UI.RadChart.GetImage()
   at Telerik.WinControls.UI.RadChart.OnPaint(PaintEventArgs e)
  
in the innerexception I'm reading system.nullreferenceexception
   at Telerik.Charting.ChartSeriesItem.set_Parent(ChartSeries value)
   at Telerik.Charting.ChartSeriesItem.Clone()
   at Telerik.Charting.ChartSeries.CopyItems(ChartSeries originalSeries)
   at Telerik.Charting.ChartSeries.CloneSeries()
   at Telerik.Charting.RenderEngine.InitializeChartElements()
   at Telerik.Charting.Chart.GetImage(Int32 width, Int32 height)

how is this possible? I didn't found anything bizar in my code. I added a try catch around the code that fills the chart, but the error isn't triggered here, but in my main try catch of my program.

my code:

public partial class HistoricData : Form 
    { 
        public IOController TheIO { getset; } 
 
        public HistoricData() 
        { 
            InitializeComponent(); 
             
        } 
 
        public void FillData(List<ChartHistoric> days, string title) 
        { 
            try 
            { 
                rchrtHistoricData.DataSource = days; 
                rchrtHistoricData.ChartTitle.TextBlock.Text = title; 
                rchrtHistoricData.PlotArea.XAxis.DataLabelsColumn = "Month"
                rchrtHistoricData.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = -45; 
                rchrtHistoricData.DataBind();     
            }catch(Exception ex) 
            { 
                Logging.Log.LogMessageToFile("HistoricData.cs -> FillData(List<ChartHistoric> days): " + ex.Message + ex.StackTrace); 
            } 
             
        } 
 
        public void FillTreeView(TreeNode overview) 
        { 
            trvMonths.Nodes.Clear(); 
            trvMonths.Nodes.Add(overview); 
        } 
 
        public void ClearChart() 
        { 
            rchrtHistoricData.DataSource = new List<ChartHistoric>();  
            rchrtHistoricData.DataBind(); 
        } 
 
        private void trvMonths_AfterSelect(object sender, TreeViewEventArgs e) 
        { 
            if(trvMonths.SelectedNode == nullreturn
 
            //ClearChart(); 
 
            //get the selected historic data for this month or whole year. 
            //data for the whole year 
            if(trvMonths.SelectedNode.Tag.Equals("1")) 
            { 
                FillData(TheIO.GetDataChartHistoricYear(), "Month view"); 
            } 
 
            if(trvMonths.SelectedNode.Tag.Equals("2")) 
            { 
                FillData(TheIO.GetDataChartHistoricMonth(trvMonths.SelectedNode.Text), "Week view"); 
            } 
        } 
    }



The function TheIO.GetDataChartHistoricMonth or TheIO.GetDataChartHIstoricYear are returning a list of ChartHistoric

public class ChartHistoric 
    { 
        public ChartHistoric(string _month, int _days) 
        { 
            month = _month; 
            days = _days; 
        } 
        private string month; 
        public string Month 
        { 
            get { return month; } 
            set { month = value; } 
        } 
        private int days; 
        public int Days 
        { 
            get { return days; } 
            set { days = value; } 
        } 
    } 

Thanks a lot

gerbrand
Top achievements
Rank 2
 answered on 13 Nov 2009
9 answers
305 views
What is the best way to have multiple column heading rows but only single data rows?  For example:

+----------+-----------------------------+  
|  Item    |           Service           |  
|          +-----------------------------+  
|          |   Qty    |   Description    |  
+----------+-----------------------------+  
|  Oil     |     4    |    Quarts        |  
+----------+-----------------------------+ 

I don't have a data column for Service, for example. That is just a way to show the user how the Qty & Desc columns are grouped. I tried the ColumnGroupView but did not see a way to create the sample above since the Item column seems to need a parent group.

When I try the HTMLView apparently I need to add unbound columns to the grid or else I cannot format the headings. Specifically this line of code fails if I do not add dummy columns for the extra group (like Service above):

GridTableHeaderRowElement

 

header = (grid.GridElement as GridTableElement).TableBodyElement.Children[0] as GridTableHeaderRowElement;

 

 

 

 

 

The Children collection is empty.  If I DO add dummy columns to the grid to make the headings work then my data rows have mutiple rows. In the example above, a text box appears in a row above the 4 and Quarts columns representing Service which we don't want.

Anyway please let me know if I'm missing something obvious to make this work.

Jack
Telerik team
 answered on 12 Nov 2009
5 answers
358 views
Hi there,

I was hoping you could shed some light on how I could add an image to a Command Column.  Currently my command column contains a button... but I would like it to contain a nice little edit image instead.

Any ideas, or sample code?

Thanks for you help.

Jon
Jack
Telerik team
 answered on 12 Nov 2009
1 answer
90 views
Hi Telerik

We have the same problem as "PunjabiSingh", but different at some point

Our problem as below:

We try  to use "Hierarchy (Master-Detail Layout) with Tabbed Child View" to list all the information in one folder (including sub-folders and files). If there is more files under sub-folder, we can use "+" to explore this folder. (It is greate). If there is nothing in sub-folder, we also get a blank grid which the coulum name the same as others. But I think it shouldn't appear "+" at the right of the folder which don't have files in it.

Do you have any other control to avoid this problem?

Best Regrads
Jack
Telerik team
 answered on 12 Nov 2009
1 answer
140 views
I use a background worker to load data into my grid. It is not bound, due to special requests by the users, I must insert each row manually. After inserting all the data to the grid, I add a programmatic GroupByExpression to automatically group when the grid renders in my application and programmatically expand all the groups.

However, after upgrading to the latest Telerik Winform controls (Q3 2009), the vertical scrollbar disappears -only- for the grids where I have programmatic grouping with automatic group expansion. Other grids in the application do not have any problems. 

Eventually I made the Vertical Scrollbar Visibility to be Always True. However, this still did not solve the problem. The scrollbar does not actually scroll. It is not recognizing that there are more rows to scroll down to. I've even tried manually adjusting the VScrollBar.Maximum value to no avail. 

The scroll will work again if I remove the group on client side, then re-add it, or if I collapse a group then re-expand it, again on client side. But this is cumbersome for users. One other thing to note, if I do not Expand All Groups, the vertical scrollbar shows up perfectly and works fine after expanding the groups on the client side.

I have added a snippet of how I am adding the GroupExpressions below. As well as how I'm using Group Summary Event in this scenario.

 
private void pendingWorker_RunWorkerCompleted (object sender, RunWorkerCompletedEventArgs e) {  
    try {  
        this.gridView.Rows.Clear();  
        this.gridView.MasterGridViewTemplate.GroupByExpressions.Clear();  
        if (documentData != null && documentData.Rows.Count > 0) {  
            int rowCount = 0;  
            foreach (DataRow dr in documentData.Rows) {  
                ModelObject obj = GetModelObject(dr);  
                this.gridView.Rows.AddNew();  
                PopulateRow(obj, rowCount);  
                rowCount++;  
            }  
        }  
        this.gridView.MasterGridViewTemplate.GroupByExpressions.Add("[StatusColumn] Group By [StatusColumn]");  
    } catch (Exception ex) {  
        messageToolTip1.ShowExceptionMessage(ex);  
        logger.Error(ex);  
    }  
    CleanUpLoadingWorker();  
}  
 
void OnGroupSumaryEvaluate (object sender, Telerik.WinControls.UI.GroupSummaryEvaluationEventArgs e) {  
    try {  
        if (e.FormatString.ToLower().Contains("status")) {  
            e.FormatString = "STATUS STANDING : {0}";  
            this.gridView.MasterGridViewTemplate.ExpandAllGroups();  
        }  
    } catch (Exception ex) {  
        messageToolTip1.ShowExceptionMessage(ex);  
        logger.Error(ex);  
    }  
}  


Is there a workaround here that will satisfy user requirements and have the vertical scrollbar work as expected?

Thanks
Jack
Telerik team
 answered on 12 Nov 2009
1 answer
65 views
With Q2 2009 (2009.2.9.729) and even Q3 2009 Beta (2009.2.9.1016), the end-user was able to type the ampersand ("&")-prefixed letter in the Text Property of a RadMenuItem on the ContextMenu to select that item.  Starting with the final release of Q3 2009 (2009.3.9.1103), those letters are non-repsonsive.

Telerik WinForms 2009Q3 (2009.3.9.1103), VB, VS 2005 (v8.0.50727.762 SP.050727-7600), .Net 2.0 (2.0.50727), XP SP3, 3GB, 2.99GHZ, Core2Duo.


Deyan
Telerik team
 answered on 12 Nov 2009
1 answer
118 views
I just installed Telerik Q3 2009 WinForms (2009.3.9.1103) over Q2 2009 (2009.2.9.729) and it's now keeping Focus on the RadMenu vs. the first Visible, Enabled Control (1) on the Modeless System.Windows.Forms.Form (C) I opened from the Modeless System.Windows.Forms.Form (B) the RadMenu is in after selecting a RadMenuItem from that RadMenu even though Form C is the Active Form and its Control 1 is highlighted with a flashing Text Cursor.  By keeping Focus, I mean Left / Right Arrow keys cycle through  the RadMenu options vs. moving through the parts of Control 1 (which btw is a RadDateTimePicker).  Form B is a child of App's Startup Form A.

Telerik WinForms 2009Q3 (2009.3.9.1103), VB, VS 2005 (v8.0.50727.762 SP.050727-7600), .Net 2.0 (2.0.50727), XP SP3, 3GB, 2.99GHZ, Core2Duo.
Deyan
Telerik team
 answered on 12 Nov 2009
9 answers
419 views
Hi All,

I am trying to set a maximum vertical size to be displayed for a child grid at all times, the vertical scroll bar of the child grid enabled in autohide mode in order to be able to see the rest of the rows. By vertical size I mean how many rows to be displayed at any given time in the child grid, and not the vertical height of each individual row. Unfortunately, although I have tried, I cannot find a reference on how to implement this feature. Any suggestions will be highly appreciated.

Kind Regards,


George
Jack
Telerik team
 answered on 12 Nov 2009
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)
Chart (obsolete as of Q1 2013)
Form
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
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Barcode
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
Localization
TimePicker
ButtonTextBox
FontDropDownList
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?