Telerik Forums
UI for WinForms Forum
1 answer
179 views
Hi Telerik Team,

I've got a radgridview on a form. One of the columns have some long info. When I call bestfitcolumns after binding to grid some columns are to narrow. I can't even read what's in that column. Can you please take a look at the screenshot.
Thank you.
Erkut
Emanuel Varga
Top achievements
Rank 1
 answered on 19 Oct 2010
13 answers
291 views
Hi
I'm using version 2010 Q2. In this version, we have filter prefixes in the filter row. But I like to remove them (Just like previous version).
How can I do that?
Emanuel Varga
Top achievements
Rank 1
 answered on 19 Oct 2010
5 answers
165 views

Exception during custom sorting 2010 Q2 SP2.

Hi

2010 Q2 SP2.

 I have random exception when I want sort in grid.

 I do something wrong or there is bug in grid?

 In my scenario I do custom sorting:

 

 

private void radGridView1_CustomSorting(object sender, GridViewCustomSortingEventArgs e)
{
        if (e.Column.Name == "Size")
        {
            SizeObject size1 = e.CellValue1 as SizeObject;
            SizeObject size2 = e.CellValue2 as SizeObject;
            if (size1.Size > size2.Size)
            { e.SortResult = 1; }
            else if (size1.Size < size2.Size)
            { e.SortResult = -1; }
            else
            { e.SortResult = 0; }
        }
        if (e.Column.SortOrder == RadSortOrder.Descending)
        { e.SortResult *= -1; }
    }
}

 

ArgumentException - Insufficient space in the target location to copy the information.

at System.Collections.Generic.LinkedList`1.CopyTo(T[] array, Int32 index)
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at Telerik.WinControls.UI.GridViewSynchronizationService.AnalyzeQueue()
at Telerik.WinControls.UI.GridViewSynchronizationService.FlushEvents()
at Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewEvent gridEvent)
at Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewTemplate template, GridViewEvent eventData, Boolean postUI)
at Telerik.WinControls.UI.GridViewTemplate.DispatchEvent(GridViewEvent gridEvent, Boolean postUI)
at Telerik.WinControls.UI.GridViewTemplate.DispatchDataViewChangedEvent(Object sender, DataViewChangedEventArgs args)
at Telerik.WinControls.UI.GridViewTemplate.FireViewChangedEvent(Object sender, DataViewChangedEventArgs args)
at Telerik.WinControls.UI.GridViewTemplate.OnViewChanged(Object sender, DataViewChangedEventArgs e)
at Telerik.WinControls.UI.GridViewTemplate.OnViewChanged(DataViewChangedEventArgs e)
at Telerik.WinControls.UI.GridViewTemplate.CollectionView_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.RadCollectionView`1.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
at Telerik.WinControls.Data.RadDataView`1.RebuildData(Boolean notify)
at Telerik.WinControls.Data.RadDataView`1.RefreshOverride()
at Telerik.WinControls.Data.RadDataView`1.OnNotifyPropertyChanged(PropertyChangedEventArgs e)
at Telerik.WinControls.Data.RadCollectionView`1.OnNotifyPropertyChanged(String propertyName)
at Telerik.WinControls.Data.RadCollectionView`1.sortDescriptors_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at Telerik.Collections.Generic.NotifyCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
at Telerik.WinControls.UI.GridViewSortDescriptorCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
at Telerik.Collections.Generic.NotifyCollection`1.OnCollectionChanged(NotifyCollectionChangedAction action, Object item, Int32 index)
at Telerik.Collections.Generic.NotifyCollection`1.InsertItem(Int32 index, T item)
at Telerik.WinControls.Data.SortDescriptorCollection.InsertItem(Int32 index, SortDescriptor item)
at Telerik.WinControls.UI.GridViewSortDescriptorCollection.InsertItem(Int32 index, SortDescriptor item)
at System.Collections.ObjectModel.Collection`1.Add(T item)
at Telerik.WinControls.UI.GridViewColumn.Sort(RadSortOrder sortOrder, Boolean multiSortMode)
at Telerik.WinControls.UI.GridHeaderRowBehavior.OnMouseUp(MouseEventArgs e)
at Telerik.WinControls.UI.BaseGridBehavior.OnMouseUp(MouseEventArgs e)
at Telerik.WinControls.UI.RadGridView.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at Telerik.WinControls.RadControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Regards

Raymond
Top achievements
Rank 1
 answered on 19 Oct 2010
7 answers
227 views
I have a RadGridView with 3 columns.
One of the columns it's the full path of one file.
My problem is, when the file has a big full path, can't see it all because when i resize the column, it has a limit, the Control size.
Is there a way to add a horizontal scroll bar and allow me to resize one column with no limitation?

In attachment is one print of my problem.

Bruno Almeida
Deborah
Top achievements
Rank 1
 answered on 19 Oct 2010
2 answers
233 views
I am writing my own resize code based on discussions in some other threads. I am using the code from one of the examples that looks through each row and gets the column value and then uses MeasureString to determine the correct string width.

This is working well for all but my combobox columns. The value of those columns is the Id (like 35) instead of the display value (like "Acme Inc"). So the size of the column is not being set appropriately.

How do I get the actual displayed value, not the bound value for the column?

Thanks!
Deborah
Top achievements
Rank 1
 answered on 18 Oct 2010
2 answers
157 views
I am calculating the required width of my columns. The DateTime columns are all coming out too large because the .Value property of the field is the full date and time, even though the column is formatted to be the short date.

How do I get the formatted value of the column?

Thanks -
Deborah
Top achievements
Rank 1
 answered on 18 Oct 2010
33 answers
759 views
I am noticing a strange thing with radgridview in CurrentRowChanging event. I have a radgridview without hierarchy, having add new row position at top. The datasource is a dataset and datamember is a datatable.

In current row changing, the following code gives the values for new row just input by using the maximum index, but in another radgridview I get the values by using the index as 0. These 2 codes are as below. Both use the same version of radgridview i.e. Q1 2008 SP1. Can someone please help to explain why this is happening?  I would have always expected that behind-the-scenes, a new row ( with rowstate of Added) is being added to a datatable at end of its rows collection, when the CurrentRowChanging event fires.

Thanks
Sunil

CODE 1:
if (e.CurrentRow is GridViewNewRowInfo && this.DataSource != null)
            {
 
                DataRowView dataRowView = null;
 
                if (this.Rows.Count >= 1)
                {
   
                dataRowView = this.Rows[0].DataBoundItem as DataRowView;
                }
            }

CODE 2:
if (e.CurrentRow is GridViewNewRowInfo && attributesRadGridView.DataSource != null)
            {
 
 
                DataRowView dataRowView = null;
 
                if (attributesRadGridView.Rows.Count >= 1)
                {
                     
               dataRowView = attributesRadGridView.Rows[attributesRadGridView.Rows.Count - 1].DataBoundItem as DataRowView;
                   
                }
             }
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 18 Oct 2010
2 answers
292 views
Hi,

Can I trigger the "CurrentCellDirtyStateChanged" event like the standard DataGridView ?

A DataSource fills my RadGridView.

I would like to display the total number of rows that are checked in a checkBox Column of my radGridView.

When I check 3 rows on the the WinForm, I only get 2 rows checked. I have to check another one or set the focus on another control to get it.

Thanks for your help!

Fabien
Fabien
Top achievements
Rank 1
 answered on 18 Oct 2010
9 answers
349 views
Hello guys,
I have 2 problems:
1. I'm try to use gridViewComboBox, but i got this problem:
- how can I put my item(s) collection without connect throught the database??

2. I try to making a validation for each cells using the cellvalidating events, the problem is, why if I create a new row, the validation doesn't work???
here my codes:

    Private Sub TabelBuku_CellValidating(ByVal sender As System.Object, ByVal e As Telerik.WinControls.UI.CellValidatingEventArgs) Handles TabelBuku.CellValidating
        Dim kolom = TryCast(e.Column, GridViewDataColumn)
        If ((TypeOf e.Row Is GridViewDataRowInfo) AndAlso (kolom IsNot Nothing) AndAlso (kolom.FieldName = "IdBuku")) Then
            Dim baris = DirectCast(e.Row, GridViewDataRowInfo)
            Dim nilai = DirectCast(e.Value, String)
            If (String.IsNullOrEmpty(nilai)) Then
                e.Cancel = True
                lblKesalahan.BackColor = Color.LightYellow
                lblKesalahan.ForeColor = Color.Red
                lblKesalahan.Text = "ID Buku Harus Diisi!!"
                baris.ErrorText = "ID Buku Harus Diisi!!"
            Else
                baris.ErrorText = String.Empty
                lblKesalahan.BackColor = Color.Transparent
                lblKesalahan.ForeColor = Color.LimeGreen
                lblKesalahan.Text = "EDITOR DATA BUKU"
            End If
        End If
    End Sub
 
Emanuel Varga
Top achievements
Rank 1
 answered on 18 Oct 2010
12 answers
271 views
Hi all,
I've used a RadGridView in my C# app on a form. At runtime when the user leaves a cell empty Default message provided by the RadGridView appears. First, I want to replace my own message with that message and second how do I must handle such runtime errors:
1. Leaving a newly-added empty row by the user which causes to generate a runtime error.
2. Leaving a cell empty.
3. Accessing the content of a cell for some checkings like Length of the value or something else.
4. When the old value removed by the user I want to showing it again in cases which user don't provide a valid Content.

Thank you very much, Tooraj Azizi.
Tooraj
Top achievements
Rank 1
 answered on 18 Oct 2010
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?