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

I have created a custom theme for our application. I have themed the RadGridView and the RadScrollbars. The issue I have is the scrollbars on the grid.do not respect the theme that was created for the scrollbars. The scrollbar theme does not have dark borders around all of the objects, they are light gray. Yet the grid does not have the light borders. Is these something I am missing?

There is a screen shot attached.

Thanks,

Ben

Dimitar
Telerik team
 answered on 02 May 2016
4 answers
402 views

Hello,

Let me start with what my overall goal is, just in case I'm taking the completely wrong approach to this:
I have multiselect turned on on my RadGridView. I would like to allow a user to quickly select all the ChildRows of a group by just clicking on that specific GroupRow. I would also like to allow them to select multiple groups at the same time by holding shift or ctrl. This could be a combination of ChildRows and GroupRows.

 

Here's what I've tried doing:
1. Using the SelectionChanged event. When I select a GroupRow, the SelectedRows.Count property of my RadGridView is 0 (ie the IsSelected property of the GroupRow that I just selected is still false). I could use the CurrentRow property and just set all of the ChildRows of the current GroupRow to selected, but if the user holds down shift and selects many GroupRows at once, this will only catch the last one.

2. Using the CurrentRowChanged event. I'm not able to use this for the same reason as above: I can only select the ChildRows of the GroupRow that is last in the selection list.

3. Using the SelectionChanging event. Surprisingly, only a single row exists in e.Rows, despite me selecting multiple GroupRows.

 

So I'm left with CurrentRowChanging. With this event, I'm given the OldRow and the NewRow, so it is (probably) possible to determine if the user is holding down ctrl or shift, determine whether the user has filtered or sorted the rows, and then manually select each ChildRow under each GroupRow based on this logic, but that just seems a little obscure and unnecessary.

 

Here is my code (there's nothing to it)... I tried programatically selecting the 2nd group row as well, but the property will not set:

private void RadForm1_Load(object sender, EventArgs e)
{
    DataTable dt = new DataTable();
 
    dt.Columns.Add("col1", typeof(string));
    dt.Columns.Add("col2", typeof(int));
 
    dt.Rows.Add("group1", 0);
    dt.Rows.Add("group1", 1);
    dt.Rows.Add("group1", 2);
    dt.Rows.Add("group1", 3);
    dt.Rows.Add("group2", 0);
    dt.Rows.Add("group2", 1);
    dt.Rows.Add("group3", 0);
    dt.Rows.Add("group3", 1);
    dt.Rows.Add("group4", 0);
    dt.Rows.Add("group5", 1);
    dt.Rows.Add("group6", 0);
    dt.Rows.Add("group7", 1);
 
    radGridView1.DataSource = dt;
    radGridView1.GroupDescriptors.Add(new Telerik.WinControls.UI.GridGroupByExpression("col1 GROUP BY col1"));
 
    radGridView1.Groups[1].GroupRow.IsSelected = true;
}

 

Thank you!

Dimitar
Telerik team
 answered on 02 May 2016
1 answer
178 views

Hello,

Is it possible to put an image on a RadMenu bar, and have it aligned all the way to the right?  You would have your standard menus (File, Edit, Help) on the left, and at the other end place a logo image.

 

Thanks,

George

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 May 2016
3 answers
174 views

Hi, 

Is it possible to mail merge labels as you can do in Word? I can't find this feature anywhere on the mail merge documentation.

I did find this feature request but I don't know if this is requesting the feature for Winforms and if the feature has been implemented yet.

 

Best Regards

Mohammed

Dimitar
Telerik team
 answered on 02 May 2016
7 answers
557 views

Hi,

Labview has a .NET Container to host .Net Windows Forms Controls *)

I make a simple Example with  2 .NET Containers for RadPropertyGrid  and PropertyGrid .

And assign a new instance of Printdialog of System.Windows.Forms to SelectedObject.

I thought I could replace the PropertyGrid  with RadPropertyGrid  (more features,  modern look), but RadPropertyGrid doesnt work.

What could be the problem?

I attached also the simple Labview 2015 vi (rename PropGrid.vi.gif to PropGrid.vi)

Peter

*) see an complex Example with Datagridview: https://github.com/unipsycho/LabVIEWdotNetDataGrid

Hristo
Telerik team
 answered on 29 Apr 2016
6 answers
736 views

Hi,

I'm trying to get the richtexteditor to display white text on a black background. (That's a requirement for us).

Simply setting the back and forecolors doesn't really work well;

_viewer.BackColor = Color.Black;
_viewer.ForeColor = Color.White;
_viewer.RichTextBoxElement.BackColor = Color.Black;
_viewer.RichTextBoxElement.ForeColor = Color.White;

I have also tried to change the paragraphs, but that still leaves a white paper, with paragraphs with  black background.

_viewer.ChangeParagraphBackground(Color.Black);
var documentEditor = new RadDocumentEditor(_viewer.Document);
documentEditor.ChangeForeColor(Color.White);
documentEditor.ChangeParagraphBackground(Color.Black);
_viewer.Document.Selection.Clear();

 

Any advice on how I can set it up ?

 

 

Bart
Top achievements
Rank 1
 answered on 29 Apr 2016
3 answers
146 views

Hi,

 

I have a popup contextmenu that needs to show on the mouse right click on the data cell, BUT SHOULD NOT SHOW when the user clicks or right clicks on the grid header.

Here is my code. How to capture the Grid header click by the mouse?

Private Sub grdInstPymt_MouseDown(sender As Object, e As MouseEventArgs) Handles grdInstPymt.MouseDown
Try
     If e.Button = System.Windows.Forms.MouseButtons.Right Then
         Me.ContextMenuStrip = PopUpMenu
         PopUpMenu.Show()
     End If
Catch ex As Exception
End Try
End Sub

Dimitar
Telerik team
 answered on 29 Apr 2016
1 answer
146 views
I've bound a RadBinding Navigator and RadDataEntry to a localdb binding source.  At runtime I can browse the db entries but if I make any changes or add a table entry....it isn't saved into the table.  Do I have to do individual insert/update sql for each field?  For some reason, looking at the documentation I thought the changes would be automatically stored?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 28 Apr 2016
7 answers
374 views

Hello,

I'd like to remove the horizontal border in a grid within groups (GridViewColumnGroup not GroupDescriptor).

See the attached image, the green (verticals) borders are ok the red (horizontal) borders between the cells in the group are the ones I'd like to remove. (For normal cells and cells of the summary row)

I've tried the normal formatting events, but I found no information if a cell/row is inside a group?

So is this possible at all?

--

Also the GridViewColumnGroupRow.ColumnCollection is marked deprecated, so what is the best way to do this (the ColumnNameCollection dosen't help)?

GridViewColumnGroupRow groupRow = new GridViewColumnGroupRow();
groupRow.Columns.Add(this.kMRadGridView1.Columns["column"]);

Kind regars

 

Dimitar
Telerik team
 answered on 28 Apr 2016
1 answer
200 views

Good day!

I use PivotGrid in conjunction with ChartView.
As one of the columns of data to implement a class for adding a field of type TimeSpan.

This code implements summary of TimeSpan:

/// <summary>
    /// Computes the sum of TimeSpan items during pivot grouping
    /// </summary>
    public class TimeSpanSum : AggregateFunction
    {
        protected override AggregateValue CreateAggregate(Type dataType)
        {
            return new TimeSpanAggregateValue();
        }
 
        public override string DisplayName
        {
            get { return PivotGridLocalizationProvider.CurrentProvider.GetLocalizedString(PivotStringId.Sum); }
        }
 
        protected override void CloneCore(Cloneable source)
        {
            //
        }
 
        protected override Cloneable CreateInstanceCore()
        {
            return new TimeSpanSum();
        }
 
        public override string ToString()
        {
            return "Sum";
        }
    }

This code adding aggregate description:

dataProvider.AggregateDescriptions.Add(new PropertyAggregateDescription
{
    PropertyName = ObjectHelper<PivotGridUnitStateDto>.GetPropertyName(x => x.Duration),
    CustomName = "Duration",
    AggregateFunction = new TimeSpanSum(),
    StringFormatSelector = new TimeSpanStringFormatSelector()
});

But ChartView generate exception on paint any data:

Unable to bring the object type "System.TimeSpan" type "System.IConvertible". (Mscorlib)
------------------------------
Program Location:
 
   Ð² System.Convert.ToDouble(Object value)
   Ð² Telerik.WinControls.UI.PivotGridChartDataProvider.UpdateChartCore()
   Ð² Telerik.WinControls.UI.PivotGridChartDataProvider.UpdateChartData()
   Ð² Telerik.WinControls.UI.PivotGridChartDataProvider.updateTimer_Tick(Object sender, EventArgs e)

How can I fix this error?

 

Hristo
Telerik team
 answered on 27 Apr 2016
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
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
SplashScreen
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?