Hi,
1. I'm not sure what help topic your referring to. Are you using the AddNewRow feature?
2. To update your data in the backend, when you update it, you can either use the ExitEditMode event, or you can implement IEditableObject on your data, in which case, you'll know when your data object has been updated.
3. For this, you can use a TemplateColumn, and use an IValueConverter.
<UserControl.Resources> <local: DayUsageConverter x:key="MyDayUsageConverter"/></UserControl.Resources>
<DataTemplate><TextBlock Text = {Binding, Converter={StaticResource MyDayUsageConverter}/></DataTemplate
public class DayUsageConverter: IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
YourDataObject data = (YourDataObject)value;
double val = data.Monday + data.Tuesday ... etc
return val;
}
-SteveZ
For the 1#. I want to say
1. If I have 4 rows in the grid. Now when i click on a row a then a new empty row will get added to the grid.
2. Or , If possible , actually i need total of 10 rows (these are fixed, not more than that) in my grid. if i have only 5 rows in database, related to an id then , it will have to display 5 rows with data and 5 (editable) blank rows
For the 2#. I am using Webservice for getting data. The data is then coverted to List and binded with the xamGrid.. If you have any sample code related to this it would be a great help.
For 3#. Could you plz elaborate Your example a bit more.
1. If you need to display extra rows, you can add empty items into your collection that is bound to the xamWebGrid.
2. I'm sorry, but I don't have sample code for this.
3. The sample is just showing what you need, The DataTemplate part would go into the ItemTemplate property of the TemplateColumn, and you'd need to create the converter class. You'd then create an instance, of that class in xaml, as demonstrated in the code snippet, where "local" is a defined xmlns at the top of your form that is mapped to the namespace that the converter exists in.