private void UnselectCells() |
{ |
SchedulerMonthViewElement monthView = this.schRates.SchedulerElement.ViewElement as SchedulerMonthViewElement; |
Telerik.WinControls.RadElementCollection childrenCollection = monthView.Children[1].Children; |
foreach (MonthCellElement cell in childrenCollection) |
{ |
if (cell.Header.Selected == true) |
{ |
cell.Header.Selected = false; |
} |
if (childrenCollection.IndexOf(cell) == 34) |
{ break; } |
} |
} |
private void UnselectAppointments() |
{ |
foreach (IEvent appointment in this.schRates.ActiveView.Appointments) |
{ |
if (appointment.Selected == true) |
{ |
appointment.Selected == false; |
} |
} |
} |
I have a grid that contains a dropdown column as bellow:
GridViewComboBoxColumn type =
new
GridViewComboBoxColumn();
type.Name =
"Type"
;
type.HeaderText =
"Type"
;
type.ValueMember =
"Id"
;
type.DisplayMember =
"Type"
;
type.DataSource =
new
string
[] {
"A"
,
"B"
,
"C"
};
type.DropDownStyle = RadDropDownStyle.DropDownList;
grid.Columns.Add(type);
Suppose the user adds two new rows and selects "A" from dropdown for the first row and selects "B" from dropdown for the second row. I don't know how I can save the grid and then load it later. I should say that I know how to use Linq to save data into SQL database, but I don't know how I can get the values that the user selected and how to load data into grid later. Please help me.
Hello Telerik
I would like to have an editor in a GridView for selecting one business object (DataBase Key, Name, Code (like an EAN CODE) in a collection. As The name is also considered to be an unique Key, the editor is based on a textbox which display the name of a product. The textbox should have a autocomplete feature (suggest with a dropdown) but the suggestion should be based on the whole list of product filtered by the Name or the Code.
The editor is valid only if the text is matching a product name (return the matching DataBase key for the binding) or is empty (return a nullvalue for binding).
What is the best way to reach this objectif ? Should I start from a RadDropDownListEditor, a RadTextBoxControlEditor, a RadTextBoxEditor ?
Thanks for your support
We have recently converted our controls from win form control to telerik control.
Now "_" is being shown for mnemonic all the time (without pressing Alt key).
Earlier when user press Alt key all the mnemonic get highlighted with _.
i want the same old visual style.
Any help will be really helpful.
public Form1()
{
InitializeComponent();
var list = new List<
Data
>();
list.Add(new Data(1, "Apple"));
list.Add(new Data(2, "Banana"));
list.Add(new Data(3, "Orange"));
var lookupList = list.ToList();
radGridView1.MasterTemplate.AllowAddNewRow = false;
radGridView1.MasterTemplate.AllowColumnChooser = false;
radGridView1.MasterTemplate.AllowDeleteRow = false;
radGridView1.MasterTemplate.AllowDragToGroup = false;
radGridView1.MasterTemplate.EnableGrouping = false;
radGridView1.ShowGroupPanel = false;
radGridView1.Columns.Add(new GridViewComboBoxColumn("Key") { DataSource = lookupList, ValueMember = "Key", DisplayMember = "Value" });
radGridView1.Columns.Add(new GridViewTextBoxColumn("Value"));
radGridView1.DataSource = list;
button1.Text = "&Button";
button1.Click += button1_Click;
}
private void button1_Click(object sender, EventArgs e)
{
RadMessageBox.Show(this, "Button Pressed");
}
public class Data
{
public Data(int key, string value)
{
Key = key;
Value = value;
}
public int Key { get; set; }
public string Value { get; set; }
}
I want to be able to set the backcolor for the chart itself with a gradient. I can easily set the backcolor property but don't see away to control the gradient. I see that in the property build under Edit UI Elements there is the RadChartElement. Not sure how to get to that programmatically? Please advise or let me know the correct way to accomplish this.
Thanks
Hi
i use telerik 2015 q3 for winforms
i wanna change the shape of my labels. i have several labels and each of them must have their own shape.
i use the shape property in the in smart tag -> edit ui element -> root element -> shape
and select my predefiened shape and then change the border primitive shape and my label shape change successfully.
but when i use the create new shape instead of select predefined shape nothing happen and when i finish create new one in custom shape editor and click ok, no chnage apeare.
could you please tell me right way
Regard