I have a callout that opens a control. I would like the control to stay open even if the user clicks elsewhere -- to close it he'll click on the same button used for opening it.
To prevent the control from closing when the user clicks elsewhere I have set AutoClose to false, but now the control stays open even if I switch to another window, or even another program! The disembodied control still remains in the foreground.
using System.Windows.Forms;
namespace testGridViewKeyPress
{
public partial class RadForm2 : Telerik.WinControls.UI.RadForm
{
private int count_;
public RadForm2()
{
InitializeComponent();
count_ = 0;
}
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
count_++;
radLabel1.Text = count_.ToString();
radGridView2.BeginUpdate();
radGridView2.Rows.Clear();
//I Want to Process Row Clear And Add
radGridView2.EndUpdate();
return true;
}
}
}
When I hold down the key, I want to clear the row of the GridView and add a new row.
However, when the number of columns increases, even if rows work is performed between BeingUpdate() and EndUpdate(),
All UI is not highlighted or updated.
If the control needs processing when in the press state like this, shouldn't I use gridview?
Or, if there is another solution, please let me know.
+What I want is for all UI to update and operate when a key is pressed.
+My telerik version 2021.3.914.40(Dev)
Is there a way to give each ContextMenu Item its own backcolor?
I like to display data like above . Each row's data type could be decimal, integer, or string. Thanks!
How can I tell if a CHECKBOX contains focus. We have a specific set of keyboard requirements that if the user clicks the "ENTER" key, the next control should bet set focused, but not change the state of the checkbox. Clicking the "ENTER" key does change the state. When you are on a CheckBox, ContainsFocus doesn't seem to work. So, what we would like to do, is if the CHECKBOX has focus, when the use clicks the "ENTER" key, it just moves to the next control in a tab order and not check the checkbox. (We are trying to get the DateTimePicker to do the same thing)...
protected virtual void HandleKeyDownForForm(object sender, KeyEventArgs e)
{
if (e.KeyData == Keys.Enter)
{
if (ntsRadDateTimePickerDob.ContainsFocus)
{
_dobHasNullValue = !ntsRadDateTimePickerDob.NullableValue.HasValue;
}
if (radCheckBoxActiveAbsentee.ContainsFocus)
{
_activeAbsenteeValue = radCheckBoxActiveAbsentee.IsChecked;
}
Control ctl = (Control)sender;
ctl.SelectNextControl(ActiveControl, true, true, true, true);
}
}
Any help would be greatly appreciated.
Thank You.
I would have thought that after selecting some rows in a RadListControl and hitting Ctrl-C it would copy the text from those rows, but no - it doesn't copy anything. I also would have thought that there'd be a standard context menu if I were to right-click on it, but not that either.
Am I missing something, or is this the standard behavior of this control? If it is, do you have some other listbox control that behaves the way I would expect?
Hello,
I've created a custom cell in a radgridview so that I can in one column either display a RadDropDownListElement or a RadTextBoxControlElement depending on if the tag of the row has a datatable or not. If it has a datatable it will show the dropdown, otherwise it shows the textbox.
This I've done pretty much according to this tutorial.
However, my problem is that the selected index changed event on the dropdown is triggered too early, i.e. before all data has been loaded. Is there a way to get around this? I would like that the selected index changed event only kicked in if all the data of the form has been loaded. This I usually achieve by checking if a flag, e.g. 'IsInitiated', is true in the beginning of the Sub. But cannot seem to reach such a flag from the custom cell class.
For some reason, I can't reduce the width of this RadForm in the designer or programaticaly. The controls are an autosized RadButton on an autosized FlowLayoutPanel on an autosized RadForm.
Margins and Padding are set to 0 for everything. What am I doing wrong?
What
Hello,
I would like to ask for help with designing parameter editor with subitems. I have editor of test items, each item has some parameters and tolerances (Min, Max). Standard tests have just main tolerances, but some tests have also subitems. More precisely, if test has subitems, only subitems have tolerances, main tolerances are not used. Columns for items and subitems are almost the same, items have parameters and subitems don't have any parameters, but there is just a name of subitem instead of test type of parent item. So first attempt of editor looks like this:
One small question to this solution, how can I show "+" only if there are some subitems?
But I am not satisfied with that design, subitems have own border, own column headers, it's little bit confusing and not very clear. I know it's standard way of master-detail views, but in this case, I would prefer design similar to self referencing hierarchy, because columns are almost the same, just some cells are empty and I have name of subitem name instead of test type.
I have made a second test with selfrefencing and changed the screenshot a little bit to show you what I am trying to achieve. Is it possible to have view similar to this?
I think I can do it with some modified data structures specialized for editor, I can use nullable properties for tolerances and parameters to hide certain cells, handle some events to have those empty cells readonly, maybe it would be tricky to show indented subitem name in test type combo box column, but I think this solution would be a little bit ugly. Is there any better way to do this?
I have attached my test project for tests.