Telerik Forums
UI for WinForms Forum
1 answer
80 views
It can restore to the original design a radDock when some of the toolwindows are hidden. and all of them appear.
Stefan
Telerik team
 answered on 07 Oct 2014
1 answer
69 views
Let's say I was had a radgridview that was grouped by foodtype, whose sections included fruit.
Currently, when I try to add a type of fruit from the top, I cannot add specifically to the fruit section because the foodtype section is not there, and a new section entitled "foodtype:" is created.
How would I be able to add to the fruit section from the grouped interface?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 06 Oct 2014
3 answers
303 views
I have RadChartView that receive real time data and i want to add the option after the mouse is over specific point to see it's value so i added this property:

radChartView1.ShowTrackBall = true;

And now i can see an empty rectangle with no text (see my attach file).
Another thing that i have notice is now after right click on my chart i have an new option called Palette that change my series color and in this case i can see the point value inside the rectangle.

Now i have 3 questions:

1. What is this new option ?
2. how can i see my point value without change this color ?
3. is it possible to add some text inside this rectangle ?

Thanks !
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 06 Oct 2014
1 answer
91 views
Hi:

We are working with some existing code.  The RadDropDownList controls throughout the application allows any data entry in the control (for example: a list of USA states, I could enter Fred and tab out of the field).  Currently, all RadDropDownList controls DropDownStyle are set to DropDown.  What are the best practices constraining the users data entry to the supplied list.

Phil
Dimitar
Telerik team
 answered on 06 Oct 2014
2 answers
72 views
I have a whole bunch of timepcikers on a form. I need to have a button on the form to set all times to 12:00 AM. It is a rest for the user. I wanted to do something like this:


foreach(Control c in this.Controls)
{
if(c is radTimePicker)
{
// set time here ;]
}
}

I'm not sure what I should use for "Control" and "this.Controls" I'm guessing radTimePicker is correct.
Chris
Top achievements
Rank 1
 answered on 04 Oct 2014
3 answers
621 views
I am applying filter to a radgridview as
 ((DataTable)Grid.DataSource).DefaultView.RowFilter = TxtBxExpression.Text;
                ((DataTable)Grid.DataSource).DefaultView.AllowNew = true;
                Grid.MasterTemplate.Refresh();
                Grid.MasterView.Refresh();  

After that when I am trying to insert a row as 
Grid.Rows.Add();

It is inserting a row at the end but it is without any columns and not even dropdowns of the rows are selectable so that I can change the row values and the update the data.So I want a row that has columns and its dropdowns are editable.So how can I do that?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 03 Oct 2014
3 answers
196 views
We have a data grid view which we would like to apply a few conditional rules programmatically. We would still like the end user to be able to add their own conditional formatting rules, however; we would like to block them from deleting the rules that we added via code. Please see the attached screenshot for an example. How would I go about doing this?

For my first attempt I subscribed to the the ConditionalFormattingObjectList.CollectionChanging event. The problem is that the Action received in this event is all of type Reset first, Add second. Basically the ConditionalFormattingForm is first clearing the collection and then re-adding the all the conditions. Additionally, when you cancel the collection changing the UI still reflects the changes even though you have canceled the event in the underlying collection. Should I be using a different event. Perhaps one on the ConditionalFormattingForm itself?

Thank you,
-Chris
George
Telerik team
 answered on 02 Oct 2014
3 answers
153 views
Hi,

i will attach 2 screen shots to this post. in the first you can see how the first column is almost collapsed and the second pretty wide.
I would like to set the ValueColumn width in code. Here is my current code which is not changing the ColumnWidth no matter which value i put there.

 this._gridError.PropertyGridElement.PropertyTableElement.AutoSizeItems = false;
this._gridError.PropertyGridElement.PropertyTableElement.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize;
this._gridError.PropertyGridElement.PropertyTableElement.ValueColumnWidth = 300;

The second thing I would like to do i to display ScrollBars in the PropertyGridElement.SplitElement.HelpElement.ContentText box.

Thx and best regards,
Darko
George
Telerik team
 answered on 02 Oct 2014
1 answer
275 views
Hi

( First of all I need to clarify that I could manage both C# or VB solution to solve this issue )

I have a RadListControl where I would like to use it to list the runing processes in the system (with a condition that no more than 1 process with the same name),
that thing is done and I'm trying to update the list each 2 seconds (firstly determining If exists changes to update the current list),
I'm saving the SelectedItems property of the control to restore the selected items in the RadListControl after updating the list and here is the problem, after clearing the items of the control using the Items.Clear method the Scrollbar moves up to the top of the control and I need to scrolldown to the desired position again and again.

I would like to keep the current position after updating the items in the control, just like Windows TaskManager does for example.

I also tried to set a collection of RadDataItem as the control DataSource, but then the Image property for each item is empty (I don't know why).

I attached a gif in this post that demonstrates the problem,
As you can see in the Gif, when I run a new process (the window which is at the left border of the gif) the process list is moved to top, and the same thing happens when I close that process.

I don't know what more to try, here is the relevant part of the code:

Private Sub Timer_RefreshProcessList_Tick(ByVal sender As Object, ByVal e As EventArgs) _
Handles Timer_RefreshProcessList.Tick
 
    ' Processes that shouldn't be listed.
    Dim BlackListedProcesses As String() =
        {
            My.Application.Info.AssemblyName,
            "Idle",
            "System",
            "audiodg"
        }
 
    ' Get the runing processes.
    Dim Processes As Process() = Process.GetProcesses
 
    ' Filter the processes by its name
    ' then set the RadListDataItem items containing the names and the process icons.
    Dim ProcessItems As IEnumerable(Of RadListDataItem) =
        (From proc As Process In Processes
        Where Not BlackListedProcesses.Contains(proc.ProcessName)
        Order By proc.ProcessName Ascending).
        GroupBy(Function(proc As Process) proc.ProcessName).
        Select(Function(procs As IGrouping(Of String, Process))
 
                   If Not procs.First.HasExited Then
                       Try
                           Return New RadListDataItem With
                                  {
                                    .Active = False,
                                    .Text = String.Format("{0}.exe", procs.First.ProcessName),
                                    .Image = ResizeImage(Icon.ExtractAssociatedIcon(procs.First.MainModule.FileName).ToBitmap,
                                                         Width:=16, Height:=16)
                                  }
 
                       Catch ex As Exception
                           Return Nothing
                       End Try
 
                   Else
                       Return Nothing
                   End If
 
               End Function)
 
    ' If the RadListControl does not contain any item then...
    If Me.RadListControl_ProcessList.Items.Count = 0 Then
 
        With Me.RadListControl_ProcessList
            .BeginUpdate()
            .Items.AddRange(ProcessItems) ' Add the RadListDataItems for first time.
            .EndUpdate()
        End With
 
        Exit Sub
 
    End If
 
    ' If RadListDataItems count is not equal than the runing process list count then...
    If Me.RadListControl_ProcessList.Items.Count <> ProcessItems.Count Then
 
        ' Save the current selected items.
        Dim SelectedItems As IEnumerable(Of String) =
            From Item As RadListDataItem
            In Me.RadListControl_ProcessList.SelectedItems
            Select Item.Text
 
        ' For Each ctrl As RadListDataItem In ProcessItems
        '     ctrl.Dispose()
        ' Next
 
        With Me.RadListControl_ProcessList
 
            ' .AutoScroll = False
            ' .SuspendSelectionEvents = True
            ' .SuspendItemsChangeEvents = True
            ' .SuspendLayout()
            ' .BeginUpdate()
            .Items.Clear() ' Clear the current RadListDataItems
            .Items.AddRange(ProcessItems) ' Add the new RadListDataItems.
            ' .EndUpdate()
            ' .ResumeLayout()
 
        End With
 
        ' Restore the selected item(s).
        For Each Item As RadListDataItem In Me.RadListControl_ProcessList.Items
 
            If SelectedItems.Contains(Item.Text) Then
 
                Item.Selected = True
                Item.Active = True
 
                With Me.RadListControl_ProcessList
                    ' .ScrollToItem(Item)
                    ' .ListElement.ScrollToItem(Item)
                    ' .ListElement.ScrollToActiveItem()
                End With
 
            End If
 
        Next Item
 
        With Me.RadListControl_ProcessList
            ' .AutoScroll = True
            ' .SuspendSelectionEvents = False
            ' .SuspendItemsChangeEvents = False
        End With
 
    End If
 
End Sub

Thanks in advance.

PS:

What I did time ago to solve this issue with a normal ListBox control is this (I can't reproduce it in a RadListControl):

' [ListBox] Select item without jump
'
' Original author of code is "King King"
' Url: stackoverflow.com/questions/19479774/how-to-prevent-listbox-jumps-to-item
'
' Examples :
'
' Select_Item_Without_Jump(ListBox1, 50, ListBoxItemSelected.Select)
'
' For x As Integer = 0 To ListBox1.Items.Count - 1
'    Select_Item_Without_Jump(ListBox1, x, ListBoxItemSelected.Select)
' Next
 
''' <summary>
''' Indicates whether the ListBox Item should be Selected or Unselected.
''' </summary>
Private Enum ListBoxItemSelected
 
    ''' <summary>
    ''' Indicate that ListBox Item should be Selected.
    ''' </summary>
    [Select] = 1
 
    ''' <summary>
    ''' Indicate that ListBox Item should be Unselected.
    ''' </summary>
    [Unselect] = 0
 
End Enum
 
''' <summary>
''' Selects or unselects a ListBox Item without jumping to the Item location on the layout.
''' </summary>
Public Shared Sub Select_Item_Without_Jump(lb As ListBox, index As Integer, selected As ListBoxItemSelected)
    Dim i As Integer = lb.TopIndex ' Store the selected item index
    lb.BeginUpdate() ' Disable drawing on control
    lb.SetSelected(index, selected) ' Select the item
    lb.TopIndex = i ' Jump to the previous selected item
    lb.EndUpdate() ' Eenable drawing
End Sub
Dimitar
Telerik team
 answered on 01 Oct 2014
4 answers
195 views
I have Winforms application with ChartView that received real time data and i have label the show the data value. After each point received inside my Timer tick all the points remove in order to show my label only once:private AreaSeries series;

private void timerStatistics_Tick(object sender, EventArgs e)
{
       try
     {
        chartPoints.Add(AdapterStatistics.BitsPerSecond * 0.000001);
        series.DataPoints.Add(new Telerik.Charting.CategoricalDataPoint(AdapterStatistics.BitsPerSecond * 0.000001));

       RemoveLabels();
       series.DataPoints[series.DataPoints.Count - 1].Label = AdapterStatistics.TrafficStatistics;
     }
       catch (Exception)
       { }
}

private void RemoveLabels()
{
     for (int i = 0; i < series.DataPoints.Count - 1; i++)
     series.DataPoints[i].Label = "";
}

my problem is that me label i in the right side of the lase point so almost all the label is hide (see attach file)
Any idea if it possible to remove the label to the left of the last point inside my chart ?






Dimitar
Telerik team
 answered on 01 Oct 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)
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?