public
class
MyCar
{
private
string
_carOwner;
private
string
_carModel;
private
int
_carYear;
private
string
_carColor;
private
double
_carPrice;
private
double
_carDepreciation;
public
MyCar(
string
carOwner,
string
carModel,
int
carYear,
string
carColor,
double
carPrice,
double
carDepreciation)
{
CarOwner = carOwner;
CarModel = carModel;
CarYear = carYear;
CarColor = carColor;
CarPrice = carPrice;
CarDepreciation = carDepreciation;
}
public
string
CarOwner
{
get
{
return
_carOwner; }
set
{ _carOwner = value; }
}
public
string
CarModel
{
get
{
return
_carModel; }
set
{ _carModel = value; }
}
public
int
CarYear
{
get
{
return
_carYear; }
set
{ _carYear = value; }
}
public
string
CarColor
{
get
{
return
_carColor; }
set
{ _carColor = value; }
}
public
double
CarPrice
{
get
{
return
_carPrice; }
set
{ _carPrice = value; }
}
public
double
CarDepreciation
{
get
{
return
_carDepreciation; }
set
{ _carDepreciation = value; }
}
}
GridViewTemplate
childTemplate = CreateChildTemplate();
GridViewRelation relation = new GridViewRelation(this.gwSchemi.MasterTemplate, childTemplate);relation.ChildColumnNames.Add("XMLFLUSSI");
this.gwSchemi.Relations.Add(relation);
this.gwSchemi.DataSource = ManagerSchema.GetSchemi();
this.gwSchemi.Refresh();
private GridViewTemplate CreateChildTemplate(){
GridViewTemplate template = new GridViewTemplate();
template.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
template.AllowDeleteRow = false;
template.AllowEditRow = false;
template.AllowAddNewRow = false;
template.ReadOnly = true;
GridViewTextBoxColumn idColumn = new GridViewTextBoxColumn("id");
ridViewTextBoxColumn nomerColumn = new GridViewTextBoxColumn("nome");
GridViewCheckBoxColumn statoColumn = new GridViewCheckBoxColumn("stato");
GridViewTextBoxColumn tipoColumn = new GridViewTextBoxColumn("tipo");
template.Columns.AddRange(idColumn,nomerColumn,statoColumn,tipoColumn);
template.Columns["id"].IsVisible = false;
return template;
}
this is the definition of the two poco class
public class XMLSCHEMI{
public Guid id { get; set; }
public string nome { get; set; }
public string XMLSCHEMA { get; set; }
public List<XMLFLUSSI> XMLFLUSSI { get; set; }
}
public class XMLFLUSSI{
public Guid id { get; set; }
public Guid id_xmlschemi { get; set; }
public string nome { get; set; }
public string f_origine { get; set; }
public string tab_destin { get; set; }
public Boolean stato { get; set; }
public string namepart { get; set; }
public Int32 length { get; set; }
public string extension { get; set; }
public string f_storico { get; set; }
public string f_errore { get; set; }
public string tipo { get; set; }
public XMLSCHEMI XMLSCHEMI { get; set; }
}
Private Sub BuildGrid()
Timer1.Stop()
Dim completedJobSource As New BindingSource
While not done
completedJobSource.Add(New CompletedJobs(strGUID, strJobName, strJobDescription, priority))
end while
RadGridView_Completed.DataSource = completedJobSource
Timer.Start
Could it be that the data source is always being created here? It is possible that some of the data rows might not be there the next time which isn't a big deal but I just don't like that the scrolling keeps going to the top. It would also be great to keep the current row selected whatever it was whether the data in it changed or not.
Thanks,
Tim