Telerik Forums
UI for WinForms Forum
0 answers
104 views

Right now, if the 'next row' if off screen, the user has to manualy change the scroll bar to view it.

private void SqlAdd()
        {
            var commandServer = new CommandServer();
 
            foreach(GridViewRowInfo row in radGridView1.Rows)
            {
                Thread.Sleep(100);
                row.IsSelected = true;
            }
            //var returnSqlServer = commandServer.GetServerCommandExecReturnServer("dead_add", parameters);
        }
Вадим
Top achievements
Rank 1
Iron
Iron
 asked on 07 Jul 2018
2 answers
434 views

Hello,

I'm building an application that allows the user to select a series of text items from a grid, and add them to a list.  The list is unbound with the horizontal and vertical scroll bars off, and set to:

((IconListViewElement)this.Selected_Text_Listview.ListViewElement.ViewElement).Orientation = Orientation.Horizontal

Selected_Text_Listview.AllowArbitraryItemWidth = true;

Selected_Text_Listview.AllowArbitraryItemHeight = true;

If the width of the items exceeds the total width of the Listview, items are dropped from the front of the list until they fit.  I am doing this by determining the "Actual Size" of the items and making sure they fit within the width of the Listview (taking margins into consideration) and continuing to drop until the remaining items fit.

This works well, however the problem I am encountering is when the text that is selected is itself too large to fit within the given Listview region.  When a single item is too large to fit, I would like to add "...", and truncate the text from the beginning until it fits.  For example:

"Text that is too large to fit" => "...t that is too large to fit"

When I reach this condition, I am recursively removing portions of the item text hoping to find the point when the text will fit and stop, but this does not seem to be changing affecting the item's size and the recursion continues until the string is empty.

Below is a portion of the code:

private bool Adjust_Text_List_Items()

{

    int total_item_width = 0;

    //Compute Total Width of Items
    foreach (ListViewDataItem Text_Item in this.Selected_Text_Listview.Items)
                total_item_width += Text_Item.ActualSize.Width + this.Selected_Text_Listview.ItemSpacing;
                

    //Determine if items are too large to fit

    if (total_item_width >= this.Selected_Text_Listview.Width -  this.Selected_Text_Listview.Margin.Left - this.Selected_Text_Listview.Margin.Right)
                {

                    //Sanity Check
                    if (this.Selected_Text_Listview.Items.Count() > 0)
                    {
                        //Name of single node too long, must truncate
                        if(this.Selected_Text_Listview.Items.Count() == 1)
                        {
                            ListViewDataItem first_node = this.Selected_Text_Listview.Items.First();

                            if (!string.IsNullOrEmpty(first_node.Text))
                            {
                                first_node.Text = first_node.Text.Substring(1);
                                this.Selected_Text_Listview.ListViewElement.SynchronizeVisualItems();       //This is not updating the actual size of the item!

                                //Continue Looping Until the string fits
                                Adjust_Text_List_Items();   
                            }

                            else

                            {

                               first_node.Text = "EMPTY STRING!!!";

                               return false;

                             }

                         }

                      }

...

}

Is there a way to update the actual size of the item after changing the text, or is there perhaps an alternative approach that I could use?

 

Mike
Top achievements
Rank 1
 answered on 06 Jul 2018
1 answer
797 views

Hi,

My program was originally using a different grid but we are now changing over to radgridview, on several of our grids you enter an ID in the first column and it runs a  function to get the rest of the information such as Description e.t.c . I am trying to use EndEdit to call the function to get the part but its default functionality is to re-populate the ID ,is there a way to repopulate the Cell the user has just finished editing,I am using VB.Net. The function must be called once the part has been entered

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 06 Jul 2018
1 answer
124 views

     The Waterfall series does not seem to handle negative values always correctly.

Sometimes the waterfall does not go lower than 0. But sometimes it does.

Maybe the documentation on how , whether and why to add SumPoints and TotalPoints is somewhat incomplete.

var ws = new WaterfallSeries();
ws.DataPoints.Add(new Telerik.Charting.WaterfallDataPoint(1.0, false, false));
ws.DataPoints.Add(new Telerik.Charting.WaterfallDataPoint(2.0, false, false));
ws.DataPoints.Add(new Telerik.Charting.WaterfallDataPoint(3.0, true, false));
ws.DataPoints.Add(new Telerik.Charting.WaterfallDataPoint(-10.0, false, false));

if I have just this, it comes out like in picture "withoutEnd".

It does not end up with -7, as I would expect. Ist just ends with 0.

When I add a Total Point at the end

ws.DataPoints.Add(new Telerik.Charting.WaterfallDataPoint(-10.0, false, true))

The display changes, but the total is not display, and it's still all wrong.

When I add a Summary Point at then end

ws.DataPoints.Add(new Telerik.Charting.WaterfallDataPoint(-10.0, true, false))

The result becomes correct. (The left axis is starting at -8)

 

So I can find a solution that works for me.
But I'm not sure, do I missread the (rare) documentation,

or may be there is a bug in the display algorhithms.

 

 

 

 

 

 

 

Dimitar
Telerik team
 answered on 06 Jul 2018
16 answers
879 views
Hello,

We've got a chart that needs to display a couple different series types. All of values (thresholds, measurements) in a time domain.

First is a series of thresholds. Probably the closest series type that will work for us is a BarSeries. These should go on the chart first and chart in the background (or possibly bring them to front, i.e. if corresponding conditions are being edited, type thing).

Second is a series of measurements. We're currently doing this using LineSeries. The only thing I can say about this is, how are we able to treat X-axis values as values instead of categories? For instance, would be great to show the X-axis time domain as seconds (or divisions of milliseconds) and so on.

Thank you.

Regards,

Michael Powell
Hristo
Telerik team
 answered on 06 Jul 2018
7 answers
222 views

If I make all GridItems invisible, then the plus sign remains in RadPropertyGrid for Font item.

Example:

    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            Make();
        }

        private void Make()
        {
            radPropertyGrid1.SelectedObject = new Item();
            foreach (var item in radPropertyGrid1.Items)
            {
                if (!(item.Value is Font)) continue;
                foreach (var subItem in item.GridItems)
                {
                    subItem.Visible = false;
                }
            }
        }

        public class Item
        {
            [DisplayName("Font"), Category("Font")]
            public Font Id { get; set; }

            public Item()
            {
                Id = new Font("Arial", 12, FontStyle.Regular);
            }
        }

    }

 

 

Dimitar
Telerik team
 answered on 06 Jul 2018
7 answers
147 views

Hi, I'm having problems with Saving/Loading layouts.

I'm saving automatically the layout of all my tables to XML files, with "SaveLayout" method, I don't do anything additional.

When the application starts, all that XML files saved, are loaded with "LoadLayout" method. I don't know why, but in some cases, I'm getting this error on LoadLayout:

 

NotSupportedException ocurred.

Exception thrown: 'System.NotSupportedException' in System.dll

Additional information: CultureInfoConverter cannot convert from (null).

 

I've tried to reduce the structure of the table doing it simpler, (decreasing the number of columns, and removing hierarchy), but I'm getting the same error.

Thanks in advance.

Hristo
Telerik team
 answered on 05 Jul 2018
1 answer
113 views
I'm confused about context groups. I thought if I create a Context group and add 2 groups, then when I click on the Context name it will merge the 2 groups into the one 'context'. But instead it's just displaying each tab normally, except for coloured highlighting.
Hristo
Telerik team
 answered on 05 Jul 2018
9 answers
353 views

Hello ,

how to add new controls in Rad item collection editor,I have list of controls but i need to add RadCheckedDropdownList in collection and use it in RadRibbonTab of RadRibbonForm.

Thanks in Advance.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 05 Jul 2018
10 answers
398 views
Hi,

We have a RadTreeView in our RadDropDownList based on the sample found here:
http://www.telerik.com/community/forums/winforms/combobox-and-listbox/treeview-in-dropdown.aspx

But we seem to have some issues with it:

If the 'Arrow Button' is clicked while the popup is open, then the 'arrow button' gets stuck as if it's still pressed but the popup itself is not showing. Once in this mode, any further clicks on the arrow button will display the popup and immediately close it again.
This behavior is also reproducible in the sample attached in the forum post.

I hope anyone has a way of getting around this.

Thank you in advance.

Carsten.
Gilbert
Top achievements
Rank 1
 answered on 05 Jul 2018
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
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
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
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
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
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?