ChordModifier1.AltModifier =
True
ChordModifier1.ControlModifier =
False
ChordModifier1.ShiftModifier =
False
Chord1.ChordModifier = ChordModifier1
Chord1.Keys =
"Alt+Y"
InputBinding1.Chord = Chord1
ClickCommand1.Name = "ActionCommand"
ClickCommand1.OwnerType =
GetType(Telerik.WinControls.RadItem)
InputBinding1.Command = ClickCommand1
InputBinding1.CommandContext =
Me.rbeWindowsMaximize
However when I use
Chord1.Keys = "Alt+Enter"
it does not work. How can I get Alt-Enter to work?
thnx
Walther
| private void setup_ma() |
| { |
| // Intialize MA object |
| ma_list = new sch_objects.MA_List(profile_list.Locationid, profile_list.Installerid); |
| ma_add_menu = new Telerik.WinControls.UI.RadDropDownMenu(); |
| ma_all_menu = new Telerik.WinControls.UI.RadDropDownMenu(); |
| // Create RadioButton grouped list in groupbox to display primary button with radio, not selectable |
| int count = ma_list.MA_list_forinstallerID.Rows.Count; |
| Telerik.WinControls.UI.RadRadioButton[] radio_btn = new Telerik.WinControls.UI.RadRadioButton[count]; |
| DataRow row; |
| Telerik.WinControls.UI.RadMenuItem main_item; |
| // Array of MA's in Installer Profile |
| for (int i = 0; i < count; i++) |
| { |
| row = ma_list.MA_list_forinstallerID.Rows[i]; |
| radio_btn[i] = new Telerik.WinControls.UI.RadRadioButton(); |
| radio_btn[i].Text = row["ma"].ToString(); |
| radio_btn[i].Name = "rb" + radio_btn[i].Text; |
| radio_btn[i].Location = new Point(12, 21 * (i+1)); |
| if ((bool)row["primaryma"]) |
| { |
| radio_btn[i].ToggleState = Telerik.WinControls.Enumerations.ToggleState.On; |
| radio_btn[i].Text = radio_btn[i].Text + " [Primary]"; |
| } |
| // For Toggling Primary MA |
| radio_btn[i].Click += new EventHandler(MA_Clicked); |
| // For manually opening a right click context menu |
| radio_btn[i].MouseDown += new MouseEventHandler(ma_radio_mousedown); |
| } |
| // Add "Add" button to group |
| Telerik.WinControls.UI.RadMenuItem[] item = new Telerik.WinControls.UI.RadMenuItem[ma_list.MA_list_forlocid.Rows.Count]; |
| int item_counter = 0; |
| foreach (DataRow ma_row in ma_list.MA_list_forlocid.Rows) |
| { |
| // Create MA's for add group |
| item[item_counter] = new Telerik.WinControls.UI.RadMenuItem(); |
| item[item_counter].Text = ma_row["ma"].ToString(); |
| item[item_counter].Name = "RI" + ma_row["ma"].ToString(); |
| item[item_counter].Click += new EventHandler(add_ma_click); |
| foreach (Telerik.WinControls.UI.RadRadioButton radio in radio_btn) |
| { |
| if (radio.Name == ma_row["ma"].ToString()) |
| { |
| // Delete from group if they already exist in groupbox |
| item[item_counter].Enabled = false; |
| } |
| } |
| item_counter++; |
| } |
| // Menu MA "Add" Dropdown menu |
| main_item = new Telerik.WinControls.UI.RadMenuItem("Add"); |
| ma_add_menu.Items.Add(main_item); |
| ma_all_menu.Items.Add(main_item); |
| // Add MA Group to "Add" menuitem |
| main_item.Items.AddRange(item); |
| // Add "Remove MA" button to group, get MA by element location later |
| Telerik.WinControls.UI.RadMenuItem sec_item = new Telerik.WinControls.UI.RadMenuItem("Remove MA"); |
| sec_item.Click += new EventHandler(remove_ma_click); |
| ma_all_menu.Items.Add(sec_item); |
| ma_groupbox.MouseDown += new MouseEventHandler(ma_groupbox_MouseDown); |
| ma_groupbox.Controls.AddRange(radio_btn); |
| } |
| void ma_radio_mousedown(object sender, MouseEventArgs e) |
| { |
| if (e.Button == MouseButtons.Right) |
| { |
| ma_all_menu.Show(ma_groupbox, e.Location); |
| } |
| } |
| void ma_groupbox_MouseDown(object sender, MouseEventArgs e) |
| { |
| if (e.Button == MouseButtons.Right) |
| { |
| ma_add_menu.Show(ma_groupbox, e.Location); |
| } |
| } |
Dim fname As String = ""
If (dlgImportClients.ShowDialog() = Windows.Forms.DialogResult.OK) Then
fname = dlgImportClients.FileName
End If
Dim TextLine As String = ""
Dim SplitLine() As String
If System.IO.File.Exists(fname) = True Then
Dim objReader As New System.IO.StreamReader(fname)
Do While objReader.Peek() <> -1
TextLine = objReader.ReadLine()
'need to add false for checkbox column
TextLine = "False," + TextLine
SplitLine = Split(TextLine, ",")
dgvClients.ColumnCount = SplitLine.Count
dgvClients.MasterGridViewTemplate.AllowAddNewRow = False
dgvClients.ReadOnly = False
dgvClients.Columns(0).IsVisible = True
'if .RowCount = 0 then we are processing the first row
If dgvClients.RowCount = 0 Then
For i = 1 To SplitLine.Count - 1
With dgvClients
.Columns(i).HeaderText = SplitLine(i).ToString
.Columns(i).BestFit()
End With
Next
End If
dgvClients.Rows.Add(SplitLine)
Loop
'stupid but the only way I could get the datagridview to populate correctly
If dgvClients.RowCount > 1 Then
dgvClients.Rows.RemoveAt(0)
End If
Else
RadMessageBox.SetThemeName("Breeze")
RadMessageBox.Show("File Does Not Exist")
End If
I am loading the .CSV file to the GridView so that it can be reviewed, cleaned up, and then imported into Clients table within the customers database.
I'm kinda stumped as to the best way to get the data in the GridView into the database. Could just be a brain fart or I may be going about this totally wrong. Any insight would be greatly appreciated.