akhirudin
You will need to create NameValueListBase Object and create a criteria
[Serializable()]
public class FilteredCriteria { private int _jobType; public int JobType
{
get { return _jobType; } } public FilteredCriteria(int jobtype)
{ _jobtype = jobtype; } }
on your dataPortal_Fetch
private void DataPortal_Fetch(FilteredCriteria criteria)
{ RaiseListChangedEvents = false; IsReadOnly = false; using (SqlConnection cn = new SqlConnection(Database)) { Call SP to Return data matching criteria.JobType
}
using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
{ while (dr.Read()) {
Add(new NameValueListBase<string,string>.NameValuePair(dr.Getstring("JobType"),dr.GetString("PersonName")))); } } } } IsReadOnly = true; RaiseListChangedEvents = true; } You can then bind directly to this list object passing in the filter criteria you require. This does mean the BO will go back to the database for every jobtype you ask it to filter on
PersonList PL = PersonList.GetPersonList(Jobtype1);
Last5LogRuns.InvalidateCache();
DDJobtype1.DataSource = PL; DDJobtype1.DataTextField = "value"; DDJobtype1.DataValueField = "key"; DDJobtype1.DataBind(); hope i have understood you correctly and answered your question
regards
Paul
|
Copyright (c) Marimer LLC