I have a table associating an ID with a client's forename and surname (two separate fields). I have a TextBox on my form for a user to enter a client ID and I'd like a live update of the name displayed on a label, e.g.:
TextBox: 1 --> Label: "Sam Pell" (user types 1)
TextBox: 12 --> Label: "Andy Other" (user types 2)
I have t...
Today I faced a problem which reminded me of bindings being detached automatically in some cases. I am not sure but here is the scenario -
I attach a menu item bound to a property(implementing INotifyPropertyChanged), like this -
IsChecked="{Binding Path=DisplayLongUnit, Mode=TwoWay}"
Now in its checked event hander I update its IsC...
I want a 1-time databind between a checkbox (IsChecked propety) in a childWindow and a nested member variable in it's DataContext object, such that only the initial IsChecked property is set by the member variable. The member variable (binding source) is not INotifyPropertyChanged or marked as a DependencyProperty- but I think that is ok...
Is it possible to display the result of a function instead of the value of a property in a DetailsView Field?
For example instead of:
<asp:Label ID="m_LabelPlantCode" runat="server" Text='<%# Bind("PlantCode") %>'></asp:Label>
maybe something like:
<asp:Label ID="m_LabelPlantCode" runat="server" Text='<%# Bind("PlantCode(true)") %>'...
Basic problem: How do I bind a textbox to the selected item of a combobox who's itemsource is the result of a LINQ query on a WCF RIA Services Domain context.
Additional requirement: When the selected item is changed the binding should update.
Additional requirement: The binding should be two way.
My solution so far:
After the user c...
Hello. I use ObjectDataSource and bind IEnumerable[Person] to my DevExpress GridView
class Person
{
private int Id {get; set;}
public string Name {get; set;}
}
At grid there are two columns Id,Name. I want new column "Sum", which is calculated by person object(aggragate by person). At asp.net I create new column and calculate i...
Hi,
I'm currently facing a need of creating user frontend application to database with dozens of tables and thousands of fields.
It should be java swing application, and I'm trying to find as most automated solution as possible. Ideally to completely avoid manual creation of DAO layer, beans definition and GUI creation.
Currently we ...
Hiexperts,
trying to grasp the concepts behind the MVVM pattern, I'm playing around with Josh Smiths MVVM sample application (http://msdn.microsoft.com/en-us/magazine/dd419663.aspx).
The sample app has a HeaderedContentControl where all the commands from the MainWindowViewModels Commands property are displayed. I'm struggling right no...
I have a WPF ListView that is bound to a collection (List<T>). It is currently updated from the current thread which works ok.
I want to move the logic for updating the list into a thread and I see some potential issues regarding thread safety and the binding of the list. Can I be assured that the binding will not be updated unless I ...
Hi
I usually use expressions like this
CommandArgument='<%# Container.DataItemIndex.ToString() %> '
But I could not find Container in the msdn, can u help?
Thanks
...
I need to attach specific XML to a word document so the elements will show up in the right places. This I can do with OpenXML SDK.
The thing is I want too be able to define the Content Controls already bounded in some sort of template so other people can create the real document template the xml will be attached to. Ok not sure people w...
Hi,
I am getting the following viewstate error when I add a row to the last page of the gridview control with custom paging enabled. this error occurs when row count of last page is equal to the page size (works first time, fails when doing the same on next page). any idea what might be causing it? custom paging is implemented using t...
Given the following InsertItemTemplate (simplified) I'm not getting anything back in the event object's Values collection.
<InsertItemTemplate>
Item:
<asp:DropDownList ID="ItemInsertType"
DataTextField="SearchItemName"
DataValueField="SearchItemID" runat="server" />
...
i have two tables
asset employee
assetid-pk empid-pk
empid-fk
now, i have a form to populate the asset table but it cant because of the foreign key constraint..
what to do?
thx
Tk
...
Hello!
I use DetailsView to insert rows in database. Row has fields id, subcategory_id etc. I want to fill dynamically dropdownlist ddl_subcategories, which is used in TemplateField. Selected item value of first dropdownlist ddl_categories is used as parameter for generating collection for ddl_subcategories. I try it with using UpdatePan...
I have a TitleAreaDialog with default buttons where I use data binding to synchronize the model and the widgets. How do I delay model updates until the user clicks the 'OK' button?
Thanks!
...
How can I implement a form with simple components (text boxes, comboboxes) bound to an object's properties and have Save/Cancel support?
I have tried the code snippet at http://fgheysels.blogspot.com/2009/06/winforms-databinding-on-cancellable.html but I dont know what is required for this to work binding to object properties.
This is ...
I see another thread somewhat like my question at:
http://stackoverflow.com/questions/1180403/asp-net-gridview-column-formatting-telephone-number
but i do not know if it answers my question as he is using code-behind to make the colum. All I did was insert the GridView control in visual studio. BTW, the data is being populated in the G...
In a Winforms form, I want to provide visual cues to the user when an input field contains an invalid value. To that end, I want to bind the ForeColor property of a input field's label to the (boolean) IsPropertyValid property of the underlying model such that the label turns red when IsPropertyValid == false.
What I currently have is a...
It seems that it is not possible to bind the visibility property of a DataGridTemplateColumn in Silverlight 4 still. I did some Googling and there seem to be a few posts suggesting it was to do with the fact that it was not a DependencyObject and how this would change in SL4 but it does not seem to be the case.
To work around it, I do i...