Telerik Forums
UI for WinForms Forum
1 answer
195 views
Hi,

I have applied custom filtering on the Treeview on Drop down selection change. Let's say I have applied filter to show only checked nodes and it did only showed me checked nodes. After filtering I unchecked one or more nodes but It didn't hide them so I figured that I might have to apply Filter on it again which I did but it didn't applied any filter nor did it go to the Filter Function that I have linked to it as well. Al thought it's working from UI.

Here's my code:

TreeView.TreeViewElement.FilterPredicate = FilterNode;


private bool FilterNode(RadTreeNode node)
 {
            bool filter = false;
            //Code 
            return filter;
 }

//For applying the filter

TreeView.Filter = string.Empty;
TreeView.Filter = "Custom";

Let me know if that makes any sense.

Thanks,
Attiqe







Dimitar
Telerik team
 answered on 04 Jun 2014
3 answers
272 views
I know how to merge RadDocuments, but I'm trying to insert into a RadDocument which is acting as a template. How would I go about inserting the following XAML into a RadDocument?

<t:Paragraph FontSize="13.333333" LineSpacing="1" SpacingAfter="12"><t:Span FontFamily="Verdana" FontSize="13.333333" Text="Lorem ipsum dolor sit amet" /></t:Paragraph>

The above XAML comes from a RadRichTextBox and should be inserted into the RadDocument when exporting. It seems like the DocumentFragment class used to have this functionality (http://www.telerik.com/forums/loading-multiple-raddocuments-into-a-richtextbox), but it no longer takes in a Document in the constructor. It might be possible to do the above in an actual RichTextBox, but I'd like to do it using the RadDocument if possible.



George
Telerik team
 answered on 04 Jun 2014
5 answers
311 views
I have 2 proposals for Step-by-step Tutorial – RadControls for WinForms.
  1. On tutorial download page could be version number or last update date so we will not make unnecessary downloads to check if pdf or chm is updated.
  2. It will be easier to read the pdf or help file if there are different version for C# and VB.

Kristina
Telerik team
 answered on 04 Jun 2014
3 answers
142 views
Hi, I followed your example for creating a basic radar chat as follows:


           RadarAreaSeries radarAreaSeries = new RadarAreaSeries("Sec1");
           radarAreaSeries.BackColor = Color.FromArgb(100, 142, 196, 65);
           radarAreaSeries.BorderColor = Color.FromArgb(100, 142, 196, 65);
           radarAreaSeries.DataPoints.Add(new CategoricalDataPoint(3.8d, "Oranges"));
           radarAreaSeries.DataPoints.Add(new CategoricalDataPoint(4d, "Bananas"));
           radarAreaSeries.DataPoints.Add(new CategoricalDataPoint(1.5d, "Apples"));
           this.EEGChart.Series.Add(radarAreaSeries);

           RadarAreaSeries radarAreaSeries2 = new RadarAreaSeries("Sec2");
           radarAreaSeries2.BackColor = Color.FromArgb(100, 27, 157, 222);
           radarAreaSeries2.BorderColor = Color.FromArgb(100, 27, 157, 222);
           radarAreaSeries2.DataPoints.Add(new CategoricalDataPoint(3.1d, "Oranges"));
           radarAreaSeries2.DataPoints.Add(new CategoricalDataPoint(1.8d, "Bananas"));
           radarAreaSeries2.DataPoints.Add(new CategoricalDataPoint(2.9d, "Apples"));
           this.EEGChart.Series.Add(radarAreaSeries2);

My question is if there exists another way to define the radar chart, by first defining the Categories, say Apple, Oranges etc and then creating the data series for each category. Having fixed the categories it would be much easieer to update data on the chart when values change, say every 1 sec.




Dimitar
Telerik team
 answered on 03 Jun 2014
3 answers
112 views
We are using a RadGridView to display data in a small area, only two rows are visible at any given time with the third row partially visible.  Using the RowFormatting event handler, we set the forecolor to reflect rows that contain 'inactive' or 'invalid' records based on columns in the underlying data.  Generally this works fine.  But when there are more than three rows in the grid and some of those rows are not visible, the forecolor change is not reliable.  For example, if the first three rows are 'valid' and the fourth row is 'invalid', all appears correct when the grid is initially displayed and the user scrolls down to the fourth row.  The 'invalid' row has the forecolor changed to gray.  But when the fourth is selected and the user then scrolls back to the first row, the first row now shows as 'invalid' (forecolor = gray) even though the data has not changed and the other rows still display the same as before.  From that point on the first row displays incorrectly until the data is refreshed.  Sometimes this occurs even if the last row is not selected, just scrolling from top to bottom and back.

        private void grdEFT_RowFormatting(object sender, RowFormattingEventArgs e)
        {
                if (e != null &&
                    e.RowElement.RowInfo != null &&
                    e.RowElement.RowInfo.DataBoundItem is DataRowView)
                {
                    DataRow drEFT = ((DataRowView)e.RowElement.RowInfo.DataBoundItem).Row;
                    DataRow drAPM = drEFT.GetParentRow(this.rAutopayDS.Relations["AssociatePaymentMethodEFTPaymentMethodInfo"]);

                    if (drAPM != null)
                    {
                        // Show the row as inactive if it is not active.
                        if (!(bool)drAPM["Active"] ||
                            !(bool)drEFT["Valid"])
                        {
                            e.RowElement.ForeColor = System.Drawing.SystemColors.ControlDark;
                        }
                        else
                        {
                            e.RowElement.ResetValue(LightVisualElement.FontProperty, ValueResetFlags.Local);
                        }
                    }
                    else
                    {
                        e.RowElement.ResetValue(LightVisualElement.FontProperty, ValueResetFlags.Local);
                    }
                }
        }

Thanks,
Greg Swope






Dess | Tech Support Engineer, Principal
Telerik team
 answered on 03 Jun 2014
33 answers
973 views
Hi
Is there a way to hide or grey out sections of the Scheduler time to prevent appointments being made?

Sort of out of Office type periods or when a resource is not available?

This sort of does things, but it gets a bit messy on the Day and Timeslot overlap.  I watned to try and get a Day to be grayed out.  Sort of if someone was on leave then the day is greyed out entirely like the Saturday and Sunday are.  But I seem to have some bug in the way it is working because the Wednesday keeps being open.

Here is the code so far

Private Sub radSchedulerDemo_CellFormatting(sender As System.Object, e As SchedulerCellEventArgs) Handles radSchedulerDemo.CellFormatting
       'Check Date Block
       Dim dbDateBlocked As Boolean = isDateBlocked(e.CellElement.Date)
       If dbDateBlocked Then
           e.CellElement.Enabled = False
       End If
       If isTimeBlocked(e.CellElement.Date) Then
           e.CellElement.Enabled = False
       End If
   End Sub

Function isDateBlocked(ByVal eDate As Date) As Boolean
       Dim blReturn As Boolean = False
       'Test that the date is not in the range of blocked dates
       'Specific dates
       Dim dtBlock As Date = New Date(2012, 9, 5)
       'No Appointments in the Past
       If dtBlock < DateTime.Today Then
           blReturn = True
       End If
       If eDate.Equals(dtBlock) Then
           blReturn = True
       End If
       'Weekends
       If eDate.DayOfWeek = DayOfWeek.Saturday Then
           blReturn = True
       End If
       If eDate.DayOfWeek = DayOfWeek.Sunday Then
           blReturn = True
       End If
       Return blReturn
   End Function

Function isTimeBlocked(ByVal eDate As DateTime) As Boolean
       Dim blReturn As Boolean = False
       Dim dtBlock As Date = New Date(2012, 9, 5)
       'Check if Day Blocked
       If eDate.Equals(dtBlock) Then
           'Block all slots for this day as a override for any other open slots by default
           Return True
           Exit Function
       End If
       'Working hours Mon - Friday
       'Block Slots 
       '   0:00 - 8:00
       Dim tsDayStart As New TimeSpan(0, 0, 0)
       Dim tsWorkStart As New TimeSpan(8, 0, 0)
       Dim tsWorkStartLate As New TimeSpan(10, 0, 0)
       '   12:00-13:00
       Dim tsLunchStart As New TimeSpan(12, 0, 0)
       Dim tsLunchEnd As New TimeSpan(13, 0, 0)
       '   17:00-24:00
       Dim tsWorkEndEarly As New TimeSpan(15, 0, 0)
       Dim tsWorkEnd As New TimeSpan(17, 0, 0)
       Dim tsWorkEndLate As New TimeSpan(19, 0, 0)
       Dim tsDayEnd As New TimeSpan(23, 59, 59)
       Select Case eDate.DayOfWeek
           Case DayOfWeek.Monday
               If eDate.TimeOfDay >= tsDayStart AndAlso eDate.TimeOfDay < tsWorkStart Then
                   blReturn = True
               End If
               If eDate.TimeOfDay >= tsLunchStart AndAlso eDate.TimeOfDay < tsLunchEnd Then
                   blReturn = True
               End If
               If eDate.TimeOfDay >= tsWorkEnd AndAlso eDate.TimeOfDay <= tsDayEnd Then
                   blReturn = True
               End If
           Case DayOfWeek.Tuesday
               If eDate.TimeOfDay >= tsDayStart AndAlso eDate.TimeOfDay < tsWorkStart Then
                   blReturn = True
               End If
               If eDate.TimeOfDay >= tsLunchStart AndAlso eDate.TimeOfDay <= tsLunchEnd Then
                   blReturn = True
               End If
               If eDate.TimeOfDay >= tsWorkEnd AndAlso eDate.TimeOfDay <= tsDayEnd Then
                   blReturn = True
               End If
           Case DayOfWeek.Wednesday
               'Late working day
               If eDate.TimeOfDay >= tsDayStart AndAlso eDate.TimeOfDay < tsWorkStart Then
                   blReturn = True
               End If
               If eDate.TimeOfDay >= tsLunchStart AndAlso eDate.TimeOfDay < tsLunchEnd Then
                   blReturn = True
               End If
               If eDate.TimeOfDay >= tsWorkEndLate AndAlso eDate.TimeOfDay <= tsDayEnd Then
                   blReturn = True
               End If
           Case DayOfWeek.Thursday
               'Late Start of Day
               If eDate.TimeOfDay >= tsDayStart AndAlso eDate.TimeOfDay < tsWorkStartLate Then
                   blReturn = True
               End If
               If eDate.TimeOfDay >= tsLunchStart AndAlso eDate.TimeOfDay < tsLunchEnd Then
                   blReturn = True
               End If
               If eDate.TimeOfDay >= tsWorkEnd AndAlso eDate.TimeOfDay <= tsDayEnd Then
                   blReturn = True
               End If
           Case DayOfWeek.Friday
               'Early Working end
               If eDate.TimeOfDay >= tsDayStart AndAlso eDate.TimeOfDay < tsWorkStart Then
                   blReturn = True
               End If
               If eDate.TimeOfDay >= tsLunchStart AndAlso eDate.TimeOfDay < tsLunchEnd Then
                   blReturn = True
               End If
               If eDate.TimeOfDay >= tsWorkEndEarly AndAlso eDate.TimeOfDay <= tsDayEnd Then
                   blReturn = True
               End If
           Case DayOfWeek.Saturday
               blReturn = True
           Case DayOfWeek.Saturday
               blReturn = True
       End Select
       Return blReturn
   End Function

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 03 Jun 2014
1 answer
215 views
Hello everyone ,

I am trying to select a line series (NOT A POINT) using the mouse .In fact I want to create two cursor to show the distance of two points by using two line series .  These  cursors should be dragged and moved by the mouse , something like select the line first , and the drag it to other position. I don't know how to select the line. 
I have found something like that but it's for Rad Chart not for ChartView.
http://blogs.telerik.com/automated-testing-tools/posts/09-10-01/draggable-series-items-in-radchart-for-winforms

Can some one tell me how to do that ?

Thanks a  lot.


George
Telerik team
 answered on 02 Jun 2014
1 answer
256 views
Hi...
I have downloaded the Telerik UI for WinForms, and then Try to install it on my machine.

But Installation Setup Doesn't DETECT the Visual Studio Extension for Visual C# and VB.NET (Express Edition)

Why this happens...???

I have Registered Copy of Visual Studio Express Edition for 2010 & 2008

I have attached the Screenshot of Installation Setup.
Yana
Telerik team
 answered on 02 Jun 2014
5 answers
111 views
Hi I have a friend looked at the trail version and now we have a question to the panorama .

We have DemoHub 2-3 creates new tile and these assigned with Row and Column . Then we have saved with a button click event the values ​​of each Radtileelement in the registry .
example:
RegistryKey name = ( Radtileelement.Name )
Value ( group = GroupName )
Value ( row = Radtileelement.row )
Value (Column = Radtileelement.Column )

Now we want to read the registry and then adjust the RadTileElements so with the values ​​of the registry when starting the Winforms .

e.g.
 For Each item As RadTileElement In radPanorama1.Items
                    If item.Name RegistryKey = Name Then
                        item.Column = Column
                        item.Row = row
                    end If
                Next

Unfortunately we did not get it back .

PS: The aim should be that each user as he has relocated with a button we write it in his tile the regedit and then the positions are taken when starting saved it .


Sorry for my bad English
Dimitar
Telerik team
 answered on 02 Jun 2014
3 answers
293 views
Hey I have recently installed Telerik UI for WinForm, I have used the Chart control of Visual Studio just fine using this code on FormLoad, It is working fine and I am attaching screenshots:

            DataSet dataSet;
            ConnectionClass.GetInstance().connection_string = Properties.Settings.Default.MindMuscleConnectionString;
            ConnectionClass.GetInstance().Sql = "Select Count(MemberInfo.memberName) as 'Members', CompetitionName as 'Competition' FROM MemberInfo, MemberBodyInfo, Competition WHERE MemberInfo.memberID = MemberBodyInfo.memberID AND MemberBodyInfo.weight >= Competition.CompetitionCategory and MemberBodyInfo.weight <= Competition.CompetitionCategory + 5 group by CompetitionName;";
            dataSet = ConnectionClass.GetInstance().GetConnection;
            chart1.Series["Series1"].Name = "Members";
            chart1.Series["Members"].YValueMembers = "Members";
            chart1.Series["Members"].XValueMember = "Competition";

            this.chart1.Titles.Add("Competition Participants");   // Set the chart title
            chart1.Series["Members"].ChartType = SeriesChartType.Pie;
            chart1.Series["Members"].IsValueShownAsLabel = true;  // To show chart value 
            chart1.DataSource = dataSet;
            chart1.DataBind();
I can not do the same thing on Telerik ChartView. How can I do this ? So far I have tried setting the datasource and datamember and got this so far... 

Please help





Stefan
Telerik team
 answered on 02 Jun 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)
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
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?