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
Hi,
I'm facing a problem with creating customized theme.
I don't have time to start from scratch so I based on Windows 7 Theme.
I'd like to make all rows same color by default - now it's look more or less like 'zebra', first is white second gray and so on ....
Could you please describe me how to change it using Visual Style Builder?
Regards.
1. i have tree with about 4 levels
the first level i get from server code and the other
by webservice.
in the begining i just recieve
the first level
i know from advanced what is their checked property
some are:
how can i set these values by code ,when the component can't make it itself
, because it doesn't have childs yet (until i click on some of the first level and recive by webservice their childs. the second level)
2. one more problem is that tri state doesn't work properly. example: one of the three childs isn't checked, the father of it, the second level is Indeterminate but the first level is Checked instead of Indeterminate