Hi.
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:
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 ?
Yours,
Nils
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:
AddNewRowIfUserDoubleClicksTheLeftPane="true" |
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 { get; set; } |
public ISomeInterfaceType Prop { get; set; } |
} |
public interface ISomeInterfaceType |
{ |
string OtherName { get; } |
} |
<telerik:GridViewDataColumn |
Header="Name" |
DataMemberBinding="{Binding Path=Name, Mode=OneWay}" |
Width="2*" |
IsReadOnly="True"/> |
<telerik:GridViewDataColumn |
Header="Other" |
DataMemberBinding="{Binding Path=Prop.OtherName, Mode=OneWay}" |
DataType="{x:Type sys:String}" |
Width="3*" |
IsReadOnly="True"/> |
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 ?
Yours,
Nils