Telerik Forums
UI for WinForms Forum
2 answers
136 views

I've got a simple RadGridView bound to a DataTable (through a BindingSource); standard and easy way to put a gridview on a form dragging it from datasources box.
I've implemented my business rule validation in the datatable, as below:

Private Sub OperazioniDataTable_ColumnChanging(ByVal sender As System.Object, ByVal e As System.Data.DataColumnChangeEventArgs) Handles Me.ColumnChanging
  Debug.Print("ColumnChanging: column=" & e.Column.ColumnName)
  If (e.Column.ColumnName = Me.impovalColumn.ColumnName) Then
    If CType(e.ProposedValue, Decimal) = 0 Then
      e.Row.SetColumnError(e.Column, "Inserire un importo diverso da zero")
    Else
      e.Row.SetColumnError(e.Column, "")
    End If
  End If
End Sub

When I edit the [impoval] cell and enter 0, moving to another cell/row raises the ColumnChanging event, but no feedback at all on the grid.
Another issue: if I press [Escape] key in the cell, the value is not restored to the old one.
In the standard MS grid I get feedback and restore behaviour.
I would like to know the best practices to enforce data validation (on single cells and on row, moving away from a cell/row and/or trying to close a form, etc.), possibly avoiding to put rules in the gridview events, in order to keep all the business rules validation code in the data transfer objects.
Please don't suggest to create separate business objects, as I want to avoid this coding overhead.
TIA
Ubaldo
Richard Slade
Top achievements
Rank 2
 answered on 26 Jan 2011
6 answers
116 views
Hi....
       Which is the event for Updating Cell And Updating Record...
I m using CurrentRowChanging Event For this but this event fires evertime i fill the dataset which is bound to the Grid...
I want an event which will fire only when I Update a row and come out of that row...
Richard Slade
Top achievements
Rank 2
 answered on 26 Jan 2011
19 answers
202 views
Please help to findout out the break mechanism of rad schedular..what i want is when a person have schedules break from 1 to 2(1 hr) then this time slot is not editable or Appointment...
Richard Slade
Top achievements
Rank 2
 answered on 26 Jan 2011
10 answers
813 views
Hi guys.
 I use win forms . and telerik gridview.
How can I filter a radgridview with a textbox_keypress. not by radgrid's filter?(while I am typing in textbox, rad grid view data is filter)
 is it possible?
thnx.
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 26 Jan 2011
2 answers
121 views
Hi

How can i clear ITEMS from Telerik.Charting.ChartSeriesItem ???

for example :

dim list as new list of single
 and easily i can clear items like list.clear

but i am confused about  ChartSeriesItem  :)
Sina
Top achievements
Rank 1
 answered on 26 Jan 2011
2 answers
84 views
I have the need to deploy multiple applications that use the rad controls.  In general, I need to deploy the 2 DLL's telerikcommon and telerikwincontrols.  Rather than have them deploy with each application, I want to have a seperate deployment of these 2 dlls to the gnc and then have them marked are pr-requesites for the other application deployments.  I am not sure how this can be accomplished.  Any help you can provide in this matter will be greatly appreciated. 
Richard Slade
Top achievements
Rank 2
 answered on 26 Jan 2011
2 answers
116 views
Hi,
After attaching a datasource to a radgridview , I apply best fit on the entire grid. But sometimes my grid behaves wierd and gives me something like the attached image. Please help.

Thanks a lot
Shweta
Edward Chen
Top achievements
Rank 1
 answered on 26 Jan 2011
4 answers
157 views
Ok i am using Entity Framework to access my data, I have no problem adding a record or deleting a record. But when I want to update a record I cant figure out what events to capture.

I have tried adding a  RadGridView1_RowsChanged to the code and it works great for the update, but my problem occurs now that when I add a record to the grid RadGridView1_RowsChanged gets called before RadGridView1_UserAddedRow.

In fact the NotifyCollectionChangedAction.ItemChanged gets called before NotifyCollectionChangedAction.Add gets called
So as soon as I leave a cell in the row my itemchanged fires before the add and i get problems.

How can i idenitfy if row is being added instead of updated. I sue wish there was a UserUpdatedRow event

Any help is appreciated

Public Class ManageMemberType
    Public context As New MIMSModel.MIMSEntities
    Dim newMemType As MemType
    Dim updMemType As MemType
    Dim dmemtype As MemType
    Dim rtype As String
  
  
    Private Sub ManageCompanyType_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim query = (From m In context.MemTypes Select m).ToList
        RadGridView1.DataSource = query
  
    End Sub
  
      
  
  
  
  
    Private Sub RadGridView1_RowsChanged(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewCollectionChangedEventArgs) Handles RadGridView1.RowsChanged
  
        If e.Action = Telerik.WinControls.Data.NotifyCollectionChangedAction.ItemChanged Then
            Dim updrow As GridViewDataRowInfo = CType(e.NewItems(0), GridViewDataRowInfo)
  
            updMemType = MemType.CreateMemType(updrow.Cells("Type").Value.ToString)
  
            updMemType.Desc = updrow.Cells("Desc").Value.ToString
  
  
            DataAccess.UpdateEntity(updMemType, "MemTypes")
  
        End If
  
  
            End Sub
  
  
  
  
  
  
    Private Sub RadGridView1_UserAddedRow(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewRowEventArgs) Handles RadGridView1.UserAddedRow
        newMemType = MemType.CreateMemType(e.Row.Cells.Item("Type").Value.ToString)
        newMemType.Desc = e.Row.Cells.Item("Desc").Value.ToString
        Try
            context.MemTypes.AddObject(newMemType)
            context.SaveChanges()
            MsgBox("record Added")
        Catch ex As UpdateException
            e.Row.Delete()
            MsgBox(String.Format("The object could not be added. Make sure that a Member type of '{0}' does not aleady exist.", newMemType.Type))
        End Try
  
  
    End Sub
  
  
    Private Sub RadGridView1_UserDeletingRow(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewRowCancelEventArgs) Handles RadGridView1.UserDeletingRow
        rtype = e.Rows(0).Cells(0).Value.ToString()
        Dim rcount = (From r In context.GetCompanyInfoes Where r.CompanyType = rtype Select r).Count
        If rcount > 0 Then
            MsgBox("There are  " + rcount.ToString + " companies assigned to this member type, You cannot delete this type")
        Else
            Try
                dmemtype = MemType.CreateMemType(rtype)
                DataAccess.DeleteEntity(dmemtype, "MemTypes")
            Catch ex As Exception
                MsgBox("There was a problem deleting the Member type of " + rtype + " Please notify IT")
            End Try
  
        End If
    End Sub
  
  
End Class
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 25 Jan 2011
1 answer
86 views
I got the new version Q3 2010 after I was using 2009 Q2
I uninstalled all 2009 files and installed the new Q3
Now, all my old applications that I developed using Telerik Controls are giving errors and I spend hours repairing references
is there any solutions?
Richard Slade
Top achievements
Rank 2
 answered on 25 Jan 2011
6 answers
114 views
Hello. I have been using Telerik for a while and i must say i am very impressed. There isn't almost anything that we can't do.
But this time i run into a problem, as i wanted to apply drag and drop in my radmenu and it does not have such implementation. Maybe i am missing something, but is there anyway to implement this?
Thanks in advance,
Bes regards, Rui Silva
Jack
Telerik team
 answered on 25 Jan 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
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
CheckedDropDownList
ProgressBar
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
NavigationView
VirtualKeyboard
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?