Hi,
I have a ListView with TextBoxes in second column. I want to validate that my text box does not contain a number if the third column(data_type) is "Text".
I am unable to do the validation.
I tried a few approaches. In one approach I try to handle the MouseDown event and am trying to get the Row number so that I can get the data_typ...
Is it possible to bind the alpha value of an element to a slider?
For example, this is code that allows the slider to change the height and top position of the element, but what is the syntax to control the alpha value in the Background attribute of the border?
<Window x:Class="WpfApplication25.Window1"
xmlns="http://schemas.micros...
Hello all,
I trying to work out if there is built in support for binding complex types to form elements.
To use a common hypothetical situation:
I have a Product entity that belongs to a Category - the models look something like this:
public class Product
{
public int ID { get; set; }
public string Description {...
What's the easiest way to build an applet that has a view with components that are bound to model data and update when the model is updated?
Ideally as little code as possible, preferable none/declarative :)
If a component type is needed for explanation, please consider a JLabel whose text is bound to a bean with a String getText() acc...
Hello !!
I have a wcf service where i have to implement the call backs and also i need to host the wcf service on the IIS 6.0, since IIS6.0 doesnot support the net.tcp binding, i decided to go for the custom binding. The reasons for going for custom binding is that the service is accessed by different clients in different timezones.
Usi...
I'm just trying to do some simple validation in MVC RC and am getting an error. For the purposes of this question, I am not using the UpdateModel.
Here is the code in the form:
<%= Html.TextBox("UserId")%>
<%= Html.ValidationMessage("UserId") %>
If I add the following line in the controller, I will get a NullReferenceException on th...
I already bind a listview (grid) with hashtable, so how can I get items from there? Before using hashtable I just did ListViewA.SelectedItems; and I was getting the source.
Ir fails when I use two foreach loops:
dlstTemplates is my ListView in WPF
foreach (var group in dlstTemplates.SelectedItems)
{
foreach (var Template in group)
...
I have a ListBox whose DataTemplate is created in code using 3 FrameworkElementFactory objects(A StackPanel with 2 appended children(CheckBox and TextBox)). The item object in the collection that is bound to the ItemsSource of the ListBox is basically the same type of Item object that you would typically see with any type of ListControl....
Hey all
I have an ASP.net MVC project in the works at the moment, and I'm wondering if the following could be possible:
I have a custom ModelBinder class that has a reference to a service (essentially a fetcher) as a dependency. I want the dependency to be injected using an IoC container (currently Ninject) but there seems to be nowhere...
Hello,
I have a question or best approach of connecting interface either during run-time or compile/link time. For my embedded projects the device drivers and I/O have interfaces that need to be bound (i.e. glued) to their corresponding interface dependencies. For example, for the analog device driver it requires an interface to the dis...
I want to construct a TextBlock consisting of several Run elements, with their contents bound to string variables, but Visual Studio complains, saying that one can only bind to a dependency property, which Run.Text isn't.
Is there anything that can be done?
...
Try
Dim ds As DataSet = SqlHelper.ExecuteDataset(ConfigurationManager.ConnectionStrings("connstr").ConnectionString, CommandType.StoredProcedure, "Get_All", New SqlParameter("@userid", Session("userid")))
rptBundles.DataSource = ds.Tables(0)
Catch ex As Exception
showerror(ex, Me)
End Try
That is the code, I want to be a...
When generating Java from an XSD via the XJC compiler, I always get the type java.langString for elements with anonymous simpleTypes like this:
<xsd:element name="Product">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Product1"/>
<xsd:enumeration value="Product2"/>
<xsd:enumeration value="...
I've a read only property I need to display in a textbox, and getting this error at runtime. I've set IsEnabled="False" IsReadOnly="True" - no luck.
Other searches say the readonly should fix it, but not for me.
I've got an ugly workaround by adding a dummy setter...
...
I'm new to WCF and trying to get my first service running. I'm close but stuck on this problem.
In my interface definition file, I have this:
[ServiceContract(Namespace="http://mysite.com/wcfservices/2009/02")]
public interface IInventoryService
{
[OperationContract]
string GetInventoryName(int InventoryI...
I am using JibX as a Java Object to XML Binding tool.
With it, I want to have the following output:
<?xml version="1.0" encoding="UTF-8"?>
<FEAPService>
<Request>
<Function>aaa</Function>
<SubFunction>bbb</SubFunction>
<Operation>ccc</Operation>
</Request>
</FEAPService>
But I'm getting this:
<?xml version="1....
I've got a person object with a name and age property that implements INotifyPropertyChanged. I want to hook this object up to an ASP.NET form so that the 'name' and 'age' properties bind to textboxes in a way that, when changes happen in either place (in the control or in the object) the other will get updated.
Do I create an intermedi...
When I use Interface Builder > Inspector > Bindings to set up an binding for one of my view Items (i.e. an textfield), then I have to specify an object to which this view item will be bound to.
So I am wondering now, what exactly is the job of this object I specify in "Bind to:"?
I assume that Interface Builder automatically creates som...
I have such WPF binding code:
TestModel source = new TestModel();
TestModel target = new TestModel();
Bind(source, target, BindingMode.OneWay);
source.Attribute = "1";
AssertAreEqual(target.Attribute, "1");
target.Attribute = "foo";
source.Attribute = "2";
AssertAreEqual(target.Attribute, "2");
The second assertion fails! This see...
I'm having a problem with this this XAML... When I run it, it hangs because of the TextBox. (By "hangs" I mean that the hosting aspx page shows in the browser, but the usercontrol object will not appear on the page, and there are some little green bars in the bottom of the Internet Explorer window that fill up but never go away.) I hav...