How can I limit the length of characters user can enter on a particular gridview column?
I tried this code but I got an error saying that there is no definition for MaxLength?
void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
if (e.ColumnIndex == 1)
{
if (e.Column is GridViewTextBoxColumn)
{
((RadTextBoxEditorElement)((RadTextBoxEditor)this.radGridView1.ActiveEditor).EditorElement).MaxLength = 30;
}
}
}

I am new to Telerik controls and am attempting setting up a Scheduler control on a windows form. I have followed the web based sample and am attempting to bind to your sql based sample data using as the ScheduleBindingDataSource data setting the settings as your sample
Does the datasource need to be initiated when the form loads as I am returning no records?
ResourceProvide
Allownew True
Datamember Appointments
DataSource SchedulerDataDataSet
If I comment out the if statement in the data binding event and force a new instance of the SchedulerDataDataSet then the records are returned!
'If Me.SchedulerDataDataSet Is Nothing Then
Me.SchedulerDataDataSet = New SchedulerDataDataSet()
Dim appointmentsAdapter As New AppointmentsTableAdapter()
appointmentsAdapter.Fill(Me.SchedulerDataDataSet.Appointments)
Dim resourcesAdapter As New ResourcesTableAdapter()
resourcesAdapter.Fill(Me.SchedulerDataDataSet.Resources)
Dim appointmentsResourcesAdapter As New TransientAppointmentsResourcesTableAdapter()
appointmentsResourcesAdapter.Fill(Me.SchedulerDataDataSet.TransientAppointmentsResources)
' End If
Hello, Telerik!
For some reason I cannot find my previous thread.
Here is your answer for my previous question:
*****************
Hello Alexander,
Thank you for writing.
Due to the UI virtualization in RadGridView, cell elements are created only for currently visible cells and are being reused during operations like scrolling, filtering, grouping and so on. The CellFormatting event is fired only for the visible cells in the grid. That is why you obtain this unexpected behavior. Note that the CellFormatting event is purposed to customize the cells' style and it is not recommended to change the cell's value in this event. Changing the value of a cell will trigger an update of the current view and thus the CellFormatting event will be fired again. This may lead to any other unexpected behavior. I would recommend you to update the cells' values outside the CellFormatting event handler, e.g. in a RadButton.Click event. Thus, you can iterate the desired rows and for each row, you can change the value for the specific cell.
If it doesn't suit your scenario, it would be greatly appreciated if you can provide additional information about the exact goal that you are trying to achieve. Thus, we would be able to think about a suitable solution and assist you further. Thank you.
I hope this information helps. Should you have further questions I would be glad to help.
Regards,
Dess
Progress Telerik
*************************
My further questions:
What other events during gridview load you can advise to compute values? RowFormatting will not work too?
If you recommend to compute after gridview load, can you tell me even and should I use Rows collection for iteration?

Greetings. We're considering to adopt your suite of components as a standard for our future applications.
At the moment, I'm trying to understand if your WinForms GridView component behavior suits our current workflow.
Consider the following class structure (Master -> each master has "n" Slaves -> each slave has "k" SubSlaves):
public class MasterEntity
{
public Int32 Id { get; set; }
public String Name { get; set; }
public IList<SlaveEntity> Slaves { get; set; }
}
public class SlaveEntity
{
public Int32 Id { get; set; }
public String PropA { get; set; }
public Decimal PropB { get; set; }
public IList<SubSlaveEntity> SubSlaves { get; set; }
}
public class SubSlaveEntity
{
public Int32 Id { get; set; }
public String PropC { get; set; }
}
I assign the dataSource of the grid to an IList<MasterEntity>: as you can see all the lists involved are generic ILists (not BindingLists) and each class doesn't implement the INotifyPropertyChanged interface.
Following the instructions in this page (http://docs.telerik.com/devtools/winforms/gridview/hierarchical-grid/binding-to-hierarchical-data-automatically), I'm able to display the rows in a proper hierarchical grid (through AutoGenerateHierarchy property). I'm also able to properly configure the layout of each column at each hierarchy level.
Now, what I want to achieve is the following:
When I add/delete/edit a row (at each hierarchy level, Master, Slave or SubSlave) I need the changes to be reflected in the grid, without it scrolling to the top or losing the column layout settings. Of course, since we're using normal Lists (not BindingLists) and the entities doesn't implement INotifyPropertyChanged, I know that the grid must be notified of each operation performed on its datasource. At the moment I've only managed to achieve this when I change a property of an entity at the first hierarchy level (Master):
1.(radGrid.Datasource as IList<MasterEntity>)[0].Name = "NEW NAME";2.radGrid.TableElement.Update(GridUINotifyAction.DataChanged);
but I also need this to work when I do the following:
1.(radGrid.Datasource as IList<MasterEntity>).Add(new MasterEntity(){ .. });2.-> how to notify the grid about the new master entity?1. (radGrid.Datasource as IList<MasterEntity>)[0].Slaves[0].PropA = "NEW PROP A VALUE";2.-> how to notify the grid about the change in a property value in that slave entity?1.(radGrid.Datasource as IList<MasterEntity>)[0].Slaves.Add(new SlaveEntity(){ .. });2.-> how to notify the grid about the new slave entity in the first master entity?
..and so on, I need to be able to perform ADD / DELETE / CHANGE ENTITY PROPERTIES at each hierarchy level and properly notify the grid about each operation, while keeping the current column layout (at each hierarchy level) and without the grid scrolling to the top.
Thanks for the kind help.
Hi
I used a rad shaped form in my app, and then removed the title bar. but still I'm able to move form (which is totally great; since I don't have to reproduce form movement by mouse events). then I add a label to top of the form to show the 'subject'. when user click and hold to mouse button to move the form, if the label is clicked, form won't move, but if other parts of form get clicked, form will move. my question is How I can set the label button mousedown event (or any other event) to be able to move the form?
Thanks

Hi,
I need to make OCR recognition from a picture taken from a video camera (license plate) is there a tool in telerik winforms that can do OCR?
Thanks!

Hi I'm Saeid. Programer in Iran.
Q:
How to Right To Left All Items in radMessageBox?
radMessagebox.Show("Text","Caption Message", MessageBoxIcon.Ok, radMessageIcon.Info, ::::::RightToLeft:::::);
| Partial Class CustomerForm |
| Inherits Telerik.WinControls.Docking.UserDockForm |
| .... |
| Partial Class ProductsPanel |
| Inherits Telerik.WinControls.Docking.UserDockControl |
| ..... |
| Dim docWindow As DockWindow = New DockWindow() |
| gives the warning: |
| The designer must create an instance of type 'Telerik.WinControls.UI.Docking.DockWindow' but it cannot because the type is declared as abstract. |

I have a grid with a checkbox column. If a user marks the checkbox and then clicks on the "Save" button, I'm pulling the value of the checkbox, but it returns FALSE. It seems like the row is not being committed even when I have left the grid. What is trick for this?
(see screenshot)
Hi All,
Good day!
I have a RadForm which shows 6 or more RadChart in it.
Now, I want to export these chart in to powerpoint.
Can you help me out on how to achieve this? Is this possible?
Thanks.
Regards,
Meo