private void rgvRulesList_RowFormatting(object sender, RowFormattingEventArgs e)
{
if (!_assignedRules && slNo == ruleCount - 1)
{
ShowOrHideGridButtons();
}
}
private
void ShowOrHideGridButtons()
{
Guid ruleId = Guid.Empty;
foreach (GridViewDataRowInfo dataRowInfo in rgvRulesList.Rows)
{
GridCommandCellElement gridViewCellApply = (GridCommandCellElement)dataRowInfo.Cells["Apply"].CellElement;
GridCommandCellElement gridViewCellRemove = (GridCommandCellElement)dataRowInfo.Cells["Remove"].CellElement;
if (gridViewCellApply == null || gridViewCellRemove == null)
{
continue;
}
RadButtonElement rbApply = (RadButtonElement)gridViewCellApply.Children[0];
RadButtonElement rbRemove = (RadButtonElement)gridViewCellRemove.Children[0];
ruleId =
new Guid(gridViewCellApply.Value.ToString());
foreach (EntityRulesMapping mapping in _entityRuleMappingList)
{
if (mapping.RuleId == ruleId)
{
rbApply.Visibility =
ElementVisibility.Hidden;
rbRemove.Visibility =
ElementVisibility.Visible;
break;
}
else
{
rbApply.Visibility =
ElementVisibility.Visible;
rbRemove.Visibility =
ElementVisibility.Hidden;
}
}
// end of inner for each
}
// end of outer for each
_assignedRules =
true;
}
But i could not arrive at the required solution. But when i click any of the button, this rowformatting works and the required result is achieved. I think this is because, the rowformatting event happens when some user interaction happens with the grid. Please help me on this.
I have quite a number of RadTextBoxControls in my application, and I need to disable the right-click context menu on all of them - how can I do this and is there a way to do it on all of them at the same time so that it is the default?
thanks.
Damien
I have a grid view that has data bound to it. What I am looking to do, is add a column, have an expression that computes the value in the field to text based on another columns value. I am unsure how to accomplish this. Any help would be greatly appreciated.
For example, I have a foreign key column called PersonKey. What I want to be able to do is call a public method that returns a string of the Person's name based on the key that is passed to it.
Hello,
I have a RadButton in a winform with a circle shape and an image.
The border of the button works fine when there the mouse is over the button, but one clicked and the mouse leaves the control, the border size seems to change.
Please see the attached images. The one "with mouse focus" was captured with a screen shot while the mouse was over the button, but the Windows screen grab does not show the mouse. The "no mouse focus" image is after the button has been clicked and the mouse is no longer over the control.
I have not been able to locate where to change the border setting when the button has been clicked, but does not have mouse focus.
Any suggestions?
Thanks
Hi,
I'm struggling with setting the tab order of my controls. I have a mix of controls, mostly RadTextBoxes, RadDropDownLists, and RadDateTimePickers. I have set the TabStop and TabIndex of the controls using Visual Studio designer. This taborder is not the order that I get.
I've seen some entries regarding TabStop for RadTextBoxes in this forum, so I've made sure that RadTextBoxElement.RadTextBoxItem.TabStop is true (in telerik's(?) designer). However, I cannot find a similar thing for the other type of controls.
1) How should one set the tab order of telerik controls?
2) If it is through a property of a somewhat hidden element inside a control, how is one supposed to find it?
Please advice.
I've used the following code example to set permissions for a selected range in a richtexteditor, however, I would like code for removing previously set permission(s) for a selection in the same richtexteditor. Any help you be appreciated, thanks!
J
'Protects current selection for current user only.
Dim
info
As
New
PermissionRangeInfo()
info.Type = PermissionType.Individual
info.Name =
Me
.RadRichTextEditor1.CurrentUser.Username
Dim
infos
As
New
List(Of PermissionRangeInfo)() From {info}
Me
.RadRichTextEditor1.InsertPermissionRange(infos)
infos.Clear()