Closed asyad85 closed 2 years ago
@asyad85
Emang isi DataTablenya apa om?
Saya coba buat pilihan dengan isi DataTable seperti contoh diatas Mas, saya sudah menggunakan looping tp syntax error
var section = new Section { title = clist1.GetRecords.Rows[0]["subtitle"].ToString().Trim(), items = new ListItem[] { for (int i = 0; i <= clist1.GetRecords.Rows.Count - 1; i++) { new ListItem { title = clist1.GetRecords.Rows[i]["title"].ToString(), description = clist1.GetRecords.Rows[i]["description"].ToString() }, } } };
mohon solusinya Mas, tks
@asyad85
Coba pake array dulu om
iya mas terima kasih sarannya, saya coba dulu ya
salam mas Rudi, saya mau tanya. Gimana cara konversi DataTable ke ListItem atau ButtonItem ya? tks mas
var section = new Section { title = clist1.GetRecords.Rows[0]["subtitle"].ToString().Trim(), items = new ListItem[] { new ListItem { title = "Berzakat", description = "Zakal maal, zakat fitrah, dll" }, new ListItem { title = "Berinfak", description = "Infak pendidikan, infak kesehatan, dll" }, new ListItem { title = "Bantuan", description = "Klo masih bingung" } } };