protected override void CreateChildElements() { base.CreateChildElements(); checkbox = new RadCheckBoxElement(); checkbox.ToggleStateChanged += new StateChangedEventHandler(checkbox_ToggleStateChanged); this.Children.Add(checkbox); }
void checkBox_CheckStateChanged(object sender, EventArgs e) { RadCheckBoxElement checkBox = sender as RadCheckBoxElement; GridRowElement row = checkBox.FindAncestor <GridRowElement>(); row.RowInfo.Tag = checkBox.IsChecked.ToString(); }
protected override void CreateChildElements() { base.CreateChildElements(); this.checkBox = new RadCheckBoxElement(); this.Children.Add(this.checkBox); }
protected override void CreateChildElements() { base.CreateChildElements(); _checkbox = new RadCheckBoxElement(); _checkbox.ToggleStateChanged += checkbox_ToggleStateChanged; Children.Add(_checkbox); }
private void radMenuItem3_Click_1(object sender, EventArgs e) { RadCheckBoxElement checkbox = new RadCheckBoxElement(); checkbox.Text = "checkbox"; surface1.Element.Children.Add(new SurfaceObject(10, 10, checkbox)); radButtonRemove.Enabled = true; surface1.Element.CurrentObject = (SurfaceObject)surface1.Element.Children[surface1.Element.Children.Count - 1]; }
protected override void CreateChildElements() { base.CreateChildElements(); ctlChk = new RadCheckBoxElement(); ctlChk.ToggleStateChanged += new StateChangedEventHandler(ctlChk_ToggleStateChanged); this.Children.Add(ctlChk); ctlComboBoxElement = new RadComboBoxElement(); ctlComboBoxElement.DropDownStyle = RadDropDownStyle.DropDownList; ctlComboBoxElement.ValueChanged += new EventHandler(ctlComboBoxElement_ValueChanged); this.Children.Add(ctlComboBoxElement); ctlCheckComboBoxElement = new CSCheckComboBoxElement(); ctlCheckComboBoxElement.PopupClosed += new RadPopupClosedEventHandler(ctlCheckComboBoxElement_PopupClosed); this.Children.Add(ctlCheckComboBoxElement); ctlComboBoxExxElement = new CSComboBoxExxElement(); ctlComboBoxExxElement.ValueChanged += new EventHandler(ctlComboBoxExxElement_ValueChanged); this.Children.Add(ctlComboBoxExxElement); ctlTextBox = new RadTextBoxElement(); ctlTextBox.TextChanged += new EventHandler(ctlTextBox_TextChanged); this.Children.Add(ctlTextBox); ctlDataTimePickerElement = new RadDateTimePickerElement(); ctlDataTimePickerElement.ValueChanged += new EventHandler(ctlDataTimePickerElement_ValueChanged); this.Children.Add(ctlDataTimePickerElement); ctlColorSelectorElement = new CSColorSelectorElement(); ctlColorSelectorElement.TextChanged += new EventHandler(ctlColorSelectorElement_TextChanged); this.Children.Add(ctlColorSelectorElement); ctlSpin = new RadSpinElement(); ctlSpin.MinValue = 0; ctlSpin.MaxValue = 100000; ctlSpin.TextChanged += new EventHandler(ctlSpin_TextChanged); this.Children.Add(ctlSpin); ctlNumericTextBox = new CSNumericTextBoxElement(); ctlNumericTextBox.TextChanged += new EventHandler(ctlNumericTextBox_TextChanged); this.Children.Add(ctlNumericTextBox); ctlIntTextBox = new CSIntegerTextBoxElement(); ctlIntTextBox.TextChanged += new EventHandler(ctlIntTextBox_TextChanged); this.Children.Add(ctlIntTextBox); foreach (RadElement element in this.Children) { element.Visibility = ElementVisibility.Collapsed; } }
protected override void CreateChildElements() { base.CreateChildElements(); this.checkBox = new RadCheckBoxElement(); checkBox.StretchHorizontally = false; this.checkBox.Alignment = System.Drawing.ContentAlignment.MiddleLeft; this.checkBox.ToggleStateChanged += new StateChangedEventHandler(checkBox_ToggleStateChanged); this.Padding = new System.Windows.Forms.Padding(16, 0, 0, 0); this.checkBox.Margin = new System.Windows.Forms.Padding(-16, 0, 0, 0); this.checkBox.IsThreeState = true; this.Children.Add(checkBox); }
public RadForm1() { InitializeComponent(); this.radListView1.VisualItemFormatting += radListView1_VisualItemFormatting; this.radListView1.ViewType = Telerik.WinControls.UI.ListViewType.DetailsView; for (int i = 0; i < 3; i++) { this.radListView1.Columns.Add("Column " + i); } for (int i = 0; i < 40; i++) { CustomListViewGroupItem group = new CustomListViewGroupItem(); group.Text = "Group " + i; this.radListView1.Groups.Add(group); for (int j = 0; j < 3; j++) { ListViewDataItem item = new ListViewDataItem(); this.radListView1.Items.Add(item); item[0] = i; item[1] = j; item[2] = "Item " + (10 * i + j); item.Group = group; } } this.radListView1.EnableCustomGrouping = true; this.radListView1.ShowGroups = true; this.radListView1.ShowCheckBoxes = true; this.checkBox = new RadCheckBoxElement(); this.checkBox.Margin = new Padding(0, 10, 0, 0); this.checkBox.ToggleStateChanged += new StateChangedEventHandler(checkBox_ToggleStateChanged); this.checkBox.ZIndex = 1000; this.checkBox.Alignment = ContentAlignment.TopLeft; this.checkBox.StretchHorizontally = this.checkBox.StretchVertically = false; this.checkBox.IsThreeState = true; this.radListView1.ListViewElement.Children.Add(this.checkBox); this.radListView1.ItemCheckedChanged += new ListViewItemEventHandler(radListView1_ItemCheckedChanged); this.radListView1.VisualItemCreating += new ListViewVisualItemCreatingEventHandler(radListView1_VisualItemCreating); this.radListView1.MouseUp += radListView1_MouseUp; }
public static void Click(object sender, EventArgs e) { RadCheckBoxElement checkbox = sender as RadCheckBoxElement; string srt = realstate.GlobalVariable.temporaryOwnList; string idtodo = checkbox.Name.ToString() + ","; if (checkbox.Checked == true) { srt = srt.Replace(idtodo, ""); realstate.GlobalVariable.temporaryOwnList = srt; } else { srt = srt + idtodo; realstate.GlobalVariable.temporaryOwnList = srt; } }
protected override void CreateChildElements() { base.CreateChildElements(); StackLayoutElement stack = new StackLayoutElement(); stack.Orientation = Orientation.Horizontal; this.Children.Add(stack); checkbox = new RadCheckBoxElement(); checkbox.ToggleStateChanged += new StateChangedEventHandler(checkbox_ToggleStateChanged); stack.Children.Add(checkbox); content = new LightVisualElement(); content.StretchHorizontally = false; content.StretchVertically = true; content.TextAlignment = ContentAlignment.MiddleLeft; content.NotifyParentOnMouseInput = true; stack.Children.Add(content); }
void EditorControl_ViewCellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e) { if (e.ColumnIndex != -1 || e.CellElement.RowIndex == -1) { return; } if (e.CellElement.Children.Count == 1) { RadCheckBoxElement checkBoxElement = new RadCheckBoxElement(); checkBoxElement.Padding = new System.Windows.Forms.Padding(0, 3, 1, 0); checkBoxElement.Alignment = ContentAlignment.MiddleCenter; checkBoxElement.NotifyParentOnMouseInput = false; e.CellElement.Children.Add(checkBoxElement); } RadCheckBoxElement checkBox = e.CellElement.FindDescendant <RadCheckBoxElement>(); checkBox.CheckStateChanged -= checkBox_CheckStateChanged; checkBox.IsChecked = e.Row.Tag != null && e.Row.Tag.ToString() == Boolean.TrueString; checkBox.CheckStateChanged += checkBox_CheckStateChanged; }
public mehrdadPanel(float width) { // label = GlobalVariable.GloaballistViewManager.gettitleLable(); checkbox = new checkBoxModel(width); label = new LableModel(width, 1); label2 = new LableModel(width, 2); label3 = new LableModel(width, 3); label4 = new LableModel(width, 4); label5 = new LableModel(width, 5); label6 = new LableModel(width, 6); label7 = new LableModel(width, 7); label8 = new LableModel(width, 8); label9 = new LableModel(width, 9); label10 = new LableModel(width, 10); panel = new PanelModel(); //label2 = GlobalVariable.GloaballistViewManager.getarealable(); //label3 = GlobalVariable.GloaballistViewManager.getkindlable(); //label4 = GlobalVariable.GloaballistViewManager.gettotallable(); //label5 = GlobalVariable.GloaballistViewManager.getvadielable(); //label6 = GlobalVariable.GloaballistViewManager.getejarelable(); //Picpanel = GlobalVariable.GloaballistViewManager.getPicPanel(); //imp = GlobalVariable.GloaballistViewManager.getimp(); // Picpanelon = new RadPanelElement(); // Picpanelon.Size = new System.Drawing.Size(25, 25); // Picpanelon.PanelBorder.Visibility = ElementVisibility.Collapsed; // Picpanelon.Margin = new Padding(65, 35, (int)picpos2, 35); // Picpanelon.Shape = new RoundRectShape(4); //// Picpanelon.Click += new System.EventHandler(this.Picpanel_click); // impon = new MyElement(); // string pathon = Path.Combine(Application.StartupPath, "Resources", "up.png"); // impon.Image = Image.FromFile(pathon); // impon.ImageLayout = ImageLayout.Zoom; // impon.Shape = Picpanel.Shape; // impon.Click += new System.EventHandler(this.impon_click); // Picpanelon.Children.Add(impon); // Picpaneloff = new RadPanelElement(); // Picpaneloff.Size = new System.Drawing.Size(25, 25); // Picpaneloff.PanelBorder.Visibility = ElementVisibility.Collapsed; // Picpaneloff.Margin = new Padding(65, 35, (int)picpos2, 35); // Picpaneloff.Shape = new RoundRectShape(4); //// Picpaneloff.Click += new System.EventHandler(this.Picpanel_click); // impoff = new MyElement(); // string pathoff = Path.Combine(Application.StartupPath, "Resources", "down.png"); // impoff.Image = Image.FromFile(pathoff); // impoff.ImageLayout = ImageLayout.Zoom; // impoff.Shape = Picpanel.Shape; // impoff.Click += new System.EventHandler(this.impoff_click); // Picpaneloff.Children.Add(impoff); //imp.Click += new System.EventHandler(this.Picpanel_click); //if (!Picpanel.Children.Contains(imp)) //{ // Picpanel.Children.Add(imp); //} if (!panel.Children.Contains(checkbox)) { panel.Children.Add(checkbox); } if (!panel.Children.Contains(label)) { panel.Children.Add(label); } if (!panel.Children.Contains(label2)) { panel.Children.Add(label2); } if (!panel.Children.Contains(label3)) { panel.Children.Add(label3); } if (!panel.Children.Contains(label4)) { panel.Children.Add(label4); } if (!panel.Children.Contains(label5)) { panel.Children.Add(label5); } if (!panel.Children.Contains(label6)) { panel.Children.Add(label6); } if (!panel.Children.Contains(label7)) { panel.Children.Add(label7); } if (!panel.Children.Contains(label8)) { panel.Children.Add(label8); } if (!panel.Children.Contains(label9)) { panel.Children.Add(label9); } if (!panel.Children.Contains(label10)) { panel.Children.Add(label10); } //if (!panel.Children.Contains(Picpanel)) //{ // panel.Children.Add(Picpanel); //} // panel.Children.Add(Picpanelon); // panel.Children.Add(Picpaneloff); }
private void filter_grid(object sender, StateChangedEventArgs args) { RadCheckBoxElement checkBox = sender as RadCheckBoxElement; if (args.ToggleState == Telerik.WinControls.Enumerations.ToggleState.On) { FilterDescriptor filter = new FilterDescriptor(); switch (checkBox.Text) { case "Open": filter.Operator = FilterOperator.IsEqualTo; filter.PropertyName = "Status"; filter.Value = Status.NotDone; break; case "Ready For Test": filter.Operator = FilterOperator.IsEqualTo; filter.PropertyName = "Status"; filter.Value = Status.ReadyForTest; break; case "Done": filter.Operator = FilterOperator.IsEqualTo; filter.PropertyName = "Status"; filter.Value = Status.Done; break; case "Unassigned": filter.Operator = FilterOperator.IsEqualTo; filter.PropertyName = "UserId"; filter.Value = 1; break; case "New": filter.Operator = FilterOperator.IsGreaterThan; filter.PropertyName = "Date"; filter.Value = DateTime.Now.AddDays(-7); break; default: break; } this.bugsGrid.FilterDescriptors.Add(filter); this.featuresGrid.FilterDescriptors.Add(filter); } else { for (int i = 0; i < bugsGrid.FilterDescriptors.Count; i++) { if (checkBox.Text == "Open" && ConvertToStatus(bugsGrid.FilterDescriptors[i].Value) == Status.NotDone) { bugsGrid.FilterDescriptors.RemoveAt(i); featuresGrid.FilterDescriptors.RemoveAt(i); return; } if (checkBox.Text == "Ready For Test" && ConvertToStatus(bugsGrid.FilterDescriptors[i].Value) == Status.ReadyForTest) { bugsGrid.FilterDescriptors.RemoveAt(i); featuresGrid.FilterDescriptors.RemoveAt(i); return; } if (checkBox.Text == "Done" && ConvertToStatus(bugsGrid.FilterDescriptors[i].Value) == Status.Done) { bugsGrid.FilterDescriptors.RemoveAt(i); featuresGrid.FilterDescriptors.RemoveAt(i); return; } if (checkBox.Text == "Unassigned" && (bugsGrid.FilterDescriptors[i].Value as int?) == 1) { bugsGrid.FilterDescriptors.RemoveAt(i); featuresGrid.FilterDescriptors.RemoveAt(i); return; } if (checkBox.Text == "New" && bugsGrid.FilterDescriptors[i].PropertyName == "Date") { bugsGrid.FilterDescriptors.RemoveAt(i); featuresGrid.FilterDescriptors.RemoveAt(i); return; } } } }