Telerik Forums
UI for WinForms Forum
2 answers
449 views
Hello!
I am working on an application that uses grid view with checkboxes. When checkbox value is changed, it calls ValueChanged event with radGridView.EndEdit() and then calls CellValueChanged to read new data.

I want to expand checkboxes functionality with Three State mode however I want user only to be able to switch between normal On and Off states, while the Indeterminate state can only be assigned from the code. I want to make it so user can either go   On -> Off,   On  -> Off  or Indeterminate -> Off, and not On -> Indeterminate . 

The thing is, I can't find a right event, that should be called when checkbox value is changed and change it, so user cannot reach null state by clicking it. Normally, in Three State mode, when user clicks on checkbox in On state, Indeterminate state is called. I want to switch this state to Off  before reading the data.

I hope I've explained my problem clearly enough. Thank you for reading my post :)


Svett
Telerik team
 answered on 13 Sep 2011
2 answers
69 views
Hi, 

I am scratching my head around this problem. I have a child template that contains some data. I have the master template which also contains data. The objects of the parent template are a container of the objects in the child template. 

When I edit the values of the child template.I can't get the parent template to refresh. Is there a way to do this ? 

thanks 
Stefan
Telerik team
 answered on 13 Sep 2011
7 answers
650 views
Hi,

First let me stay, these are the best controls we have used! Our company has been using your controls for about 4 months now, telerik > devexpress.

So, We are working on a very simple winform. We have added a RadDropDownButton to this form. We want to bind this drop down like you would a combobox, but I have noticed there is no DataSource method for this. How would we dynamically add and remove items from this list at runtime from a SQL database?

Sorry if this is a duplicate question, i did search at no avail.

We have the latest version of the controls, .net 4.0, C#, VS2010,WIN7 x64. 


Thank you!
Jack
Telerik team
 answered on 13 Sep 2011
5 answers
97 views

I've opened up Telerik online help for RadGridView and I just see tutorials and other extra information. I am, however, looking for hard documentation where properties, methodes and events of classes are described. Could you point me where I can get this kind of online help? I am using 2010 Q2 version on VS2008.

Regards,
Ed
Stefan
Telerik team
 answered on 13 Sep 2011
2 answers
82 views
I am trying to export a gridview to a pdf file.  But when I initialize the object, the ExportToPDF class is not available.  I have imported both Telerik.WinControls.Data and Telerik.WinControls.UI.Export, and I am using the newest telerik controls. 

Any help is really appreciated.
Jean
tuonglam
Top achievements
Rank 1
 answered on 13 Sep 2011
3 answers
107 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
134 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
159 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
168 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
160 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
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?