How can a hashtable be bound to a drop down list?
In vb.net / winforms, how can a hashtable be bound to a drop down list or any other datasource-driven control? ...
In vb.net / winforms, how can a hashtable be bound to a drop down list or any other datasource-driven control? ...
I'm trying to use some extension methods that I use to apply consistent formatting to DateTime and Int32 - which works absolutely fine in code behind, but I'm having issues with databinding. I get: 'System.DateTime' does not contain a definition for 'ToCustomShortDate' for <%# ((ProductionDetails)Container.DataItem).StartDate.ToCust...
My scenario is: I have a WPF Window with 3 data-bound text boxes SettingsUI : Window <Grid Name="SettingsUIGrid1"> <TextBox Text="{Binding Path =val1}" .... <TextBox Text="{Binding Path =val2}" .... <TextBox Text="{Binding Path =val3}" .... </Grid> In the constructor I do this: SettingsUIGrid1.DataContext = coll[0]; // collection f...
There's been a lot of wishes to include nameof () operator in C#, so that you could do, for instance, nameof (Customer.Name), which will return you "Name". I have a domain object. And I have to bind it. And I need names of properties as strings then. And I want them typesafe. I remember, there was a workaround for .NET 3.5 which involv...
I have a tab page that should be hidden if a property (BlahType) is set to 1 and shown if set to 0. This is what I WANT to do: <TabItem Header="Blah"> <TabItem.Triggers> <DataTrigger Binding="{Binding BlahType}" Value="0"> <Setter Property="TabItem.Visibility" Value="Hidden" /> </DataTrigger> </TabItem.Triggers> ...
This seems like something simple, but I can't seem to figure it out! I'm trying to get 2-way data-binding to work on an ASP.net page with a check box as one of the columns. How do I get the updated values (from check boxes) back from the gridview ????? Here is my data type: [Serializable] public class UserRequirements { public str...
I've been knocking my head against this for some time now. I'm not really sure why it isn't working. I'm still pretty new to this whole WPF business. Here's my XAML for the combobox <ComboBox Width="200" SelectedValuePath="Type.FullName" SelectedItem="{Binding Path=Type}" Name="cmoBox" > </ComboBox> Here's what populates the ...
Okay, I have a FormView with a couple of child controls in an InsertItemTemplate. One of them is a DropDownList, called DdlAssigned. I reference it in the Page's OnLoad method like so: protected void Page_Load(object sender, EventArgs e) { ((DropDownList)FrmAdd.FindControl("DdlAssigned")).SelectedValue = ((Guid)Membership....
In C# I have a processing time number data column in the database which is in in this format "###" or "##" ( eg: "813" or "67") When I bind it to the grid view I wanted to display it in this format "0.###" (eg: "0.813" or "0.067") I tried using {0:0.000} and other formatings. But none seem to work. Can anyone tell me how to write the ...
The attached code example (pseudo code) compiles, but throws this Run-Time Error: TypeError: Error #2007: Parameter child must be non-null. at flash.display::DisplayObjectContainer/getChildIndex() at mx.core::Container/getChildIndex()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\Container.as:2409] at mx.containers:...
Hi, I have created a Custom Server Control (Inherited from GridView). On the page, the GridView is DataBound to a DataSet, so I do not know at design time what columns will be present in my GridView. Now, what I want to do is, to add a textbox in every Cell for the GridView Header row, and those textboxes will control column filtering...
I cannot get a two-way bind in WPF to work. I have a string property in my app's main window that is bound to a textbox (I set the mode to "TwoWay"). The only time that the value of the textbox will update is when the window initializes. When I type into the textbox, the underlying string properties value does not change. When the string...
My WPF application generates sets of data which may have a different number of columns each time. Included in the output is a description of each column that will be used to apply formatting. A simplified version of the output might be something like: class Data { IList<ColumnDescription> ColumnDescriptions { get; set; } strin...
I have written a control in C# that derives from System.Windows.Forms.Control. I have added a property Selected to which I want to databind to a business entity using a BindingSource. I’ve implemented the PropertyNameChanged pattern by adding a SelectedChanged event that I fire when the Selected property is changed. This is my code: p...
As far as I understand, binding to a var in ActionScript is carried out via events which are automatically fired when a var is changed. I have a few questions about this: What happens if the class doesn't explicitly extend EventDispatcher? Is there is some sort of magic that goes on in the compiler which essentially makes the class an ...
I have a situation where I am using wpf data binding and validation using the ExceptionValidationRule. Another part of the solution invovles collapsing some panels and showing others. If a validation exception is set - i.e. the UI is showing a red border around the UI element with the validation problem, and the containing panel is col...
Is it possible? I have a listview with several gridviewcolumns. The last column has a dynamic header. I dont know what the column header will be at design time. It's actually a number I want to display as a string. <GridViewColumn Header="{Binding Path=SomeValue}" DisplayMemberBinding="{Binding Path=OtherValue...
I have a page with a number of ListViews that I want users to be able to sort and page through. Rather than postback and rebind the entire page each time, I would like to do it via jQuery/AJAX selectively for the control in question. I am comfortable making the client-side call to a WebMethod in my page - my question is how do I get the ...
I'm trying to create a check/uncheck all CheckBox for a number of CheckBoxes that are located inside the cell template of a GridViewColumn. I added this column to a GridView (along with other columns), set the GridView to the view property of a ListView, and then databound the ListView to a collection of custom DataObjects. So, each row ...
For those who like a good WPF binding challenge: I have a nearly functional example of two-way binding a checkbox to an individual bit of a flags enumeration (thanks Ian Oakes, original MSDN post). The problem though is that the binding behaves as if it is one way (UI to DataContext, not vice versa). So effectively the check box does ...