Telerik Forums
UI for WinForms Forum
3 answers
169 views

Hello ... I've scoured the forums for an answer to this seemingly simple request. I have a template setup and it's working great. What I want to do is to 'paint' the color of the bounding box, for the child rows, the same color as their 'parent' row. I know I need to use ViewCellFormatting to achieve the painting of the box but I can't figure out how to get the row color (I'm using Conditional Formatting to color the parent rows) from the parent during the ViewCellFormatting event. The CellFormattingEventArgs only seems to expose the HierarchicalRowInfo object which, if I'm correct in my understanding, represents the Logical tree and the color of the row is from the Visual tree so I need the actual RowElement object representing the parent row. Below is the code for painting my bounding box:

As you can see, I'm using VB.NET but I can always translate C#. I want to replace the Color.GreenYellow with something like e.CellElement.Parent.BackColor. The problem is that the parent is the ScrollableRowsContainer element, not the GridDetailViewRowElement that I'm trying to get. How the heck can I achieve this?

Thanks, Jim

If TypeOf e.CellElement Is GridDetailViewCellElement Then
    Dim row As GridRowElement = e.CellElement.Parent 'This line doesn't actually retrieve the BackColor of the Parent!!!!!!
    e.CellElement.DrawFill = True
    e.CellElement.BackColor = Color.GreenYellow
    e.CellElement.Padding = New Padding(9, 4, 3, 4)
    e.CellElement.Margin = New Padding(10, 0, 0, 0)
    e.CellElement.Parent.
End If

Stefan
Telerik team
 answered on 10 Jul 2015
3 answers
429 views

Hi there

 I'm trying to add rows to a GridViewDecimalColumn with leading zeros. I know there's a property "FormatString" but this is not exactly what I want. I want the numbers always have the same amount of zeros leading. Here you can see my code:

GridViewDecimalColumn col = new GridViewDecimalColumn();
col.FormatString = "{0:0000}";
radGridView1.Columns.Add(col);

This will output the following:

Number 1 will be 0001
Number 2 will be 0002
Number 10 will be 0010
Number 100 will be 0100

But what I'm trying to achieve is:

Number 1 should be 0001
Number 10 should be 00010
Number 100 should be 000100
etc.

Is this possible? Hope you can help me.

Regards,

Danilo

Ralitsa
Telerik team
 answered on 10 Jul 2015
1 answer
124 views

I was looking for information on adding combo boxes and check boxes along with other controls that I can add to a row. I wanted to use a formatted row where I can use the HTML view to format the number of rows per row, but I have not located any help files on this.

 http://www.telerik.com/help/winforms/gridview-viewdefinitions-html-view.html

In the link provided, i wanted to be able to provide a combobox for the city or country, in addition to viewing several rows for 1 entry.

 Any help or a link to a previous forum entry that addresses this would be appreciated.

 

Hristo
Telerik team
 answered on 10 Jul 2015
1 answer
222 views

 

Hi,

 I've gone through this page and have a few questions:

 http://www.telerik.com/help/winforms/gridview-populating-with-data-unbound-mode.html

---------
Reason for using Unbound Mode: I'm building a Multi-threaded application, this application has several slow processes in the background and each of them returns a value. I use these values to fill cells in a gridview one by one without blocking the rest of the user interface. I've got this working quite well and happy with the result. I couldn't have done this with binding (this would have resulted in constantly fully reloading the gridview, now I just modify each cell when needed). This is the reason, why I'm using unbound mode.

---------

Now, for my next modification - I need a hierarchy in the gridview and I'm having trouble getting this to work:

I need something like the following:

 

ROW1: AverageValue1 | AverageValue2 | AverageValue3
    ROW1a: Value1a | Value2a | Value3a
    ROW1b: Value1b | Value2b | Value3b
    ROW1c: Value1c | Value2c | Value3c
ROW2: AverageValue1 | AverageValue2 | AverageValue3
    ROW2a: Value1a | Value2a | Value3a
    ROW2b: Value1b | Value2b | Value3b
ROW3: AverageValue1 | AverageValue2 | AverageValue3
    ROW3a: Value1a | Value2a | Value3a
    ROW3b: Value1b | Value2b | Value3b
    ROW3c: Value1c | Value2c | Value3c
    ROW3d: Value1d | Value2d |  Value3d

 

Now, when following the steps for "hierarchical grid in unbound mode" I'm getting way too many child rows. I believe the reason for this is because I'm using a template like so:

GridViewTemplate template = radGridView1.MasterTemplate.Templates[0];

Then I loop through the amount of childrows that need to be created like so:

 

for (int j = 0; j < rowCount; j++)
{
    template.Rows.AddNew();
}

This results in having way too many childrows. I've just taken two random columnnames as the relationship => I'm assuming this is probably the reason why things aren't working.
The thing is, in my case there is no real relationship between child and parent. The parent is just the average values of all children. Does this mean I need to create an extra column just for the sake of the relationship ?

Also, when using unbound mode (in a non-hierarchical situation) I first create the rows, and then fill them. If in hierarchical mode, I'm getting the impression that I can't create the childrows without filling them (not sure)?

All I really want to do, is create child rows an fill the cells one by one, whenever I can....

Thanks in advance for the help and example !

 

 

 

 

 

Stefan
Telerik team
 answered on 10 Jul 2015
1 answer
639 views

Hello,

We habe to implement a graphical tour planning.

One line for each employee and all tasks on the timeline.

                           10:00-----------11:00--------------12:00---------------13:00

Employee 1.                /------Task1-----/. /-------Task 2-----/

Employee 2.                        /---Task1--/ /---------Task2--------/ /--Task3---/

Employee 3

Is there a way to do this with RadGanttView ?

 Thanks in advance

 

Stefan
Telerik team
 answered on 10 Jul 2015
2 answers
107 views

Hello,

Very good to hear that the RichTextEditorRibbonBar localization provider came out.

Where can I find the RichTextEditorRibbonBar localization file.

Thank you...

Bekir
Top achievements
Rank 1
Iron
 answered on 09 Jul 2015
3 answers
214 views
What is the recommended way to handle validation for each page in the Wizard?

The Validating event for the Wizard itself does not fire for each page change, only when the form is closing.  I could perform validation on SelectedPageChanging, but then I have to branch to multiple routines depending on which page the wizard was on. This method works fine, but ideally, each page itself had its own Validating event.  Or each page had a cancellable "Moving" event with arguments that indicated which way it was going. 

Thoughts?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 08 Jul 2015
1 answer
244 views

I have a grid view with several columns set where AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill.  I do have few columns with a fixed width (i.e. MinWidth = MaxWidth = Width).  This is working fine as you can see in picture Gridview1.  The gridview has the following properties:

this.RadGridViewTansBancaire.MasterTemplate.AllowAddNewRow = false;
this.RadGridViewTansBancaire.MasterTemplate.AllowCellContextMenu = false;
this.RadGridViewTansBancaire.MasterTemplate.AllowColumnChooser = false;
this.RadGridViewTansBancaire.MasterTemplate.AllowColumnHeaderContextMenu = false;
this.RadGridViewTansBancaire.MasterTemplate.AllowColumnReorder = false;
this.RadGridViewTansBancaire.MasterTemplate.AllowDeleteRow = false;
this.RadGridViewTansBancaire.MasterTemplate.AllowDragToGroup = false;
this.RadGridViewTansBancaire.MasterTemplate.AllowEditRow = false;
this.RadGridViewTansBancaire.MasterTemplate.AllowRowResize = false;
this.RadGridViewTansBancaire.MasterTemplate.AutoExpandGroups = true;
this.RadGridViewTansBancaire.MasterTemplate.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill;

 

Now, whenever I group these columns into 2 groups, the fill command is not working anymore as shown in picture Gridview2.

I tried several things, read the posts and the actual commands used are:

RadGridViewTansBancaire.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.None;
ColumnGroupsViewDefinition columnGroupsView = new ColumnGroupsViewDefinition();
columnGroupsView.ColumnGroups.Add(new GridViewColumnGroup(Offix.Culture.Traduire("BANQUE", "BANK")));
columnGroupsView.ColumnGroups[0].Rows.Add(new GridViewColumnGroupRow());
columnGroupsView.ColumnGroups[0].Rows[0].Columns.Add(this.RadGridViewTansBancaire.Columns["BankDescription"]);
columnGroupsView.ColumnGroups[0].Rows[0].Columns.Add(this.RadGridViewTansBancaire.Columns["BankReference"]);
columnGroupsView.ColumnGroups[0].Rows[0].Columns.Add(this.RadGridViewTansBancaire.Columns["BankDate"]);
columnGroupsView.ColumnGroups[0].Rows[0].Columns.Add(this.RadGridViewTansBancaire.Columns["BankMontant"]);

columnGroupsView.ColumnGroups.Add(new GridViewColumnGroup("OFFIX"));
columnGroupsView.ColumnGroups[1].Rows.Add(new GridViewColumnGroupRow());
columnGroupsView.ColumnGroups[1].Rows[0].Columns.Add(this.RadGridViewTansBancaire.Columns["OffixJournal"]);
columnGroupsView.ColumnGroups[1].Rows[0].Columns.Add(this.RadGridViewTansBancaire.Columns["OffixNoJournal"]);
columnGroupsView.ColumnGroups[1].Rows[0].Columns.Add(this.RadGridViewTansBancaire.Columns["OffixDate"]);
columnGroupsView.ColumnGroups[1].Rows[0].Columns.Add(this.RadGridViewTansBancaire.Columns["OffixCode"]);
columnGroupsView.ColumnGroups[1].Rows[0].Columns.Add(this.RadGridViewTansBancaire.Columns["OffixNom"]);
columnGroupsView.ColumnGroups[1].Rows[0].Columns.Add(this.RadGridViewTansBancaire.Columns["OffixType"]);
columnGroupsView.ColumnGroups[1].Rows[0].Columns.Add(this.RadGridViewTansBancaire.Columns["OffixReference"]);
columnGroupsView.ColumnGroups[1].Rows[0].Columns.Add(this.RadGridViewTansBancaire.Columns["OffixNoDocument"]);
columnGroupsView.ColumnGroups[1].Rows[0].Columns.Add(this.RadGridViewTansBancaire.Columns["OffixDebit"]);
columnGroupsView.ColumnGroups[1].Rows[0].Columns.Add(this.RadGridViewTansBancaire.Columns["OffixCredit"]);
columnGroupsView.ColumnGroups[1].Rows[0].Columns.Add(this.RadGridViewTansBancaire.Columns["Verifie"]);

RadGridViewTansBancaire.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
RadGridViewTansBancaire.BestFitColumns();

 

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 08 Jul 2015
1 answer
378 views

hi ,

how can I remove all the boarders of toggleswitch and I want to change its value only by dragging not by clicking. Is it possible?

Todor
Telerik team
 answered on 08 Jul 2015
1 answer
138 views

Hi;

I detected a problem when displaying an alert RadDesktopAlert and select up in the direction of the animation, The control appears outside desktop.

Using other direction out of the alert is resolved, but not what I want, I want you to act as in previous versions with the up direction.

I attached a project where you can see the error perfectly

https://dl.dropboxusercontent.com/u/21787064/RadDesktopAlert.zip

Regards

Hristo
Telerik team
 answered on 08 Jul 2015
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
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
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
NavigationView
Callout
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
SpeechToTextButton
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?