Telerik Forums
UI for WinForms Forum
2 answers
629 views
Hello,
I hope that someone can help me with this little issue.
I would like to change the color of a GroupBox Header back to the applied theme's default color.

I prgrammatically changed the border color with the following code to red to show an invalid user input (a kind of validation).

DirectCast
(.rgrb_CountryOfOrigin.GroupBoxElement.Children(1).Children(1), BorderPrimitive).ForeColor = Color.Red 

When the input is corrected the color should change back to its default value. Actually I use the desert theme.
Is there a possibillity to get a default color value for the assigned theme for the chosen control (eg GroupBox)?
If not, where can I find the theme values like colors etc?
Any help is appreciated.
Cheers Roberto
Roberto Wenzel
Top achievements
Rank 2
 answered on 23 Feb 2011
4 answers
533 views
I've been unable to find specifics in the documentation for how the underlying data rows get updated when binding an editable grid to a dataTable.  I have a problem where I retrieve a dataTable, call AcceptChanges() on it, bind it to the grid and the data shows properly.  When the user edits row cells and clicks the save button, the RowState properties on the underlying dataTable are not set to Modified as they should be.

Is there an Update Mode property or something I'm missing? I've tried clicking elsewhere inside and outside of the grid after editing and the rowState remains unchanged.  Ideas?


EDIT:  The following code appears to fix it. It's called just before saving:

foreach (GridViewRowInfo row in grd.MasterGridViewTemplate.Rows)  
{  
    DataRow dr = ((System.Data.DataRowView)(row.DataBoundItem)).Row;  
    dr.EndEdit();  
} 

Is this the right way I should be handling this? Seems a little kludgy...Thx
Julian Benkov
Telerik team
 answered on 23 Feb 2011
1 answer
157 views
I am using a CommandBarDropDownList to trigger a refresh of the bindingsource for a GridView.  The linq query takes a little while to execute, so the UI gets frozen, which is ok.  Prior to executing the query, I would like the dropdownlist to fully collapse.  I attempt to use application.doevents, but it still will not collapse until the query runs.  See snippet below.

Thanks,
Neal

EDIT:  Tried with regular DropDownList (not in commandbar) and same behavior.  Tried with winforms combobox and the control successfully collapses.

 

Private Sub CommandBarDropDownList1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CommandBarDropDownList1.TextChanged
    UpdateGrid()
End Sub
Private Sub UpdateGrid()
    Application.DoEvents()
    Me.Cursor = Cursors.WaitCursor
    Dim db As New DAL_DataContext
    db.Log = Console.Out
    Dim qryRep = (From item In db.RepSaleDetails Where item.RepSaleHeader.Date.Value.Year = CommandBarDropDownList1.Text Select _
              Descr = item.RepSaleHeader.Rep.LastName, _
              Amount = CInt(item.Qty * item.Price), _
              Month = item.RepSaleHeader.Date.Value.Month)
    Dim qryCust = From item In db.CustSaleDetails Where item.CustSaleHeader.Date.Value.Year = CommandBarDropDownList1.Text _
                  And item.CustSaleHeader.RefNo >= 3000 Select _
                    Descr = "Ann", _
                    Amount = CInt(item.Qty * item.Price), _
                    Month = item.CustSaleHeader.Date.Value.Month
    Dim qryInternet = From item In db.CustSaleDetails Where item.CustSaleHeader.Date.Value.Year = CommandBarDropDownList1.Text _
                      And item.CustSaleHeader.RefNo < 3000 Select _
                      Descr = "Ann Internet", _
                      Amount = CInt(item.Qty * item.Price), _
                      Month = item.CustSaleHeader.Date.Value.Month
    Dim qryAll = qryRep.Concat(qryCust).Concat(qryInternet)
    Dim MyTable = qryAll.GroupBy(Function(i) i.Descr).Select(Function(g) New TrendAnnual With _
             {.Descr = g.Key, _
              .Tot = g.Sum(Function(c) c.Amount), _
              .Jan = g.Where(Function(c) c.Month = 1).Sum(Function(d) d.Amount), _
              .Feb = g.Where(Function(c) c.Month = 2).Sum(Function(d) d.Amount), _
              .Mar = g.Where(Function(c) c.Month = 3).Sum(Function(d) d.Amount), _
              .Apr = g.Where(Function(c) c.Month = 4).Sum(Function(d) d.Amount), _
              .May = g.Where(Function(c) c.Month = 5).Sum(Function(d) d.Amount), _
              .Jun = g.Where(Function(c) c.Month = 6).Sum(Function(d) d.Amount), _
              .Jul = g.Where(Function(c) c.Month = 7).Sum(Function(d) d.Amount), _
              .Aug = g.Where(Function(c) c.Month = 8).Sum(Function(d) d.Amount), _
              .Sep = g.Where(Function(c) c.Month = 9).Sum(Function(d) d.Amount), _
              .Oct = g.Where(Function(c) c.Month = 10).Sum(Function(d) d.Amount), _
              .Nov = g.Where(Function(c) c.Month = 11).Sum(Function(d) d.Amount), _
              .Dec = g.Where(Function(c) c.Month = 12).Sum(Function(d) d.Amount)})
    GridBindingSource.DataSource = MyTable.OrderBy(Function(i) i.Descr)
    db.Dispose()
    Me.Cursor = Cursors.Default
End Sub

 

 

 

Peter
Telerik team
 answered on 23 Feb 2011
3 answers
133 views
Hello all,

When I make an appointment in dayview with the RangeFactor set to five minutes. I can make 2 appointments, say 10:00-10:10 and 10:10-11:00. When I switch to weekview with the standard RangeFactor of 30 minutes these appointsments are placed side by side and the visual representation looks like 10:00-10:30 and 10:00 to 11:00. The timevalues are correct inside the dialog and database. The visual timescale is wrong, they should not overlap, but be placed on below one another. If I set the RangeFactor to 5  minutes I cannot see al the appoints in one screen.

This sample can be reproduced by the demo radschedular (exept for the 5 minute timescale). I am using Radcontrols for Winforms Q3 2010 (2010.3.10.1215)

I could not find a answer on the forum, maybe I used the wrong search values. What am I doing wrong?

Kind regards Marc Henssen
Dobry Zranchev
Telerik team
 answered on 23 Feb 2011
1 answer
308 views
Hello,

For a GridViewComboBoxColumn, is there a way to always show the dropdown arrow, so it is obvious to the user they can change the value? See screenshot attached

Thanks
Richard Slade
Top achievements
Rank 2
 answered on 22 Feb 2011
9 answers
1.3K+ views
Hi,
I need to enable disable context menu depending on the cell that is currently right clicked on. How do I go about this?

Thanks
Deepak
Richard Slade
Top achievements
Rank 2
 answered on 22 Feb 2011
9 answers
200 views
When double clicking or more (n-clicking) on any radtreeview node, or radcontextmenuitem (at least, maybe it happens on other controls), the screen freezes for a few seconds, apparently cueing the events before even going to the event handler on the code behind. The result of this is that any action is repeated n-times.
Any workaround or help will be great!
Best Regards,

Mariano Liceaga
Richard Slade
Top achievements
Rank 2
 answered on 22 Feb 2011
19 answers
641 views
I am using a gridview that i programmatically load 2 levels at run time. My question is, i want to be able to load the child rows of the 2nd level whenever the 1st level is expanded. i was able to locate the child is expanding and expanded events. But is there a way i can then go on and attach the children of the child row to the datagrid?????
Richard Slade
Top achievements
Rank 2
 answered on 22 Feb 2011
4 answers
368 views
Hello,

I have a filterable datagrid being used as a search screen by the user.  When the user begins a search, we select the entry they last selected as a starting point and then set the focus to the filter text box for the first column of the grid.

As they type, we scroll to the first matching entry by hooking the FilterChanged event by executing
this.TableElement.ScrollToRow(((Telerik.WinControls.UI.GridViewRowInfo)(this.MasterGridViewInfo.TableFilteringRow)).ViewInfo.Rows[0]);
and it seems to work well.

1. I'd like to enhance it by actually selecting the row (IsCurrent = true) and then place the focus (cursor) back to the filter text box at the end of the text so the user can keep typing without overwriting the original filter criteria.  I figured out how to do everything except placing the cursor at the end of the filter criteria text.

2. A problem did arise in using the mouse.  After entering a filter and scrolling the list to the first match, using the mouse to click on an entry in the list causes the list to scroll down the screen 1 line and a blank line appears between the filter row and the first row of results.

I am using VS 2008 version 9.0.30729.1 SP, Framework 3.5 SP1, Telerik Winforms 2010.3.10.1215

Thanks,
Chet
Chet Musialowski
Top achievements
Rank 1
 answered on 22 Feb 2011
1 answer
97 views
Key on the right hand side of the bar chart is overlapping with the chart, I am unable to see the chart behind it. I don't know how to move key to the right so that it appears after chart is finished or make my chart less wide so that key does not overlap?
Missing User
 answered on 22 Feb 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)
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
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
SyntaxEditor
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
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
SmartPasteButton
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?