search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

DayPilotScheduler.Resources.IndexOf and DayPilotScheduler.Resources.Contains not working

Asked by Kuido Külm
15 years ago.

so Lite version

I am adding dynamically rescources, and Resources.Contains and Resources.IndexOf cannot find existing

dsRooms.HOUSE_OCCUPATIONS_KUIDO_SDataTable table = new dsRooms.HOUSE_OCCUPATIONS_KUIDO_SDataTable();
dsRoomsTableAdapters.HOUSE_OCCUPATIONS_KUIDO_STableAdapter ta = new dsRoomsTableAdapters.HOUSE_OCCUPATIONS_KUIDO_STableAdapter();
ta.Connection.ConnectionString = Configuration.ConnectionString;
ta.Fill(table, Convert.ToInt16(this.DropDownListMajad.SelectedValue), Convert.ToDateTime(this.TimePeriodEntry1.alguasaeg), Convert.ToDateTime(this.TimePeriodEntry1.loppaeg));

this.DayPilotScheduler1.Resources.Clear();
for (int i = 0; i < table.Rows.Count; i++)
{
DayPilot.Web.Ui.Resource korter = new DayPilot.Web.Ui.Resource(table[i]["FLAT_NUMBER"].ToString(), table[i]["FLAT_ID"].ToString());

int je = this.DayPilotScheduler1.Resources.IndexOf(korter); //always -1
bool ke = this.DayPilotScheduler1.Resources.Contains(korter); //always false
//even if same data exists contains cannot understand it
if (!this.DayPilotScheduler1.Resources.Contains(korter))
{
this.DayPilotScheduler1.Resources.Add(korter);
}
}

Comment posted by Dan Letecky
15 years ago.

Thanks for reporting the issue, I will take a look at it.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.