Hi, I'm not sure if I am on track here, I hope there is an easier solution to this.
But I am trying to create an grid with footer witch has three editable rows (see attachment). My code is the following ->
My question is: Is there a better way to achieve this ? Should I perhaps use other things than TextBox ?
Can someone give me some tips.
Thank you.
Kristján
But I am trying to create an grid with footer witch has three editable rows (see attachment). My code is the following ->
private
GridViewDataColumn bindColumn(
string
bindText,
string
headerAndTag,
string
cellText1,
string
cellText2,
string
cellText3)
{
GridViewFooterCell cell =
new
GridViewFooterCell();
StackPanel sp =
new
StackPanel();
TextBox cell1 =
new
TextBox() { Text = cellText1 };
TextBox cell2 =
new
TextBox() { Text = cellText2 };
TextBox cell3 =
new
TextBox() { Text = cellText3 };
sp.Children.Add(cell1);
sp.Children.Add(cell2);
sp.Children.Add(cell3);
GridViewDataColumn col =
new
GridViewDataColumn();
col.HeaderTextAlignment = TextAlignment.Right;
col.DataFormatString =
"{0:N0}"
;
col.TextAlignment = TextAlignment.Right;
col.Header = headerAndTag;
col.Tag = headerAndTag;
col.DataMemberBinding =
new
Binding(bindText) { Mode = BindingMode.TwoWay };
col.Footer = sp;
return
col;
}
My question is: Is there a better way to achieve this ? Should I perhaps use other things than TextBox ?
Can someone give me some tips.
Thank you.
Kristján