databinding

GridView Column Width Altering

Can someone please help me with my problem? I have a gridview in a webpage, whose datasource is an oracle database. I would like to know if it is possible to change the column widths while you are on the web page? string select = "SELECT * FROM TABLE" OracleCommand cmd = new OracleCommand(select, connectionstring); cmd.Connection.Open...

Adding html in DataTextFormatString

I have a DropDownList populated from a LINQ query. As per the design requirements of this project, I need to append 4 " " to the DDL's ListItem.Text. It works when I add the ListItems manually like so: <asp:ListItem Value="NULL">&nsbp;&nsbp;&nsbp;&nsbp;Select One</asp:ListItem> but not when I DataBind() and use: DataTextFormatStrin...

Wicket PropertyModel strangeness?

I'm new to Wicket and was trying the following configuration: class User { private String password; ... public void setPassword(String password) { this.password = MD5.encode(password); } ... } After trying to use the following to bind to the password and finding out that the default implementation of PropertyMode...

Data Binding - C#

Hi All, I want to bind TextBox's Text property to FolderBrowser's SelectedPath property. But it's not working, I don't know why. Please help me out why it's not working? ...

ASP.NET WebForms Data Binding Solutions

I am looking for some easy to use data binding to forms controls. Something that will handle formatting, validation and error handling, something that will handle filling controls from business object/DTOs and vice versa with minimal code. I did use google and have found these two links: Implementing two-way Data Binding for ASP.NET ...

How to add Item to SqlDataSource databound list

I am lazy - and I am using a SQLDataSource to populate my dropdownLists. The Databind event for the databound objects is called before the Page.PreRender so I am doing something like this in the PreRender eventHandler: private void InitializeDropDown() { this.myDropDown.Items.Insert(0, new ListItem("-- Select someth...

ASP.NET page events - Button click event comes after GridView bind

My understanding of the order of page events is this: Page : Load Control : DataBind (for a GridView or whatever) Control : Load Control : Clicked (for a Button) Page: PreRender Control : PreRender (There are lots of others - but these are the ones I'm interested in) The important thing to notice here is t...

Why is two-way binding in silverlight not working?

According to how Silverlight TwoWay binding works, when I change the data in the FirstName field, it should change the value in CheckFirstName field. Why is this not the case? ANSWER: Thank you Jeff, that was it, for others: here is the full solution with downloadable code. XAML: <StackPanel> <Grid x:Name="GridCustomerDetails"> ...

FormView equivalent for a WinForms application?

Hi, I'm trying to develop a small utility (a WinForms app) and I was hoping (to save time) to use a WinForms equivalent of an ASP.net FormView or DetailsView (to bind to) - i.e. for single objects (as opposed to multiple objects, which we could use a DataGridView for). It's been about three years since I did anything meaningful in the ...

How to set DropDownList's selected value inside a Repeater?

I need to create a group of DropDownLists to show and allow change of a property group for an item. I have the following code on my ASP page. <asp:Repeater runat="server" ID="repeaterProperties"> <ItemTemplate> <p><asp:DropDownList runat="server" ID="ddProperty" OnInit="ddProperty_OnInit" /><p> </ItemTemplate> </asp:Rep...

How to emulate "AppendDataBoundItems" in Silverlight's ComboBox?

In Asp.Net Combobox, there is a useful property, AppendDataBoundItems, that causes whatever items are bound to the control to be actually appended to whatever "statically" added ad design time. This is useful for "default" values that the user can specify when no item in the available ones meet the criteria, or to specify a special "null...

Best practices for DataBinding in asp.net for maintainability

Hi, I would like to know what are the best practices for using asp.net DataBinding, in terms of maintainability. I don't want the application to fall appart when I have to make changes to the database. Should I databind completely in codebehind ? I am planning on using ObjectDataSources for the databinding. Is there something that is ...

Databinding in existing XPS document

I have an existing XPS file that I would like to use as a template and possibly bind data to it. I have tried several methods, but cannot seem to get it to work. Does anyone have any experience altering an existing XPS file to add data at runtime and then print or save? Any help is appreciated. ...

ASP.net Inline Expression Issue.

I can't seem to figure out why this does not work below. I need to bind the text box to a value from an inline expression. Seems like a simple thing right? But neither of these work. Any ideas? Thanks in advance. <asp:textbox id="tbName" runat="server" Text='<%# Eval("test") %>' /> <asp:textbox id="tbName" runat="server" Text='<%= "test...

WPF ListView Databound Drag/Drop Auto Scroll

Hi there, I've been working with Bea's solution here for a while and finding it very helpful. Problem now I'm having is when I drag-n-drop items within or to another ListView control and I want to scroll up/down "during" the drag (moving an item from index 30 to index 1), it's not happening. I would have to drag to the top of the visua...

What are usable databinding libraries for Swing?

Something that can do two-way bean synchronization with components, and also more fancy (advanced) stuff? ...

Binding WPF ComboBox to a Custom List

I have a ComboBox that doesn't seem to update the SelectedItem/SelectedValue. The ComboBox ItemsSource is bound to a property on a ViewModel class that lists a bunch of RAS phonebook entries as a CollectionView, then I've bound (at separate times) both the SelectedItem or SelectedValue to another property of the ViewModel. I have added ...

How do I override the error message on a databound control in WinForms?

I have a form in my application that uses a binding source to bind the controls to a model object. This works, and handles basic validation such as ensuring that the user doesn't enter text into a numeric field, for example. I am using an ErrorProvider, and setting its datasource = the binding source in order to display the error messag...

How do I display a single item using a DataTemplate in Silverlight?

I am trying to display a single item (not contained in a collection) using a DataTemplate. Here's what I've got so far, which is displaying nothing. Replacing ItemsControl with ListBox displays an empty listbox (so I know the element is there). <ItemsControl ItemsSource="{Binding Session}" ItemTemplate="{...

Setting IsCheckable seems to prevent submenus from showing up

I'm trying to bind IsChecked to the Selected DependancyProperty on the object I'm displaying, this code appears to work, but submenus don't show up if I use it. Is this the right way to go about it, and how do I fix the problem? <MenuItem Header="Window" Name="windowMenu" ItemsSource="{Binding}"> <MenuItem.ItemContainerStyle> ...