Telerik Forums
UI for WinForms Forum
5 answers
328 views
Hi,

I work with radGridView and color some cells according to the option set by user. So I created a function to color/uncolor cell of the grid. Bellow the fonction to reset the color of the (second columns of the) grid :

private bool ResetCellsColor(RadGridView radGridView)
{
    Boolean ret = true;
 
    try
    {
        GridViewColumn gvc = null;
         
        if (radGridView.Columns.Count > 2)
        {
            gvc = radGridView.Columns[2] as GridViewColumn;
        }
 
        if (gvc == null)
        {
            ret = false;
        }
        else
        {
            for (int i = 0; i < radGridView.Rows.Count; i++)
            {
                if (radGridView.Rows[i].IsVisible)
                {
                    GridViewRowInfo gvri = radGridView.GridElement.GridViewInfo.Rows[i] as GridViewRowInfo;
                    if (gvri == null)
                    {
                        ret = false;
                        continue;
                    }
 
                    GridCellElement gce = radGridView.TableElement.GetCellElement(gvri, gvc) as GridCellElement;
                                                 
                    if (gce != null)
                    {
                        gce.ResetValue(VisualElement.ForeColorProperty);
                        gce.ResetValue(VisualElement.FontProperty);
                        gce.DrawFill = false;
                    }
                    else
                    {
                        ret = false;
                    }
                }
            }
        }
    }
    catch{ ret = false; }
     
    return ret;
}


This function work well in most of cases, but when I delete (all) the rows of my grid and add new ones and then call this function again, that doesn't work : the GridCellElement returns null. If I give the control to the user and then call again the function, it will work.
In my case, it works for the 4 first line of my radGridView (that contains 15 rows). All the rows are threated the same way and the Value of all cells are defined and accessible.

It seems that the source of the problem is in the radGridView.TableElement.VisualRows where some items are missing. They are only four element (instead of 15) in VisualRows object.

Do you have an idea to how solve the problem ?


Best regards,

Georges DE VOS.




Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 Jul 2017
3 answers
170 views

Is there any way to detect/is there an event raised when a user cancels an insert?

When the user clicks to enter data on the new row, pressing escape twice or clicking off the row twice cancels the insert and reinstates the "click here to enter a new row" banner.

 

Is there anyway to detect when this happens?

 

I am trapping when a user starts an insert, and also trapping the AddedNew event to detect when the user completes an insert but also need to know when they choose to cancel one.

Many thanks,

Mark

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 Jul 2017
1 answer
43 views

I saw the code for Java and it almost made sense but almost didn't quite get me there:

Can anyone post a snippet of how to sort an unbound grid by one or more columns? 

Thank you.

-C

Dimitar
Telerik team
 answered on 27 Jul 2017
2 answers
145 views
I would like to be able to use a BindlingList of Node as a datasource for the treeview, but I'm unsure of how to set up the properties, Children in Node will contain Children, and so forth.   

class Node
{
  public string Title; //DisplayMember
  public string Value; //ValueMember
  public bool IsActive; //CheckedMember
  public List<Node> Children = new List<Node>(); //Children of this node here
   
  public Node()
  {
     
  }
   
  public Node(string title, string value, bool isActive, List<Node> children)
  {
    Title = title;
    Value = value;
    IsActive = isActive;
    Children = children;
  }
}
Bruce
Top achievements
Rank 2
 answered on 26 Jul 2017
1 answer
130 views
I have noticed some strange behavior when I try to export chart as an image when using ShowGrid property. My Legend overlay by grid.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 26 Jul 2017
1 answer
90 views

The description in visual studio appears to be a stub in v2017.2.613.40
The online documentation is seeming just a stub as well. 
http://docs.telerik.com/devtools/winforms/api/html/p_telerik_wincontrols_ui_radtreeview_hideselection.htm

Can you tell me what the property actually does? (and perhaps report this issue to the powers that be?) 

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 26 Jul 2017
8 answers
1.0K+ views

Can't seem to find an answer that works on the forums anywhere for this one.

When I press enter when in edit mode on a text cell, I want to insert a new line rather than ending the cell edit, but no combination of catching key presses or any other grid or cell events seems to be able to achieve this.

Any help with this would be greatly appreciated.

Shane

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Jul 2017
2 answers
179 views

I wish I knew a better way to report a Bug other than filling out a Support-Ticket:  I don't need support for this - I'm reporting it to help you folks make a better product.  If I'm in the wrong location or if you folks would like to insist on me creating Support Tickets in the future, please just say the word and i'll make sure it happens.   Now, onto my bug:

 

If you have a RibbonBar with the first tab set Enabled = False, it looks like its using a different font than the rest of the tabs and its chopped off.  I tried this with no Theme, Windows8 and a few others...all the same so I'm pretty sure it's not Theming causing this.

 

Please look at my attached screen snips to see what I'm talking about.

 

Peace, all :)

-C

 

Bug #2

This one is super irritating - when a RadRibbonForm.WindowState = Maximized, the application is NOT maximized.  It's very, very close! But

Dimitar
Telerik team
 answered on 25 Jul 2017
8 answers
234 views

Hi..Telerik Team

I am facing problem when add photo album viewer element inside my project. If i am running example from telerik there is no error but when i export into my project there is pop up few error.

I had attach some ss from my project. Appreciate your help to solve my problem.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Jul 2017
3 answers
191 views

I'm a WinForms developer - have been for a very long time now.  Anyway, as much as I love Visual Studio the one thing that I truly dislike is their color-selector that drops down in the Properties window whenever you click on the ... button.  Ok for selecting System or Web colors its fine but lets face it - that custom color thing they haven't upgraded in YEARS is the worst.

So, ages ago I built my own Color Selector that I use to replace that thing in the IDE but then I discovered Telerik controls a few years back and it hits me!  There's a VERY NICE color selector in these controls which does everything my ancient one did PLUS it includes Web and System colors.

 

Here's my question (if you look at the screenshots I've included this will probably make more sense!)

When I'm in VS's IDE and I'm editing a form or whatever in the Designer and I want to edit one of the colors AND that color is a "Known" color (either System or Web) I'd like to be able to tell the RadColorSelector which tab it should start on (I have ShowBasicColor = False btw)

 

I'm also happy to give this code to anyone who is a subscriber to Telerik UI for WinForms if anyone would like this for their own use I just don't know if Telerik allows that and if they do, where to deposit the source code (it's really pretty easy once you know how its done.)  The only restriction is I happen to like the Windows8 Theme for my dialog boxes regardless of the Theme I'm using for the rest of the application - so that means you'll have to add the Windows8 Theme DLL to your project for this to just plug-in and work.  It would be stupid-easy to just pass in whatever theme you like but for some reason RadColorSelector doesn't play well with some themes....anyway I digress

 

If it's possible to programmatically select the Tab in RadColorSelector I'd very much appreciate anyone showing me how!

Thanks all :)

-C

 

 

Dimitar
Telerik team
 answered on 24 Jul 2017
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
CheckedDropDownList
ProgressBar
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
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
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
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?