Telerik Forums
UI for WinForms Forum
3 answers
101 views

Hi!

I want to ask is there any possibilities to get to date filtered, and put it in to some datatable.

I seek for methods and I found that the CurrentView have DisplayedRowCount that correctly show how many rows are in currentview, but I don’t now how to get to those rows.


Stefan
Telerik team
 answered on 12 Sep 2011
3 answers
121 views
Hi.

I am currently facing a problem which isnt direclty related to telerik, but i still hope to get some advice.
I have found like hundreds of internet posts about building 1 grid with a related dataset, so that childs get displayed in the same grid.

But, i am currently trying to achieve the same stuff with 2 DataGrids with a DataSet that has a many-to-many relation.
So in thirst Grid i want to have my "Parent Elements", when i select a specific row i get in my second grid all the related elements of the selected grid.

There is the first Problem because i only found the GetChildRows method of the DataRow and this will give me the "Middle Table" (so the Table that makes a many-to-many Relation possible). What i am currently making is stepping threw those ChildRows and fetching the acutal Rows of the Third Table. I dont really believe thats the way it should be done, so please tell me how to get the actual related stuff.

Second is there a way to automatically insert/update the "Middle Table", my adapters do have the commands attached to it. But since i am losing the stuff in my first step, the object relation is gone. I am currently force to update it manually.

So hope you guys can help me out.
Stefan
Telerik team
 answered on 12 Sep 2011
3 answers
153 views
Hi All,

Our application is a MDI winforms application with Ribbonbar. During runtime the user can choose from the built-in themes (we don't use custom themes made with the Visual Style Builder).

Some theme looks good (e.g.: ControlDefault, Breeze, Office2007... etc.), but in the case of the Office2010..., Windows7 and TelerikMango themes we have issues with the Start Button. (see the attached picture):
  • the Start Button slips down, and hides a part of the ribbonbar tab
  • there is an additional rectangle behind the image of the Start button
  • in the case of the TelerikMetro theme the rectangle contains a Telerik logo and a down arrow.

How can I move up the Start button and hide the background rectangle?


Best regards,

Peter
Stefan
Telerik team
 answered on 12 Sep 2011
2 answers
165 views
Hi,

I have created a custom Appointment class which implements Telerik.WinControls.UI.Appointment.
I store a few fields in this class and they are stored in a database via a custom Edit Appointment Dialog.

I have enabled the recurrence dialog recently and this works fine - can add a recurrence rule and this generates occurrences, etc. Looking at the other threads, I figured I had to include the following in my custom class for this to happen:
Private _masterEvent As Telerik.WinControls.UI.IEvent
   Public Shadows ReadOnly Property MasterEvent() As Telerik.WinControls.UI.IEvent
        Get
            If Object.Equals(_masterEvent, Nothing) Then
                Return Nothing
            Else
                Return _masterEvent
            End If
        End Get
    End Property
 
 
    Public Overrides Function CreateOccurrence(start As Date) As Telerik.WinControls.UI.IEvent
        Dim appointment As New JobAppointment()
        Dim startDate As Date = start
        Dim ts As TimeSpan = Me.Duration
        Dim endDate As Date = startDate.Add(ts)
 
        ..........
 
        'Added this to set the settings required by Telerik.
        appointment.ApplySettingsToAppointment()
 
        'For repeated occurrences..
        Dim appType As Type = GetType(Telerik.WinControls.UI.Appointment)
        appType.GetField("masterEvent", System.Reflection.BindingFlags.Instance Or System.Reflection.BindingFlags.NonPublic).SetValue(appointment, Me)
 
        Return appointment
    End Function

The issue I now face is that I want to store the RecurrenceRule in my database (right now recurrence only works in-memory). To do this, I have a string field "JobRecurrenceRule" which is stored in the database.

When an appointment is to be saved to the database, I do the following:
If RecurrenceRule IsNot Nothing Then
If RecurrenceRule.IsValid Then
JobRecurrenceRule = CalHelper.RecurrenceRuleToString(RecurrenceRule)
End If
End If

When appointments are read from the database, I do the following to instantiate RecurrenceRule:
If JobRecurrenceRule <> "" Then
            CalHelper.TryParseRecurrenceRule(JobRecurrenceRule, RecurrenceRule)
End If

The recurrence rule is being correctly saved to the database, but when I try to load the appointment back from the database, the scheduler seems to freeze. I get a context switch deadlock:

ContextSwitchDeadlock was detected
Message: The CLR has been unable to transition from COM context 0x4ac6f90 to COM context 0x4ac7100 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.

I have traced the freezing down to the code where I add the appointment with the RecurrenceRule to the RadScheduler.

Commenting out the line:
CalHelper.TryParseRecurrenceRule(JobRecurrenceRule, RecurrenceRule)

Therefore, not reading the recurrence rule from the database, prevents this deadlock.

I am assuming that something is not quite right with the way I am loading the RecurrenceRule from the database. Perhaps I am missing something? Any help much appreciated.

Regards.


Ivan Todorov
Telerik team
 answered on 12 Sep 2011
1 answer
158 views

I am trying to set the backcolor of a gridview GridViewCommandColumn using conditional formating, but it is not showing the colors:
I am using gridview version 2011.1.11.419
Please help

Thanks

Here is the code:

 

 

 

 

 

 

 

void radGV_CellFormatting(object sender, CellFormattingEventArgs e)

 

{


if (mycondn == true)
                    {
                        e.CellElement.DrawFill = true;
                       e.CellElement.ForeColor = Color.Blue;
                        e.CellElement.NumberOfColors = 1;
                        e.CellElement.BackColor = System.Drawing.Color.Gold;
                     
                    }
                 else                    {
                        e.CellElement.DrawFill = true;
                        e.CellElement.ForeColor = Color.Blue;
                        e.CellElement.NumberOfColors = 1;
                         e.CellElement.BackColor = System.Drawing.Color.LightBlue;
  
                    }
}

my cell is created like this:

//data base field name is ScDate
 GridViewCommandColumn colSchDelDate = new GridViewCommandColumn("ScDate");
  colSchDelDate.UseDefaultText = false;
  colSchDelDate.Width = 80;
  colSchDelDate.HeaderText = "Sc Date";
  colSchDelDate.ReadOnly = true;
  colSchDelDate.FormatString = "{0:MM/dd/yy}";
  colSchDelDate.TextAlignment = ContentAlignment.MiddleCenter;
  radGV.MasterTemplate.Columns.Add(colSchDelDate);

}



Emanuel Varga
Top achievements
Rank 1
 answered on 12 Sep 2011
4 answers
110 views
Hi
How to insert new row to RadGridView in custom place. this code add new row at top or bottom :
RadGridView1.Rows.Add("x","y")
Thank you.
tuonglam
Top achievements
Rank 1
 answered on 10 Sep 2011
3 answers
138 views
Hi,

   I'd like know how to do get value of rows selected with CheckBox on GridView?
Example:

Name               |  Selected
Steve Jobs        
Bill Gates                x
Larry Page
Mark Zuck               x

Your select Bill Gates and Mark Zuck.

I tried with foreach, but isn't get the values selected.

Thanks attention!

Emanuel Varga
Top achievements
Rank 1
 answered on 09 Sep 2011
2 answers
107 views
hi friends.
when i'm merging assemblies; gridview's custom detail view element is not working.
other components and forms are working but this has 'Telerik.WinControls.UI.RadPageViewDragDropService' error message....
koray
Top achievements
Rank 2
 answered on 09 Sep 2011
1 answer
292 views
HI
Does WinForms support diplaying data received on a serial port in a scrolling time chart?
I have seen examples on how to connec an rss feed from the net but want to display data from an electronic instrument.

Regards
Fredrik Enquist
Yavor
Telerik team
 answered on 09 Sep 2011
2 answers
1.6K+ views
Hello!
Is it possible to turn off automatic selection of the first row in a GridView. The automatic selection takes place on grid creation an when rebinding the data source.
Thanks. 
Emanuel Varga
Top achievements
Rank 1
 answered on 09 Sep 2011
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
TrackBar
MessageBox
Rotator
SpinEditor
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
NavigationView
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
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
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?