public void SetupRadNav(RadBindingNavigator RadNavBar) { RadNav = RadNavBar; string ItemName = "Item"; RadNext.NextButton = radBindingNavigator1MoveNextItem; RadNext.NextButton.ToolTipText = "Next " + ItemName; RadNext.NextButton.Click += new System.EventHandler(RadBindingNext_Click); RadNext.PreviousButton = radBindingNavigator1MovePreviousItem; RadNext.PreviousButton.ToolTipText = "Previous " + ItemName; RadNext.PreviousButton.Click += new System.EventHandler(RadBindingPrevious_Click); RadNext.FirstButton = radBindingNavigator1MoveFirstItem; RadNext.FirstButton.ToolTipText = "First " + ItemName; RadNext.FirstButton.Click += new System.EventHandler(RadBindingFirst_Click); RadNext.LastButton = radBindingNavigator1MoveLastItem;; //radBindingNavigator1MoveLastItem; RadNext.LastButton.ToolTipText = "Last " + ItemName; RadNext.LastButton.Click += new System.EventHandler(RadBindingLast_Click); }
public addTeachers(RadGridView gridView, RadBindingNavigator bindingNavigator) { this.GridView = gridView; this.BindingNavigator = bindingNavigator; InitializeComponent(); }
//_Dict dict = new _Dict(); #endregion #region === Form Update === public void Update(Control Control, object update = null) { if (Control.GetType().ToString() == "Telerik.WinControls.UI.RadRichTextEditor") { RadRichTextEditor txt = (RadRichTextEditor)Control; // editor to update passed by user string Text = ""; if (update != null) { Text = update.ToString(); } // optional field used to pass text to populate if (txt.InvokeRequired) // if currently on a different thread, invoke { txt.BeginInvoke((MethodInvoker) delegate() { txt.Text = Text; }); } else { txt.Text = Text; // Update Control Text } return; } if (Control.GetType().ToString() == "Telerik.WinControls.UI.RadLabel") { RadLabel txt = (RadLabel)Control; // editor to update passed by user string Text = ""; if (update != null) { Text = update.ToString(); } // optional field used to pass text to populate if (txt.InvokeRequired) // if currently on a different thread, invoke { txt.BeginInvoke((MethodInvoker) delegate() { txt.Text = Text; }); } else { txt.Text = Text; // Update Control Text } return; } if (Control.GetType().ToString() == "Telerik.WinControls.UI.RadButton") { RadButton txt = (RadButton)Control; // editor to update passed by user string Text = ""; if (update != null) { Text = update.ToString(); } // optional field used to pass text to populate if (txt.InvokeRequired) // if currently on a different thread, invoke { txt.BeginInvoke((MethodInvoker) delegate() { txt.Text = Text; }); } else { txt.Text = Text; // Update Control Text } return; } if (Control.GetType().ToString() == "Telerik.WinControls.UI.RadTextBox") { RadTextBox txt = (RadTextBox)Control; // editor to update passed by user string Text = ""; if (update != null) { Text = update.ToString(); } // optional field used to pass text to populate if (txt.InvokeRequired) // if currently on a different thread, invoke { txt.BeginInvoke((MethodInvoker) delegate() { txt.Text = Text; }); } else { txt.Text = Text; // Update Control Text } return; } if (Control.GetType().ToString() == "Telerik.WinControls.UI.RadCheckBox") { RadCheckBox txt = (RadCheckBox)Control; // editor to update passed by user bool CheckVal = (bool)update; if (txt.InvokeRequired) // if currently on a different thread, invoke { txt.BeginInvoke((MethodInvoker) delegate() { txt.Checked = CheckVal; }); } else { txt.Checked = CheckVal; // Update Control Text } return; } if (Control.GetType().ToString() == "IntegrationDataUpdate.IntegrationApp") { Form txt = (Form)Control; // editor to update passed by user string Text = ""; if (update != null) { Text = update.ToString(); } // optional field used to pass text to populate if (txt.InvokeRequired) // if currently on a different thread, invoke { txt.BeginInvoke((MethodInvoker) delegate() { txt.Text = Text; }); } else { txt.Text = Text; // Update Control Text } return; } if (Control.GetType().ToString() == "Telerik.WinControls.UI.RadBindingNavigator") { RadBindingNavigator txt = (RadBindingNavigator)Control; // editor to update passed by user string Text = ""; if (update != null) { Text = update.ToString(); } // optional field used to pass text to populate if (txt.InvokeRequired) // if currently on a different thread, invoke { txt.BeginInvoke((MethodInvoker) delegate() { txt.Text = Text; }); } else { txt.Text = Text; // Update Control Text } return; } //if (Control.GetType().ToString() == "Telerik.WinControls.UI.RadLabelElement") //{ // RadLabelElement txt = (RadLabelElement)Control; // editor to update passed by user // string Text = ""; if (update != null) { Text = update.ToString(); } // optional field used to pass text to populate // if (txt.InvokeRequired) // if currently on a different thread, invoke // { // txt.BeginInvoke((MethodInvoker)delegate () { txt.Text = Text; }); // } // else // { // txt.Text = Text; // Update Control Text // } // return; //} ahk.MsgBox("Control Type: " + Control.GetType().ToString() + " Not Defined To Update YET"); }