Hello,
I have an issue about the new search support functionnality in the scheduler.
On the grid displaying the result of a search, there is a column based on the background of the appointements which display a color and a displayname defined by Backgrounds property of the Scheduler and the value set in an appointement.
It have made the following customization with theses backgrounds to fit my need.
' Redefine the background list of Appointement
Dim
vacancesbackground
As
AppointmentBackgroundInfo =
Me
.AbsenceScheduler.Backgrounds(0)
With
vacancesbackground
.Id = Absence.TypeOfAbsence.Vacance
'=1
.DisplayName = EnumHelper.GetDescription(Absence.TypeOfAbsence.Vacance)
End
With
Dim
maladiebackground
As
AppointmentBackgroundInfo =
Me
.AbsenceScheduler.Backgrounds(1)
With
maladiebackground
.Id = Absence.TypeOfAbsence.Maladie
'=2
.DisplayName = EnumHelper.GetDescription(Absence.TypeOfAbsence.Maladie)
End
With
Dim
absencebackground
As
AppointmentBackgroundInfo =
Me
.AbsenceScheduler.Backgrounds(10)
With
absencebackground
.Id = Absence.TypeOfAbsence.Absence
'=3
.DisplayName = EnumHelper.GetDescription(Absence.TypeOfAbsence.Absence)
End
With
Dim
congebackground
As
AppointmentBackgroundInfo =
Me
.AbsenceScheduler.Backgrounds(9)
With
congebackground
.Id = Absence.TypeOfAbsence.Conge
'=4
.DisplayName = EnumHelper.GetDescription(Absence.TypeOfAbsence.Conge)
End
With
Me
.AbsenceScheduler.Backgrounds.Clear()
Me
.AbsenceScheduler.Backgrounds.Add(vacancesbackground)
Me
.AbsenceScheduler.Backgrounds.Add(maladiebackground)
Me
.AbsenceScheduler.Backgrounds.Add(absencebackground)
Me
.AbsenceScheduler.Backgrounds.Add(congebackground)
They are correctly displayed in the result grid except for the one with the Id "1" which display a transparent color and no text.
I'm not really surprised that there is a "special treatment" for this value as the default values 1 of the backgrounds is defined as "None" but is there a way to handle this ? I have attached a exemple screenshot (Record with blank Type should have "Vacances" and blue color)
Thanks for you support
Marco Guignard
Hi
How can I increase/decrease the number of digits after decimal in the pivotgrid for all cells on button click.
I have a GridViewTextBoxColumn in my grid. I want it to behave like a drop down when I have more than one potential value which could be displayed. In order to do this I capture the "EditorRequired" event. Sometimes I will have values in my grid for a given row and sometimes I will not. Sometimes I will have only one item in the row as well. So basically I expect to have no value, one value or multiple values.
I'd like the column in my GridView to only show the drop down list when I have more than one value that is available. Currently the column shows the drop down as soon as I click on that column which is very misleading to the user. I've attached 3 screen shots showing an example of how my grid row/column appears. In my screen shots I also show an exclamation point image when there is more than 1 item in my drop down list.
Here is my implementation of this event..
private void BatchComparisonGridEditorRequired(object sender, EditorRequiredEventArgs e)
{
if (BatchComparisonGrid.CurrentColumn.Name == "Matches")
{
// get model
ComparisonScanViewModel model = BatchComparisonGrid.CurrentRow.DataBoundItem as ComparisonScanViewModel;
RadDropDownListEditor editor = new RadDropDownListEditor();
RadDropDownListEditorElement element = editor.EditorElement as RadDropDownListEditorElement;
element.DropDownStyle = RadDropDownStyle.DropDownList;
element.DataSource = model.Matches;
element.DisplayMember = "Id";
// only 0 or 1 match?
if (model.Matches.Count <= 1)
{
// how to not make this a drop down??
}
// more than 1 match? make it obvious
if (model.Matches.Count > 1)
{
element.BorderThickness = new Padding(1);
element.FocusBorderColor = Color.Blue;
element.EnableFocusBorder = true;
}
// assign as the editor
e.Editor = editor;
}
}
Also, it would be nice for the border of the column to have a thickness and color before clicking on it when it has multiple values in the drop down. If possible please let me know how to do this.
I have a strange error. See attached. I have a form with a GridView. The user clicks a button which in turn causes the GridView to bind to a datasource that I call a BindingList of "ComparisonScanViewModel". For this example the contents of this class are not relevant. The grid immediately binds correctly. In a background thread a value within each instance named "Gamma" is calculated. The result is that the grid is filled with rows representing all the items in the list and as each "Gamma" is calculated the grid reflects this by updating the "Gamma (Passing %)" column.
// user wants to compare now
private async void CompareCommandBarButton_Click(object sender, EventArgs e)
{
_projectViewModel = ReferenceProjectDropDownList.SelectedValue as ProjectViewModel;
UpdateWaitingBar(ElementVisibility.Visible, "Finding matches / Calculating Passing Percentage...");
if (null != _projectViewModel)
await GetScans();
UpdateWaitingBar(ElementVisibility.Collapsed);
}
The "await GetScans()" function does all the heavy lifting. This function can be stopped elsewhere (when a user wants to close the form before this function has completed), which is why the "private ManualResetEvent _reset = null;" exists in the class. The important part of this function is the line "scanModel.FindMatches(_snc.Measuring.GetProject(_projectViewModel.Id));". This is where my "Gamma" value is calculated and the grid is updated to reflect the result. See below...
/// <
summary
>
/// Calculate the gammas for the scans in the project
/// </
summary
>
private async Task GetScans()
{
_reset?.Set();
_task?.Wait();
if (null != _projectViewModel)
{
// reference project name
_referenceProjectName = _projectViewModel.Name;
// what is the current analysis parameter protocol
_protocol = (AnalysisProtocolType)_snc.Administration.GetPreference(
PreferenceType.AnalysisProtocolType).IntValue;
_model = new ComparisonScansViewModel(_snc, _protocol, _scans);
if (null != _model)
BatchComparisonGrid.DataSource = _model.Scans;
UpdateWaitingBar(ElementVisibility.Visible, "Finding matches / Calculating Passing Percentage...");
// try to calculate match/gamma
_task = Task.Run(() =>
{
_reset = new ManualResetEvent(false);
try
{
foreach (ComparisonScanViewModel scanModel in _model.Scans)
{
if (_reset.WaitOne(0)) break;
scanModel.FindMatches(_snc.Measuring.GetProject(_projectViewModel.Id));
}
}
catch (Exception)
{
}
finally
{
_reset?.Close();
_reset?.Dispose();
_reset = null;
}
});
await _task;
}
UpdateWaitingBar(ElementVisibility.Collapsed);
}
This is what the UI looks like as "Gamma" is calculated within my model and it's value is reflected in the grid. *Notice that there are rows with no "Gamma" and as "Gamma" is calculated it is shown on that column (this is exactly how it supposed to work). Occasionally I get the error attached, the "LayoutQueue" error while the model is being updated and then reflected in to the grid. Any ideas why this is happening?
Hello,
I'm using 2018 SP1. It looks like the CommandBarButton is displaying improperly when disabled. I have the TextImageRelation set to ImageBeforeText but when disabled it puts a blank square on the right side. Changing the TextImageRelation to TextBeforeImage makes it display properly. Is there any way to work around this?
Hello,
I need help.
I allowed to drag files to my application, via Drad'n Drop. Files from filesystem works without any problem, but I can't an attachment directly from outlook. Is there any solution for my problem?
I don't want to store the whole mail, only one attachment.
Kind regards
Telerik.Data.Expressions.ExpressionItem doesn't allow association to custom class (object)
I'm adding a lot of custom ExpressionItems but cannot link the expressions to my class instances.
Why isn't there a Tag property like, almost, every other class in the universe?
Feature to add... I hope
thanks
Is there any way we can able to set the property at application level or config level?
I have RadGrid columns (gridboundcolumn) through out the application and we want to apply a property/attribute to all the columns at application/config file level. So that we do not need to go to each and every line of columns and add the property or attribute.
I don't understand the meaning or the usefullness of Autocomplete in a DropDownList
If I just have a regular DropDownList, Autocomplete-Like-Behaviour is already working fine, you type the first character, it's autocompleted.
Why having 2 different DataSources for the same input ?
radCheckedDropDownList1.DataSource = items;
radCheckedDropDownList1.ValueMember = "ID";
radCheckedDropDownList1.DisplayMember = "Label";
radCheckedDropDownList1.CheckedMember = "Checked";
radCheckedDropDownList1.AutoCompleteDataSource = items;
radCheckedDropDownList1.AutoCompleteValueMember = "ID";
radCheckedDropDownList1.AutoCompleteDisplayMember = "Label";
I do not even have an idea, which List is coming up, if I start typing ? The DropDownList, or the Autocomplete-Dropdown ?
In what situations is it useful to have this combination ?
Hi,
I have one case like this:
ID Name OpenDate Status
1 A 02/02/2018 10:00 Open
2 A 02/02/2018 15:00 Close
3 A 02/02/2018 16:00 Open
3 A 02/03/2018 8:00 Open
3 A 02/03/2018 12:00 Close
4 B 02/02/2018 10:00 Open
I want to build grid like this for specified Name. when I choose A the grid should be displayed:
Date Open Close. Open
02/02/2018 10:00 15:00 16:00
02/03/2018 8:00 12:00
How can I achieve it ?
Thanks.