Dear Sir,
I have generated new columns to the existing grid...but it non-editable.How to make it editable.Through page.cs file
i am generating new columns.But i have to generate columns through the static class.....how can i do this???
plz help me.
Thank You!!!!!
I copied the class declaration you have provided, and it works as expected.
You should have something like this:
myXamDataGrid.DataSource = new Class1().Phrases;
I did not see, however, a static class in the code you have pasted?
Am I missing something?
P.S. Next time if you have to paste a long code snippet (like this one), please attach a file with the code pasted inside, as it is much more convenient.
Thanks,Alex.
ok....
My page.cs have...
for (int i = 11; i < 53; i++)
{
XamDataGrid1.FieldLayouts[0].Fields.Add(
new UnboundField() { Name = "week" + i, Label = "week" + i ,DataType=typeof(int)});
My static simple class is....
using
System;
System.Collections.Generic;
System.Text;
System.ComponentModel;
System.Collections.ObjectModel;
System.Drawing;
System.Collections;
namespace
XmlDtaBinding
Class1
;
//private ListChangedEventArgs resetEvent = new ListChangedEventArgs(ListChangedType.Reset, -1);
> Phases
get
)
>();
, 0, 0, 12, 11, 0, 0, 0, 0, 0, 0, 0, 0, 12, 11, 0, 0, 0, 0, 0, 0, 0, 0, 12, 11, 0, 0, 0, 0, 0, 0, 0, 0, 12, 11, 0, 0, 0, 0, 0, 0, 0, 0, 12, 11, 0, 0, 0, 0, 0, 0,0,0));
, 6, 8, 0, 0, 0, 0, 0, 0, 0, 0, 6, 8, 0, 0, 0, 0, 0, 0, 0, 0, 6, 8, 0, 0, 0, 0, 0, 0, 0, 0, 6, 8, 0, 0, 0, 0, 0, 0, 0, 0, 6, 8, 0, 0, 0, 0, 0, 0, 0, 0,0,0));
, 0, 6, 8, 12, 0, 0, 0, 0, 0, 0, 0, 6, 8, 12, 0, 0, 0, 0, 0, 0, 0, 6, 8, 12, 0, 0, 0, 0, 0, 0, 0, 6, 8, 12, 0, 0, 0, 0, 0, 0, 0, 6, 8, 12, 0, 0, 0, 0, 0, 0,0,0));
, 0, 0, 0, 33, 12, 0, 0, 0, 0, 0, 0, 6, 8, 12, 0, 0, 0, 0, 0, 0, 0, 6, 8, 12, 0, 0, 0, 0, 0, 0, 0, 6, 8, 12, 0, 0, 0, 0, 0, 0, 0, 6, 8, 12, 0, 0, 0, 0, 0, 0,0,0));
, 12, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 8, 12, 0, 0, 0, 0, 0, 0, 0, 6, 8, 12, 0, 0, 0, 0, 0, 0, 0, 6, 8, 12, 0, 0, 0, 0, 0, 0, 0, 6, 8, 12, 0, 0, 0, 0, 0, 0,0,0));
, 11, 22, 23, 10, 0, 0, 0, 0, 0, 0, 0, 6, 8, 12, 0, 0, 0, 0, 0, 0, 0, 6, 8, 12, 0, 0, 0, 0, 0, 0, 0, 6, 8, 12, 0, 0, 0, 0, 0, 0, 0, 6, 8, 12, 0, 0, 0, 0, 0, 0,0,0));
}
_phases;
<summary>
The sample Car class contains information about a specific car
</summary>
INotifyPropertyChanged
_Phasename;
_Week1;
_Week2;
_Week3;
_Week4;
_Week5;
_Week6;
_Week7;
_Week8;
_Week9;
_Week10;
week52)
.Phasename = phase;
.Week1 = week1;
.Week2 = week2;
.Week3 = week3;
.Week4 = week4;
.Week5 = week5;
.Week1 = week6;
.Week2 = week7;
.Week3 = week8;
.Week4 = week9;
.Week5 = week10;
Phasename
_Phasename; }
set
_Phasename =
NotifyPropertyChanged(
);
Week1
_Week1; }
_Week1 =
Week2
_Week2; }
_Week2 =
Week3
_Week3; }
_Week3 =
Week4
_Week4; }
_Week4 =
Week5
_Week5; }
_Week5 =
Week6
_Week6; }
_Week6 =
Week7
_Week7; }
_Week7 =
Week8
_Week8; }
_Week8 =
Week9
_Week9; }
_Week9 =
Week10
_Week10; }
_Week10 =
#region
INotifyPropertyChanged Members
PropertyChanged;
info)
PropertyChanged(
(info));
#endregion
Hello,
Can you please give us more information about your classes - which is the static class, and about the way tou generate the columns.
Thanks,
Alex.