Telerik Forums
UI for WinForms Forum
2 answers
175 views

Hello,

Is it possible to display a single RadGridView on more than one RagePageViewPage of a RadPageView in the same form?  We have a need for this and do not want to have multiple RadGridView instances to do it because of the overhead.  It seems like you should be able to display the same control in multiple places of a form but so far I haven't had much luck. 

Thank you for any help with this,

Mike

MikeB
Top achievements
Rank 1
 answered on 26 Jul 2016
5 answers
806 views

I am using the radCheckedDropDownList control with MultiLine set to True and AutoCompleteMode set to Suggest.  When a user types text into the edit portion of the control and autocomplete fails to find a match the text remains in the edit portion upon leaving the control.  If the user selects an item in the list the unmatched text string is removed when the drop down list is closed.  Is there a way to either restrict the user entered text to the content of the checked drop down list or cause the edit portion of the control to refresh (remove the partial text) when a match is not found and the user leaves the control?

Thanks.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 26 Jul 2016
3 answers
328 views

I'm using the radDateTimePicker on a WinForms client (Q2 2016 release) with the ShowCheckBox property set to true and the Checked property set to false. The issue I'm having is that in that state, there seems to be no way to get the control to be a tab stop. I'm surmising that this is because it's trying to move focus not to the checkbox, but to the date, which is disabled because the checkbox is unchecked.

The MS VS date time picker control behaves as I'd expect (i.e. tabbing in stops at the checkbox so the user could, for example, tap on the space bar to check it and enable the date).

I've tried mucking about in the various UI Elements objects and their properties, primarily the RadCheckBoxElement and the RadCheckmark below that to no avail.

So, my question is simple - with the checkbox unchecked, how do I get the control to tabstop?

Dimitar
Telerik team
 answered on 26 Jul 2016
1 answer
116 views

Hi,

If I create a shape dynamically and assign it,  who is responsible for the disposal of it?

e.g. where _buttonElement is a RadButtonElement in the code fragment below, do I need to add code to dispose of it or will the ButtonFillElement do it?

_buttonElement.ButtonFillElement.Shape = new EllipseShape();

thanks in advance.
Dimitar
Telerik team
 answered on 25 Jul 2016
4 answers
125 views

Hello,

i use the ViewCellFormatting event to set an icon in the group header. It works, but how can i determining the group if i have more than one grouped column (something like the SummaryItem in the GroupSummaryEvaluationEventArgs).

Here my event handler for th ViewCellFormattingEvent:

private void OnGridViewCellFormatting(object sender, CellFormattingEventArgs e)
{
  //Need the group here
  GridCellElement gce = e.CellElement;
  if (gce is GridGroupContentCellElement)
  {
    GridData gd = GetGridData(e); //Get the needed data
 
    gce.DrawFill = true;
    gce.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
    gce.BackColor = SystemColors.ControlLight;
    gce.Image = gd == null ? null : gd.Point.Marker ? _okImage : _nokImage;
  }
}

Thank you

Christoph

Christoph
Top achievements
Rank 1
 answered on 22 Jul 2016
1 answer
1.3K+ views

Hello,

This is a not an issue with RadGridView per say, but somewhat related.  Hopefully someone can suggest an alternative solutions for me.

I have a simple RadGridView which is binded to a BindingList with about 2,500 items.  The item that is in BindingList inherits ObservableObject from MVVMLight, hence implements INotifyPropertyChanged interface.  One of my properties is boolean called "Selected" which is binded to a checkbox column.  I have a button "Select All". On click, I need to mark all items as selected.  On the backend, I do a simple foreach loop and set Selected = True.  Here is the code.

foreach (var p in Products)
   p.Selected = true;

Very simple. But this loop takes almost 10 minutes.  I figured out that the issue is related to the BindingList.  I did some isolated Tests (without UI).  Simply created a model that implements INotifyPropertyChanged interface, created 1000, 2000, and 3000 records and evaluated the performance.  The result came out to be the longer the list, the more time per item it takes to set simply selected=true.  Here are results

1000 items => 11 sec total => 0.011 sec/cycle

2000 items => 44 sec total => 0.022 sec/cycle

3000 items => 100 sec total => 0.033 sec/cycle

as you can see the average per cycle increases when there are more items in the BindingList

I did some research and this article explains why this is happening: http://www.blog.dapfor.com/why-bindinglist-is-slow-with-objects-implementing-inotifypropertychanged-interface

I tried using approach from the article above.  My loop works in milliseconds.  Great! But now, my checkbox column in the grid does not get updated until I select each row and loose focus.  Obviously the grid does not get a notification to update its cells.

I also tried setting RaiseListChangedEvents = false before the loop and then  list.RaiseListChangedEvents = true after the loop.  Result is the same.

So my question is

1. Is there an alternative class that implements IBindingList interface which would yield a linear increase in time as more items are added, not exponential?

2. If there is no other way, then I guess my only option is to refresh the grid after I update the binding list.  How do I do this?

3. Any other suggestions?

Thank you in advance.

Dimitar
Telerik team
 answered on 22 Jul 2016
3 answers
172 views

Hi.

I'd like to validate the data of a grid and display validation errors. I'm working with a DataSet and use the column errors of it.
As suggested here (http://www.telerik.com/forums/how-to-set-errortext-when-adding-a-record) I set the Grid's DataSource as a DataView but still no errors are displayed. When setting the error texts manually it works though.

Are there any other prerequisites for the Dataview's columnerrors or is it just not supported by RadGridView?

Sample code:

    Friend WithEvents grd_report_ As Telerik.WinControls.UI.RadGridView

        For i As Integer = 0 To row.Table.Columns.Count - 1
            Select Case row.Table.Columns(i).ColumnName
                Case "some column"
                    If error_condition Then
                        row.SetColumnError(i, "error")
                    End If
                Case ...
           End Select
        Next
        ...
        'doesn't display any errors
       grd_report_.DataSource = ds.Tables(TAB_REPORT).DefaultView()   

        'setting ErrorTexts works
        For Each r As GridViewRowInfo In grd_report_.Rows
            Dim drv = CType(r.DataBoundItem, DataRowView)
            For i As Integer = 0 To r.Cells.Count - 1
                r.Cells(i).ErrorText = drv.Row.GetColumnError(i)
                'has to be set in CellFormatting event apparently!?!?
                'If Not String.IsNullOrEmpty(r.Cells(i).ErrorText) Then
                '    r.Cells(i).Style.BackColor = Color.Red
                '    r.Cells(i).Style.NumberOfColors = 1
                '    r.Cells(i).Style.DrawFill = True
                'End If
            Next
        Next

Best regards,
Bernhard

Hristo
Telerik team
 answered on 21 Jul 2016
2 answers
63 views

Hi,

I'm binding a grid to a collection where one of the properties is of type 'Color'.

I want to validate the selected color, as only a subset of colors are allowed.

The validating event fires twice after changing the value of 'Color col' cell. And hence my msg box is shown twice. Any way around this?

private void StatusRadGridView_CellValidating(object sender, CellValidatingEventArgs e)
{
    if (e.ActiveEditor != null && e.ActiveEditor is GridColorPickerEditor)
    {
        Color c = (Color)e.Value;
        if(!AllowedColors.Exists(o=>o.Name == c.Name))
        {
            e.Cancel = true;
            RadMessageBox.Show(errorMsg);
        }
    }
}

Thomas
Top achievements
Rank 1
 answered on 21 Jul 2016
1 answer
289 views
I need greater than and less than rules in excel like filtering. How can I get it?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 20 Jul 2016
3 answers
96 views

I want to insert column which index what i want.

so.. i Collocate control and I init first column and rows.

i success to insert column in runtime

but it is'nt editable..

I can edit when use Add(String) method ...

what is difference between?

I doubt columnItem's property.(Inheritanced GridViewDataColumn)

 - code

                        int index =radGridView1.SelectedCells[0].ColumnInfo.Index;

                         columnItem item=new columnItem();

                        radGridView1.Columns.Insert(index,item);

 

Please advise.

excute immature english.

jung
Top achievements
Rank 1
 answered on 20 Jul 2016
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
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
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
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?