Telerik Forums
UI for WinForms Forum
4 answers
565 views
Hi again,

I have successfully implemented a radar area line chart as per attached image. I have the following questions:

(a) How I can programmatically change the thickness of the displayed line?

(b) How I can change the colour of each category line depending on the value, e.g. value =100 will be red, value =10 will be blue and so on.

Regards,


George
Dimitar
Telerik team
 answered on 06 Jun 2014
1 answer
152 views
Hello admin,

Could you show me how to multi-select nodes in RadGanttViewElement?

Thanks
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 06 Jun 2014
5 answers
236 views
Hi there, 

I'm trying the RichTextBox and something doesn't seem right. In the properties window if I add a value for the Text property and run the app it doesn't show. 
Same if I dynamically add a RichTextBox at runtime and try and apply a value to the text property... nothing shows up. 

Questions:
1. Why doesn't the text property work? 
2. Does winforms come with the equivalent of Asp.net for Ajax RadEditor and is RichTextBox it? 

Regards,
Jacques
Stefan
Telerik team
 answered on 06 Jun 2014
3 answers
296 views
On adding new row in RadGridView, I am assigning DefaultValues in DefaultValuesNeeded event. When I start typing in the new row, the default values appear but the moment I hit enter on the row ( so that it is added to the current grid ) , all the default values just disappear.
I have created columns dynamically.

Please tell me what is the issue or am I missing anything ?

Below is my code.

grid code:

private void BindGrid()
        {
 
            this.ExportSettingGridView.AllowAddNewRow = false;
            this.ExportSettingGridView.AutoGenerateColumns = false;
            this.ExportSettingGridView.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
 
            this.ExportSettingGridView.ShowGroupPanel = false;
            this.ExportSettingGridView.MasterTemplate.EnableGrouping = false;
            this.ExportSettingGridView.EnableHotTracking = true;
 
            //Settings Name column
            GridViewTextBoxColumn nameCol = new GridViewTextBoxColumn();
            nameCol.FieldName = "Name";
            nameCol.Name = "Name";
            nameCol.HeaderText = "Export Setting";
            this.ExportSettingGridView.Columns.Add(nameCol);
 
            //Settings Na Option Combo Box
            GridViewComboBoxColumn naDataOptionCol = new GridViewComboBoxColumn();
            naDataOptionCol.FieldName = "NaData.NaDataOption";
            naDataOptionCol.Name = "NaData.NaDataOption";
            naDataOptionCol.HeaderText = "NA Data Option";
            naDataOptionCol.DataSource = Enum.GetValues(typeof(NADataOption));
            naDataOptionCol.DataType = typeof(NADataOption);
            naDataOptionCol.DataSourceNullValue = NADataOption.BLANKROW;       
            this.ExportSettingGridView.Columns.Add(naDataOptionCol);
 
            //Setting NA Option Custom Text field Columns
            GridViewTextBoxColumn naDataOptionCustomCol = new GridViewTextBoxColumn();
            naDataOptionCustomCol.FieldName = "NaData.Custom";
            naDataOptionCustomCol.Name = "NaData.Custom";
            naDataOptionCustomCol.HeaderText = "NA Data Option Custom";
            this.ExportSettingGridView.Columns.Add(naDataOptionCustomCol);
 
            //Setting IncludePartialLastPeriod
            GridViewComboBoxColumn includePartialLastPeriodCol = new GridViewComboBoxColumn();
            includePartialLastPeriodCol.FieldName = "IncludePartialLastPeriod";
            includePartialLastPeriodCol.HeaderText = "Include Partial Last Period";
            includePartialLastPeriodCol.Name = "IncludePartialLastPeriod";
            includePartialLastPeriodCol.DataSource = new String[] { "True", "False" };
            includePartialLastPeriodCol.DataType = typeof(bool);
            this.ExportSettingGridView.Columns.Add(includePartialLastPeriodCol);
 
            //Setting Sorting Column
            GridViewComboBoxColumn sortingCol = new GridViewComboBoxColumn();
            sortingCol.FieldName = "Sorting";
            sortingCol.HeaderText = "Sorting";
            sortingCol.Name = "Sorting";
            sortingCol.DataSource = new String[] { "ASC", "DESC" };
            this.ExportSettingGridView.Columns.Add(sortingCol);
 
            //Setting Data Load Position
            GridViewComboBoxColumn dataPostionOptionsCol = new GridViewComboBoxColumn();
            dataPostionOptionsCol.FieldName = "DataLoadPosition.CursorLocation";
            dataPostionOptionsCol.Name = "DataLoadPosition.CursorLocation";
            dataPostionOptionsCol.HeaderText = "Cursor Location";
            dataPostionOptionsCol.DataSource = new String[] { "True", "False" };
            dataPostionOptionsCol.DataType = typeof(bool);
            dataPostionOptionsCol.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
            this.ExportSettingGridView.Columns.Add(dataPostionOptionsCol);
 
            //Setting Data Load Cell location
            GridViewTextBoxColumn cellCol = new GridViewTextBoxColumn();
            cellCol.FieldName = "DataLoadPosition.Cell";
            cellCol.Name = "DataLoadPosition.Cell";
            cellCol.HeaderText = "Cell Location";
            this.ExportSettingGridView.Columns.Add(cellCol);
 
            this.ExportSettingGridView.BestFitColumns();
        }
          private void newButton_Click(object sender, EventArgs e)
          {
            this.ExportSettingGridView.AllowAddNewRow = !this.ExportSettingGridView.AllowAddNewRow;
          }

        private void ExportSettingGridView_DefaultValuesNeeded(object sender, GridViewRowEventArgs e)
        {
            if (e.Row != null && e.Row is GridViewNewRowInfo)
            {
                e.Row.Cells["NaData.NaDataOption"].Value = currentProfile.NaData.NaDataOption;
                e.Row.Cells["NaData.Custom"].Value = currentProfile.NaData.Custom;
                e.Row.Cells["DataLoadPosition.CursorLocation"].Value = currentProfile.DataLoadPosition.CursorLocation;
                e.Row.Cells["DataLoadPosition.Cell"].Value = currentProfile.DataLoadPosition.Cell;
            }
        }


George
Telerik team
 answered on 06 Jun 2014
3 answers
423 views
hello everyone..
am using telerik radGridView for windows forms. I need to have atleast of 3 levels of hierarchy in my grid. And, it is essential for me to follow "Load-on-Demand" method to bind the inner grids.
Currently am doing this:


   private void Form2_Load(object sender, EventArgs e)
        {
            this.radGridView1.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;




            //First Child Template Begins


            GridViewTemplate firstLevelTemplate = new GridViewTemplate();
            firstLevelTemplate.Columns.Add("Name", "Name", "Name");
            firstLevelTemplate.Columns.Add("Owner", "Owner", "Owner");
            firstLevelTemplate.Columns.Add("Parent", "Parent", "Parent");


            //First Child Template Ends


            this.radGridView1.Templates.Add(firstLevelTemplate);
            this.radGridView1.Templates[0].HierarchyDataProvider = new GridViewEventDataProvider(firstLevelTemplate);
            this.radGridView1.RowSourceNeeded += new GridViewRowSourceNeededEventHandler(radGridView1_RowSourceNeeded);
        }




        void radGridView1_RowSourceNeeded(object sender, GridViewRowSourceNeededEventArgs e)
        {
            string serverInstance = e.ParentRow.Cells[0].Value.ToString();
            ServerConnection conn = new ServerConnection();
            conn.ServerInstance = serverInstance;
            Server srv = new Server(conn);
       
            DatabaseCollection DBs = srv.Databases;
            foreach (Database db in DBs)
            {
                GridViewRowInfo row = e.Template.Rows.NewRow();
                row.Cells[0].Value = db.Name;
                row.Cells[1].Value = db.Owner;
                row.Cells[2].Value = db.Parent.Name;


                e.SourceCollection.Add(row);
            }

        }


It  beautifully adds the two levels! I want a third level now. How to do that?? I tried adding GridViewTemplate to e.Template.Templates, but no luck..please help me..
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 06 Jun 2014
2 answers
491 views
Hi there, 

I'm new to telerik controls, I want to drag and drop at text on the richtexbox. Can someone help me?

thinks.
Justin
Top achievements
Rank 1
 answered on 06 Jun 2014
1 answer
855 views
Hi All ,
I am getting the error "Object reference not set to an instance of an object." when trying to filter on gridview.
my functional requirement is to referesh grid data on every 5 seconds. I get this error when i keep open filter popup  above 5 seconds and trying to filter the data. However its working if i try to filter within 5 seconds.

 Please help to suggest .

The followings are the stacktrace details for your reference:

System.NullReferenceException was unhandled
  Message="Object reference not set to an instance of an object."
  Source="Telerik.WinControls.GridView"
  StackTrace:
       at Telerik.WinControls.UI.GridHeaderCellElement.filterPopup_FilterConfirmed(Object sender, EventArgs e)
       at Telerik.WinControls.UI.BaseFilterPopup.OnFilterConfirmed()
       at Telerik.WinControls.UI.RadListFilterPopup.OnButtonOkClick(EventArgs e)
       at Telerik.WinControls.RadItem.OnClick(EventArgs e)
       at Telerik.WinControls.UI.RadButtonItem.OnClick(EventArgs e)
       at Telerik.WinControls.UI.RadButtonElement.OnClick(EventArgs e)
       at Telerik.WinControls.RadItem.DoClick(EventArgs e)
       at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
       at Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e)
       at Telerik.WinControls.RadControl.OnMouseUp(MouseEventArgs e)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at Telerik.WinControls.RadControl.WndProc(Message& m)
       at Telerik.WinControls.UI.RadPopupControlBase.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       at WindowsApplication2.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 05 Jun 2014
1 answer
128 views
I have a GridView with a second-level hierarchy. I apply a filter to the BindingSource based on the node selected on a TreeView, for example: GridViewBindingSource.Filter = "Department = '" & e.Node.Text & "'". However, if any row is expanded (i.e. showing the second-level hierarchy information) it closes when the BindingSource is filtered. I would like to have any row that is open to remain open. Is there a way to do this?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 05 Jun 2014
1 answer
1.1K+ views
Hi Telerik
is there a Property to change hover color for buttons (radButton , ToggleButton) in UI Element Editor
without using Visual Studio Builder

if not how to change hover color in Visual Studio Builder  in single button without changing all

thank you
Dimitar
Telerik team
 answered on 05 Jun 2014
1 answer
123 views
Hi,

I am exporting the XAML RadDocument from the RichTextBox to use for my own Gdi+ rendering. To do this I need the text color as (A)RGB values, but especially when I am pasting webcontent into the RichTextBox I sometimes get color names (such as "red", "lime" and so on) as text color. Is there any way to make sure colors in the XAML are always ARGB values without having to convert them myself?

Thanks a lot for your help.

Regards
Jan
Dimitar
Telerik team
 answered on 05 Jun 2014
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
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
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?