Is it possible to bind to a property of a property?
Here is what I have:
[Bindable(true)]
public class DataClass
{
private string DescriptionValue = null;
private Content DataContent Value = new Content();
....
[Bindable(true)]
public Content DataContent
{
get { r...
I'm trying to retrieve the DataTextField (The auto inputted CompanyName) so I can know which button/row was clicked.
Here's my Gridview
<asp:GridView ID="VendorsGridView" runat="server"
AllowPaging="True" AutoGenerateColumns="False"
DataSourceID="ObjectDataSource_Vendors"
DataKeyNames="ID,ModuleId" CellPadding="4" OnR...
Suppose I have a UserControl whose DataContext is set to an object that has an XmlDataProvider property. I would like to bind to this property in my control's XAML, and specify some XPath. I tried this:
<TreeView ItemsSource="{Binding Path=PropertyName, XPath=/items/item/*}">
At runtime I get the exception "BindingExpression with XPat...
I see some people use it, but couldn't find any explanation on the net...
Any other special symbols (other than Binding /) that you know of?
...
I have a WPF window with a textbox, using standard WPF Databinding to an object. This all works fine, the issue is this:
The user is entering a time estimate, I would like to give the user the option to enter the data in hours or minutes (through a drop down list). I'd like to keep the data in minutes, and if the user selects hours, mul...
I am losing my mind. It's a simple scenario:
Entity definition (generated)
// this class is obviously generated by the designer, this is just an example
public class SomeEntity {
public int SomeEntityID { get; set; } // primary key
public String Property1 { get; set; }
public String Property2 { get; set;
}
.. in aspx file
<asp...
Hi,
I am currently using powerbuilder 6.5
In my application, i want to make a code where any change in one window should reflet another window.Two windows are using the same table. if we channge in one window it is not reflecting in another window if the other window is opened earlier. what cani do?
...
No database involved here, I am creating my own datatable in code, and binding it to a textbox and a datagridview.
When I change current record in the grid the textbox updates to the current value.
But what's the best way to synchronise changes between the values in the textbox and the datagrid. If I change one then it doesn't change t...
I am trying to bind a Linq to Sql object to a Repeater object and then update my DataSource.
My question is, can binding persist, or do you have to use the CommandArgument to retrieve the record and FindControl to get the updated values everytime? If the former is the case, will someone please provide an example?
...
I have a ListBox with databinding. I need to fire an event when a user clicks on one of the ListBoxItems, but I can't quite work out how to do that. I tried putting a Grid on the ListBox.ItemTemplate and putting the MouseDown event on that:
<ListBox
Name="popupListBox">
<ListBox.ItemTemplate>
<DataTemplate>
<...
I have a form with a DataGridView showing a list of customers, and some text boxes below showing details of the customer selected in the grid.
I have a Customer class and a CustomerList class of Customer objects, and a BindingSource with DataSource set to a CustomerList. The DataSource of the grid is this BindingSource.
Binding the tex...
Hi,
I have an ASP SqlDataSource connected to Sybase DB query, using Select Parameters that are populated by a dropdown:
Dropdown (works OK):
<asp:SqlDataSource ID="dsBondIDList" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"
...
Is there a super quick way to bind to the inverse of a boolean property? Something like this:
<TextBox Text="Some Text" IsEnabled="{Binding !EnableTextBox}" />
I know I can use a DataTrigger, but I was hoping for a nice shorthand.
...
Hello!
I have a method that returns a list of type string. I want to bind each item in the list to the textbox so essentially it looks like a listbox, except it will be editable since its actually a textbox!
any ideas on how to go about doing this!?
CODE:
public List<string> GetAgentsDetails(string writeDir)
{
List<string>...
PLease i am having a severe problem in WPF listView Databinding. I bound the list view to a list varsList. and assign the item source of the listView to varsList.But when i change items in varsList they are changed in the list view but the display text of the items is not changed. I tried to use INotifyPropertyChanged but it does not wor...
I have a sqldatasource connection in whose parameters, the insert parameter is set as
INSERT INTO [user_info] ([firstname], [lastname], [age]) VALUES (@firstname, @lastname, @age)
Now i understand @firstname, @lastname, @age are the parameters to which i set them the value.
I'm databinding it with a formview, which automatically bind...
I have a reusable usercontrol that uses a few commands and corresponding keyboard gestures,
(specifically Escape and Ctrl+1...Ctrl+9)
Now as I use this usercontrol in multiple locations I'd like to define the input gestures in the usercontrol, which works fine as long as the focus is within the usercontrol. However, I'd need it to work ...
I am attempting what I think is a rather simple databinding scenario with Linq To SQL.
I have a table of FacultyMembers, whose schema looks something like this:
FacultyMemberID - int PK
Name - nvarchar
UniversityID - int FK to University table
and so forth. There are various other string properties.
I generate LTS DataClasses. I dr...
I want to write a ViewModel that always knows the current state of some read-only dependency properties from the View.
Specifically, my GUI contains a FlowDocumentPageViewer, which displays one page at a time from a FlowDocument. FlowDocumentPageViewer exposes two read-only dependency properties called CanGoToPreviousPage and CanGoToNex...
I want to show certain parts of an ItemTemplate based according to whether a bound field is null. Take for example the following code:
(Code such as LayoutTemplate have been removed for brevity)
<asp:ListView ID="MusicList" runat="server">
<ItemTemplate>
<tr>
<%
if (Eval("DownloadLink") != null...