Telerik Forums
UI for WinForms Forum
2 answers
97 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
654 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
229 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
271 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
201 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
3 answers
138 views
i need to change font size and color of caption how do i change it
thank you
Emanuel Varga
Top achievements
Rank 1
 answered on 17 Oct 2010
1 answer
74 views
Thank you.
Emanuel Varga
Top achievements
Rank 1
 answered on 17 Oct 2010
3 answers
146 views
After Upgrade VS 10 told me about duplicate assemblys, one in GAC and others in c:\Users\Roaming\blabla...
VS Forms Designer was freezed, and so on...

i'm sure i messed it up myself but no idea when. Maybe it was a bad idea to copy some telerik assemblys to the bin folder
of my project (for simple later xcopy deployment).

what's best practices for update, should i uninstall and reinstall outside visual studio
or is it save/same functionality to use upgrade wizard inside VS.

(I use the upgrade wizard for asp.net ajax about more than a year now and havent had ever any issues)
Richard Slade
Top achievements
Rank 2
 answered on 16 Oct 2010
6 answers
217 views
One of the columns in our grid has wrapped text. So we set AutoSizeRows = True so that the row height automatically resizes to fit the multiple lines as needed.

However, this causes another problem when adding new lines. When the user clicks our Add button and we add a row to the grid, the row is only a few pixels tall. The user cannot enter data because the row is way too small.

We tried hard-coding in a height for the row after adding the row, and this works temporarily. But if the user wants to add four rows only the last row retains its height.

Is there some way to set a minimum or default row size so we can leave AutoSizeRows set to try and still have an Add feature?

Thanks!
Emanuel Varga
Top achievements
Rank 1
 answered on 16 Oct 2010
4 answers
86 views
I have inherited a project that was started with an older version of RadControls for WinForms and naturally i am getting all kinds of errors trying to get it up to par with current.   Specifically i need to know the last version that had RadGridView.TableElement and GridViewCellInfo.Tag.  I would like to at least get this project up and going and then migrate to newer components.

Thanks in advace,

Clay Hall
clayhall
Top achievements
Rank 1
 answered on 15 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)
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?