How to make a DXGrid of DevExpress for SilverLight readonly? I want to make this a readonly grid such that the user cannot edit the cells when he clicks on any row.
I searched far and wide, but there is nothing like:
gridcontrol.readonly NOT THERE
gridcontrol.isreadonly NOT THERE
gridcontrol-->behaviour-->editing something like this NOT THERE
Set the grid's View.AllowEditing property to false to prohibit editing.
Related
I am developing desktop application using vb.net and vs2008.
I have a DropDownList that I don't want it interact with use when the info is locked.
But if I disable it, it is greyed out and the text is not easy to read.
Is there any way to make radiobutton like readonly textbox?
I want text of the DropDownList looks black and itself is not clickable.
The above shows a disabled DropDownList with greyed out text and a readonly textbox
Try this:
Enable="false"
Place it within your <asp:DropDownList> tag.
I recently encountered a similar issue. My solution was to remove all other values of the DropDownList except the one that is selected. This will keep the text as black as opposed to grey. Users will be able see the existing value and click it but will not be able to change it.
Hope this helps.
No, you can't use CSS in a desktop app. When you disable the dropdownlist by setting Disabled=true; or Enabled=false (whatever the case is), you can also change the Font properties to make it easier to read. You can set other properties such as Border, BorderStyle, etc, etc.
Keep the control enabled. In the GOTFOCUS event, use SENDKEYS to send a {tab} to the form. the user will not be able to change it! By the way, workt for ALL controls, that a user can focus.
I have a user control that has a ListBox with a bunch of other controls.
I need to be able to bind the ListBox control in the Silverlight Page.
I need to be able to do this, so that i can use my usercontrol on several different pages and bind it to different table on each page.
Any ideas of how this can be done?
You can expose a DP of type IEnumerable in your UserControl and, as you feel the property change, set your ListBox's ItemsSource to that property.
I'm trying to use the DataForm to display data. The CurrentItem is bound to a property on my ViewModel. The property it is bound to is a simple poco. I've created a custom readonly template. Everything works fine except I can't figure out how to make the DataForm appear "Enabled" or in the Normal state. The data isn't editable, it's displayed as readonly.
The only way I've been able to get it to display in the Normal state was to edit the template and set the Opacity to 100% for the DisabledVisual border.
Is there a better way to do this or use the DataForm for displaying data that isn't editable but still appear enabled?
This fixed it: jedwards14.blogspot.com/2011/02/silerlight-data-forms-with.html. I do have a busy indicator, apparently this is still and issue: silverlight.codeplex.com/workitem/4729
I have a combobox where the SelectedValue on the combo is bound to a property on a business object.
Everything works fine, but the property that's bound to the SelectedValue on the combo only gets updated when the focus leaves the control. I understand that the property doesn't get updated until the control is validated (loses focus), but I need it to update the datasource as soon as the dropdown is closed.
I know I could probably leave focus from the control on the DropDownClosed event but I'd prefer something a little less kludgy.
What's the best way to immediately update my datasource when the dropdown is closed?
Set the DataSourceUpdateMode to OnPropertyChanged. Here is similar problem:
[http://social.msdn.microsoft.com/Forums/en/winformsdatacontrols/thread/bc39342b-d9b5-4ad0-bd35-073869ccf8be][1]
The way I'd do it is to set (in the events) the OnUpdate of the combo box and put in the VB.net
Me.<business object>.Requery
When answering another question I started to wonder how I could Add new properties to all controls in a form just like the ToolTip-control does.
For example I could use that to Add a "IsDirty"-flag to all textboxes just by adding the component to the form and it would handle this for every textbox.
When adding the tooltip-control to the form all controls magically gets a new property "Tooltip on tooltip1" that can be set both programatically and in design view.
I want to be able to do my own enhancer like that.
It's an Extender Provider.