New Row with "Interface-Bound" GridView

2 posts, 1 answers
  1. Nils
    Nils avatar
    46 posts
    Member since:
    Jul 2009

    Posted 11 Aug 2009 Link to this post

    I am looking for "the right way" to add new Rows to a GridView...
    1. Is there any pre-defined method to add new rows ? (Like the WinForms MS-Grid used to have...)
    Something like:

    2. I am displaying some navigateable Properties which are based on Types of which I know the Interface only..
    Something Like:
    public class DisplayData  
       public string Name { getset; }  
       public ISomeInterfaceType Prop { getset; }  
    public interface ISomeInterfaceType  
       string OtherName { get; }  
         DataMemberBinding="{Binding Path=Name, Mode=OneWay}"    
         DataMemberBinding="{Binding Path=Prop.OtherName, Mode=OneWay}"  
         DataType="{x:Type sys:String}"  
    However, I want to be able to let the user add new rows - in which case I need two entered strings (which I check for validity) and afterwards return the new "DisplayData"-Object. Currently I am doing this using a new Window (ShowDialog()) which let's the User input his data...

    Can I use the "new-row" feature of the GridView, if some columns are bound to read-only properties or even classes of which I know only the Interface ?


  2. Answer
    Nedyalko Nikolov
    Nedyalko Nikolov avatar
    871 posts

    Posted 14 Aug 2009 Link to this post

    Hello Nils,

    Straight onto your questions:

    Question #1: As I understand you need an event called something like "BeginningInsert" where you can show custom edit form. Current version of the RadGridView does not have such predefined method or event you can use for this purpose. We will consider adding such event for the next versions of the RadGridView control.

    Question #2: Unfortunately with any kind of nested properties (interface or class) there are some restrictions when you try to add values, no problem with editing but you have to add values for such properties from code behind.

    All the best,
    Nedyalko Nikolov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top