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);
}
}