private void DataRepeater1_DrawItem(object sender, DataRepeaterItemEventArgs e) { foreach (Control c in e.DataRepeaterItem.Controls) { if (!arrlbls.Contains(c.Name) && c.GetType() == typeof(Label)) { try { c.Text = string.Format("{0:#,0.00; (0:#,0.00);0.00}", Convert.ToDouble(c.Text)); } catch { c.Text = "0.00"; } continue; } if (c.GetType() == typeof(CheckBox)) { if (((CheckBox)c).Checked) { e.DataRepeaterItem.Controls["txtPackage"].Enabled = false; } continue; } } }
private void dataRepeater1_ItemSelected(object sender, DataRepeaterItemEventArgs e) { this.button1.Enabled = e.DataRepeaterItem.ItemIndex > 0; this.button2.Enabled = e.DataRepeaterItem.ItemIndex < this.dataRepeater1.ItemCount - 1; }