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

I was wondering if anyone has any experience reloading a HostWindow.  I can get the HostWindows I need from my DockWindows, gather the info I need from it, close the the HostWindow, make my new calculations, create a new HostWindow and add it to the Dock.  However, this just puts the new HostWindow on the most recent document that had focus.  What I want is for the new HostWindow to show up/refresh in the same spot.  Does anyone know if this is possible?  

This is what I was thinking; but it leaves the old HostWindow in the Dock and does not seem to add the "new" HostWindow to the dock.
//set the current window to a host window, if not a host window will return null
HostWindow hw = this.dockMain.DockWindows[i] as HostWindow;
 
//creates new form in hostwindow
hw = new HostWindow(createRightForm(tempModel, formName));

If you need anymore info from me just let me know.  Thanks.  
Julian Benkov
Telerik team
 answered on 16 Mar 2012
5 answers
755 views
How do i get scroll bars to appear on a radribbonform.
I have a simple project with a radribbon form and a rad panel
I have set autoscroll to true but the scroll bars do not appear as the form is resized
Ivan Todorov
Telerik team
 answered on 16 Mar 2012
1 answer
207 views
Is there a way to write this in winforms. I got this example from silverlight docs.
Private Function CreateChart_DefaultView() As Telerik.Windows.Controls.RadChart
    Dim telerikChart As New Telerik.Windows.Controls.RadChart()
    'Chart Title
    telerikChart.DefaultView.ChartTitle.Content = "Year 2009"
    telerikChart.DefaultView.ChartTitle.HorizontalAlignment = HorizontalAlignment.Center
    'Chart Legend
    telerikChart.DefaultView.ChartLegend.UseAutoGeneratedItems = True
    'Line Chart
    Dim lineSeries As New DataSeries()
    lineSeries.LegendLabel = "Turnover"
    lineSeries.Definition = New LineSeriesDefinition()
    Dim dataPoint As New DataPoint()
    dataPoint.YValue = 154
    dataPoint.XCategory = "Jan"
    lineSeries.Add(dataPoint)
    dataPoint = New DataPoint()
    dataPoint.YValue = 138
    dataPoint.XCategory = "Feb"
    lineSeries.Add(dataPoint)
    dataPoint = New DataPoint()
    dataPoint.YValue = 143
    dataPoint.XCategory = "Mar"
    lineSeries.Add(dataPoint)
    dataPoint = New DataPoint()
    dataPoint.YValue = 120
    dataPoint.XCategory = "Apr"
    lineSeries.Add(dataPoint)
    dataPoint = New DataPoint()
    dataPoint.YValue = 135
    dataPoint.XCategory = "May"
    lineSeries.Add(dataPoint)
    dataPoint = New DataPoint()
    dataPoint.YValue = 125
    dataPoint.XCategory = "Jun"
    lineSeries.Add(dataPoint)
    dataPoint = New DataPoint()
    dataPoint.YValue = 179
    dataPoint.XCategory = "Jul"
    lineSeries.Add(dataPoint)
    dataPoint = New DataPoint()
    dataPoint.YValue = 170
    dataPoint.XCategory = "Aug"
    lineSeries.Add(dataPoint)
    dataPoint = New DataPoint()
    dataPoint.YValue = 198
    dataPoint.XCategory = "Sep"
    lineSeries.Add(dataPoint)
    dataPoint = New DataPoint()
    dataPoint.YValue = 187
    dataPoint.XCategory = "Sep"
    lineSeries.Add(dataPoint)
    dataPoint = New DataPoint()
    dataPoint.YValue = 193
    dataPoint.XCategory = "Nov"
    lineSeries.Add(dataPoint)
    dataPoint = New DataPoint()
    dataPoint.YValue = 176
    dataPoint.XCategory = "Dec"
    lineSeries.Add(dataPoint)
    telerikChart.DefaultView.ChartArea.DataSeries.Add(lineSeries)
    'Bar Chart
    Dim barSeries As New DataSeries()
    barSeries.LegendLabel = "Expenses"
    barSeries.Definition = New BarSeriesDefinition()
    dataPoint = New DataPoint()
    dataPoint.YValue = 45
    dataPoint.XCategory = "Jan"
    barSeries.Add(dataPoint)
    dataPoint = New DataPoint()
    dataPoint.YValue = 48
    dataPoint.XCategory = "Feb"
    barSeries.Add(dataPoint)
    dataPoint = New DataPoint()
    dataPoint.YValue = 53
    dataPoint.XCategory = "Mar"
    barSeries.Add(dataPoint)
    dataPoint = New DataPoint()
    dataPoint.YValue = 41
    dataPoint.XCategory = "Apr"
    barSeries.Add(dataPoint)
    dataPoint = New DataPoint()
    dataPoint.YValue = 32
    dataPoint.XCategory = "May"
    barSeries.Add(dataPoint)
    dataPoint = New DataPoint()
    dataPoint.YValue = 28
    dataPoint.XCategory = "Jun"
    barSeries.Add(dataPoint)
    dataPoint = New DataPoint()
    dataPoint.YValue = 63
    dataPoint.XCategory = "Jul"
    barSeries.Add(dataPoint)
    dataPoint = New DataPoint()
    dataPoint.YValue = 74
    dataPoint.XCategory = "Aug"
    barSeries.Add(dataPoint)
    dataPoint = New DataPoint()
    dataPoint.YValue = 77
    dataPoint.XCategory = "Sep"
    barSeries.Add(dataPoint)
    dataPoint = New DataPoint()
    dataPoint.YValue = 85
    dataPoint.XCategory = "Oct"
    barSeries.Add(dataPoint)
    dataPoint = New DataPoint()
    dataPoint.YValue = 89
    dataPoint.XCategory = "Nov"
    barSeries.Add(dataPoint)
    dataPoint = New DataPoint()
    dataPoint.YValue = 80
    dataPoint.XCategory = "Dec"
    barSeries.Add(dataPoint)
    telerikChart.DefaultView.ChartArea.DataSeries.Add(barSeries)
    Return telerikChart
End Function
I am well versed on using winforms chart control. I would like to do the same using RadChart. A few examples would be nice. Thank you.

G
Evgenia
Telerik team
 answered on 16 Mar 2012
1 answer
174 views
Hi

I need to "drag and drop" columns from a gridview to another control; for example a simple text box that just prints the header name when the column is droped on to it. 

I have mined the posts here and the WinFroms demo, all implementing on the drag and drop service:
  RadDragDropService dragDropService = this.radGridView1.GridViewElement.GetService<RadDragDropService>();
            dragDropService.PreviewDragOver += new System.EventHandler<RadDragOverEventArgs>(dragDropService_PreviewDragOver);
            dragDropService.PreviewDragDrop += new System.EventHandler<RadDropEventArgs>(dragDropService_PreviewDragDrop);

 However, it seems that PreviewDragOver  and PreviewDragDrop  events are fired only when hitting on the listed members here:
http://www.telerik.com/help/winforms/t_telerik_wincontrols_ui_listcontroldragdropservice.html 

and not a textbox or other generic container.

My question is: is there anyway i can allow and detect a column drop using some other code OR implement a new control that will implement the radservice

Thanks in advance.
Jack
Telerik team
 answered on 16 Mar 2012
8 answers
459 views
I am using a licensed version of 2011.Q2 so it's not the latest but it's all that I have for the time being.

I set a filter callback for a ComboBoxColumn in the CellEditorInitialized event handler like this:

 

RadDropDownListEditor editor = e.ActiveEditor as RadDropDownListEditor;
if (editor != null)
{
    RadDropDownListEditorElement editorElement = (RadDropDownListEditorElement)editor.EditorElement;
    editorElement.Filter = FilterWrappers;
}

 

This works fine. The problem is that I have another ComboBoxColumn with no filter on it. When I click in the first column and select a value and then click in the second column the filter method for the first column is called. It is called once for every item in the combo but the entries contain items from the first combo and items from the second combo. Why is this happening?

Julian Benkov
Telerik team
 answered on 15 Mar 2012
1 answer
144 views
Hi,
I have simple grid that contains 7 text columns with names column1, column2, ... column7.
When I apply following code I got layout that is shown in file grid1.png.
HtmlViewDefinition view = new HtmlViewDefinition();
view.RowTemplate.Rows.Add(new RowDefinition());
view.RowTemplate.Rows.Add(new RowDefinition());
view.RowTemplate.Rows.Add(new RowDefinition());
 
CellDefinition cell = new CellDefinition();
//row1
cell.UniqueName = "column1";
cell.RowSpan = 1;
cell.ColSpan = 2;
view.RowTemplate.Rows[0].Cells.Add(cell);
 
cell = new CellDefinition();
cell.UniqueName = "column4";
cell.RowSpan = 3;
cell.ColSpan = 1;
view.RowTemplate.Rows[0].Cells.Add(cell);
 
cell = new CellDefinition();
cell.UniqueName = "column5";
cell.RowSpan = 1;
cell.ColSpan = 1;
view.RowTemplate.Rows[0].Cells.Add(cell);
 
//row2
cell = new CellDefinition();
cell.UniqueName = "column2";
cell.RowSpan = 2;
cell.ColSpan = 1;
view.RowTemplate.Rows[1].Cells.Add(cell);
 
cell = new CellDefinition();
cell.UniqueName = "column3";
cell.RowSpan = 2;
cell.ColSpan = 1;
view.RowTemplate.Rows[1].Cells.Add(cell);
 
cell = new CellDefinition();
cell.UniqueName = "column6";
cell.RowSpan = 1;
cell.ColSpan = 1;
view.RowTemplate.Rows[1].Cells.Add(cell);
 
//row3
cell = new CellDefinition();
cell.UniqueName = "column7";
cell.RowSpan = 1;
cell.ColSpan = 1;
view.RowTemplate.Rows[2].Cells.Add(cell);
 
radGridView1.ViewDefinition = view;

Grid2.png shows what I want to achieve.
I am using 2011.3.11 version of Telerik.
Thanks
Ivan Petrov
Telerik team
 answered on 15 Mar 2012
5 answers
547 views
I've just replaced a competitor's IP address mask input control with Telerik's Winforms 2011 Q2 and I'm disapointed with the functionality. Dropping the RadMaskedEditBox in place with MaskType = IP presented two problems:

When typing an IP address of 10.5.2.97 (with periods) it ends up '10 .5 .2 .97' in the box and requires custom reformatting to remove embedded spaces to make it into a valid IP address. Am I missing something? 

Second and much more minor issue is that I could not find an easy way to make this controls blue border look the same as standard .NET controls of black; changing the Theme to ControlDefault did not work.
Peter
Telerik team
 answered on 15 Mar 2012
1 answer
271 views
I want to switch over to the RADChart from a normal .net chart. The chart must be a bar chart with two series. It gets the XAxis Zfrom column 1 in the data table and the YValue from the second column.
This is the code I used for the .net chart

Me.Chart2.Series("MeterOne").XValueMember = "period"
        Me.Chart2.Series("MeterTwo").XValueMember = "period"
        Me.Chart2.Series("MeterOne").YValueMembers = "MeterOne"
        Me.Chart2.Series("MeterTwo").YValueMembers = "MeterTwo"
        Me.Chart2.ChartAreas(0).AxisX.Interval = 1

This code works perfectly but I don't know how to do this with the RADChart.
Evgenia
Telerik team
 answered on 15 Mar 2012
2 answers
345 views
Hello,

I get this warning since I have updated from Q3 2011 to Q1 2012.
Now everything works but how can I get rid of this warning ?

Warning    3    The referenced assembly "Telerik.WinControls.UI.Design, Version=2012.1.301.40, Culture=neutral, PublicKeyToken=5bb2a467cbec794e, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project.



Thank you.
Jack
Telerik team
 answered on 15 Mar 2012
1 answer
125 views
Hi All,

I use datatable as datasource to connect to gridview. Now I would like all content in column 2 have an icon. What do I need to do ?

Thanks
Ivan Petrov
Telerik team
 answered on 14 Mar 2012
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?