Telerik Forums
UI for WinForms Forum
1 answer
88 views
1. The RowValidating and RowValidated events do not fire when expected.
You have these events set to fire when the user changes rows. What happens when there is only one row in the grid? Expected behavior is to fire when the Row loses focus, which should happen when a user clicks anywhere outside the row, including whitespace or other controls on the form.

2. The data is saved before row validation is complete.
What is the point of having row-level validation if the values have already been saved to the databound object? Absolutely nothing should be saved until ALL validation is complete.

3. The user is locked down and unable to escape/cancel the edit if the row validation actually gets called and fails. 
This is extremely poor design. You cannot expect a user to be able to fix the issue every time. Sometimes they will need to start over, especially if there is a large amount of data. Instead, you lock them down and force them into making changes they may not want to commit to.

These problems have been around for years, but nobody has taken the time to address them despite promises. Even worse, the links to the Feature Requests in these threads no longer work and Telerik has changed their stance from admitting the problems to claiming that these are "desired behaviors" and "features". Stop calling these behaviors features, they are most certainly not.

http://www.telerik.com/forums/what-event-s-is-are-fired-when-the-pencil-icon-is-clicked

http://www.telerik.com/forums/radgridview---save-changes-to-a-rows-data-back-to-database

http://www.telerik.com/forums/cancel-row-edit

http://www.telerik.com/forums/in-rowvalidating-e-row-ismodified-doesnt-show-as-true-when-it-should


http://www.telerik.com/forums/radgridview-rowvalidating-event

http://www.telerik.com/forums/rowvalidating-not-firing

http://www.telerik.com/forums/rowvalidating-event-missing

http://www.telerik.com/forums/rowvalidating-problems

http://www.telerik.com/forums/esc-in-gridviewdatetimecolumn-inside-raddatagridview-after-i-did-an-e-cancel-true-in-row-validation


http://www.telerik.com/forums/how-to-validate-row-data

http://www.telerik.com/forums/rowchanged-question

http://www.telerik.com/forums/how-to-prevent-empty-rows-creation
Stefan
Telerik team
 answered on 25 Mar 2014
1 answer
388 views
Hi,
How can I add icons to Category panel in property grid.

Also, how to add icon to propertyentry element in Grid.  

[-]  [icon]   Appearance (category tab)
       [some icon_1]  Color             |   Red
       [some icon_2]  Orientation   |   Left
                                  Preview       |    [ Preview image]

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Mar 2014
5 answers
855 views
Hello,

We have an application with SQL Server running in one location and then clients in different timezones using that data.  All datetimes are stored as UTC values.  For display we want them in local date/time.  How do we do that in GridView?

For example:
A grid showing a list of events with an updated_date column.  We want those event dates/times as local time.  Can .formatstring be used to somehow set ToLocalTime()?

Thanks,
Paul
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Mar 2014
1 answer
167 views
hello to all
I downloaded  Telerik Ui for windows form trial
when i want to add new form I get the following error:

full error Text : 
Error occurred while running wizard.

System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.WinControls.VSX.TemplateProcessing.WFScenarioManager.Launch(IServiceProvider serviceProvider, String itemName, String scenarioPath, String scenarioName)
   at Telerik.WinControls.VSPackage.VSItemTemplateWizard.LaunchScenarioManager(ServiceProvider serviceProvider, Dictionary`2 replacementsDictionary)
   at Telerik.VSX.VSPackage.ItemTemplateWizardBase.RunStarted(Object automationObject, Dictionary`2 replacementsDictionary, WizardRunKind runKind, Object[] customParams)
   at Telerik.VSX.VSPackage.WizardBase.<>c__DisplayClass5.<Microsoft.VisualStudio.TemplateWizard.IWizard.RunStarted>b__4()
   at Telerik.VSX.VSPackage.WizardBase.CatchExceptionAndSendReport(Action action)


Dyanko
Telerik team
 answered on 25 Mar 2014
1 answer
124 views
Hello,
As I can do to select cells, rows and columns, in the same way as in excel. I've only managed to select cells or entire rows
I have not found an example of how to do it
Thanks
Ralitsa
Telerik team
 answered on 25 Mar 2014
1 answer
64 views
My application is a scheduler for customers that use a normal US calendar with Sunday as the first day of the week. The RadScheduler displays this way but the printouts do not. When I print a weekly calendar, I get 2 pages, one with the previous week, with Sunday as the last day, and one for the current week with Monday as the first day. Is there a workaround for this?
Dimitar
Telerik team
 answered on 25 Mar 2014
3 answers
189 views


Hi! sir:

I have three different time period,like this:


morning : 9:00~12:00

afternoom:13:00~17:00

night: 18:00~23:00

 
May  i  use the dropdownlist  chose the the time   period that i want and dynamic change the RulerStartScale and
dayView.RulerEndtScale  of dayview  (figure 1 show)    ? 

Another problem  is that may i display ,15 minutes. 30minutes.  45 minutes. like figure 2
show    ?
 
thanks a lot!~~


                            customer number:QD1612651
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Mar 2014
4 answers
702 views
Hi,is it possible to display the buttons list only when the arrow part is clicked. Currently, the buttons list will be displayed when click on the main button. I need some thing like the normal drop down list. Thanks in advance. 
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Mar 2014
6 answers
186 views
I have a situation where I'd like to provide the user with some common values to select for a column in a GridView, based on the value of another column that exists in the row. I know this can be done with the AutoComplete mode on the column. The problem is that I'd also like to allow them to add a new value that doesn't appear in the list if they want. Is there a way to allow the user to enter a custom value with the GridViewMultiComboBoxColumn or am I going about this all wrong?

Any pointers in the right direction would be greatly appreciated. Thanks!
Dimitar
Telerik team
 answered on 24 Mar 2014
3 answers
230 views
Hello,
I am trying to figure out the INotifyPropertyChangd interface for using a Binding list with a grid. I CRUD my data to the database with code and display in the grid but I have to call a method to load the data into the grid every time I make a change. I am missing something to bind my data to the grid whenever a change is made. I created some small demo files and have looked at multiple examples but am still having problems figuring the link between the db and the grid. Below is what I have created to help understand the concept. One thing to note is that I am creating my data table using ORM fluent mapping in code.

​ //public class _Student
public class _Student : System.ComponentModel.INotifyPropertyChanged
{
private int id;
private string name;
private string grade;

public int Id
{
get { return id; }
set
{
id = value;
this.OnPropertyChanged("Id");
}
}

public string Name
{
get { return name; }
set
{
name = value;
this.OnPropertyChanged("Name");
}
}

public string Grade
{
get { return grade; }
set
{
grade = value;
this.OnPropertyChanged("Grade");
}
}

private void OnPropertyChanged(string PropertyName)
{
this.OnPropertyChanged(new PropertyChangedEventArgs(PropertyName));
}

protected virtual void OnPropertyChanged(PropertyChangedEventArgs args)
{
if (PropertyChanged != null)
{
PropertyChanged(this, args);
}
}

public event PropertyChangedEventHandler PropertyChanged;


//Mapping.
internal static MappingConfiguration<_Student> StudentMapping()
{
var config = new MappingConfiguration<_Student>();
config.MapType(x => new
{
Name = x.Name,
Grade = x.Grade,
}).ToTable("Student");
config.HasProperty(p => p.Id).IsIdentity(KeyGenerator.Autoinc);
config.HasProperty(p => p.Name).IsNotNullable().IsUnicode().HasLength(50);
config.HasProperty(p => p.Grade).IsNullable().IsUnicode().HasLength(50);
return config;
}
}

public class _vmstudent
{
//INSERT.
public static void InsertNewStudentInfo(BindingList<_Student> stud)
{
using (ProjectSpecSqlFluentContext db = new ProjectSpecSqlFluentContext())
{
foreach (var item in stud)
{
if (!db._Students.Any(x => x.Name.Equals(item.Name)))
{
_Student s = new _Student
{
Name = item.Name,
Grade = item.Grade
};
db.Add(s);
}
}
db.SaveChanges();
}
}

//UPDATE.
public static void UpdateStudentInfo(int Id, string BestGrade)
{
using (ProjectSpecSqlFluentContext db = new ProjectSpecSqlFluentContext())
{
if (db._Students.Any(x => x.Id.Equals(Id)))
{
_Student s = db._Students.Single(x => x.Id.Equals(Id));
s.Grade = BestGrade;
db.SaveChanges();
}
}
}

//READ.
public static BindingList<_Student> ReadStudentInfo()
{
BindingList<_Student> list;
using (ProjectSpecSqlFluentContext db = new ProjectSpecSqlFluentContext())
{
var result = (from s in db._Students
select new _Student
{
Id = s.Id,
Name = s.Name,
Grade = s.Grade
}).ToList();
list = new BindingList<_Student>(result);
}
return list;
}

//DELETE.
public static void DeleteStudentInfo(int Id)
{
using (ProjectSpecSqlFluentContext db = new ProjectSpecSqlFluentContext())
{
if (db._Students.Any(x => x.Id.Equals(Id)))
{
_Student s = db._Students.FirstOrDefault(x => x.Id.Equals(Id));
db.Delete(s);
db.SaveChanges();
}
}
}
}


public partial class StudentForm : Telerik.WinControls.UI.RadForm
{
private BindingList<_Student> student;

public StudentForm()
{
InitializeComponent();

////Default schema.
//vmSchema.AddDefaultTableInfo();

this.radGridView1.DataSource = _vmstudent.ReadStudentInfo();

this.rbtnAdd.Click += rbtnAdd_Click;
this.rbtnDelete.Click += rbtnDelete_Click;
this.rbtnBestGrade.Click += rbtnBestGrade_Click;
}

//ADD...
void rbtnAdd_Click(object sender, EventArgs e)
{
student = new BindingList<_Student>();
student.Add(new _Student { Id = 0, Name = "Peter", Grade = "A" });
student.Add(new _Student { Id = 0, Name = "John", Grade = "B" });
student.Add(new _Student { Id = 0, Name = "Tony", Grade = "C" });
student.Add(new _Student { Id = 0, Name = "David", Grade = "D" });

_vmstudent.InsertNewStudentInfo(student);
this.radGridView1.DataSource = _vmstudent.ReadStudentInfo();
}


//BEST GRADE...
void rbtnBestGrade_Click(object sender, EventArgs e)
{
int index = this.radGridView1.Rows.IndexOf(radGridView1.CurrentRow);
string id = this.radGridView1.Rows[index].Cells["Id"].Value.ToString();

_vmstudent.UpdateStudentInfo(Convert.ToInt16(id), txtBestGrade.Text);
this.radGridView1.DataSource = _vmstudent.ReadStudentInfo();
}

//DELETE..
void rbtnDelete_Click(object sender, EventArgs e)
{
int index = this.radGridView1.Rows.IndexOf(radGridView1.CurrentRow);
string id = this.radGridView1.Rows[index].Cells["Id"].Value.ToString();

_vmstudent.DeleteStudentInfo(Convert.ToInt16(id));
this.radGridView1.DataSource = _vmstudent.ReadStudentInfo();
}
}

Your help would be appreciated.

Thanks

Gavin



George
Telerik team
 answered on 24 Mar 2014
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
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
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
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?