Questions tagged [databound]

The state of (or ability to) being bound to a data source. For example, data-bound controls are user interface controls having the intrinsic ability to display and (in some cases) edit data from a specified data source.

Data binding is a general technique that binds two data/information sources together and maintains synchronization of that data. This is often done with two data/information sources with different types as in XML data binding. However, in UI data binding, data and information objects of the same type are bound together (e.g. C# UI elements to C# objects).

174 questions
2
votes
1 answer

Refreshing the contents of a databound combobox C# problems

I'm trying to refresh the contents of a combo box which pulls data from a database on a SQL server. This I have working fine using data adapter, dataset and a binding source. However say I was to delete one of those items in the combo box they still…
mjsey
  • 1,938
  • 5
  • 18
  • 28
2
votes
2 answers

How to test a DataTable update in RowChanging event handler

I have a WPF DataGrid bound to a DataTable. I fill the underlying DataSet from an arbitrary table in a database. I've attached to both the DataTable RowChanging and RowChanged events. As the user changes a row, these events fire and allow me to…
Scott Howard
  • 236
  • 5
  • 10
2
votes
1 answer

asp.net gridview binding to deeper property of specific type

my webside has a gridview i bind it to a dataset recived from powershell in this dataset are a lot of different data types. everything is working fine but for one field i would like to bind a deeper property to the boundfield! i bind it like…
Schmurgel
  • 135
  • 1
  • 1
  • 5
2
votes
1 answer

DevExpress: XtraGridView Custom column binding

Lets say that I have the two following classes public class OtherClass { public string OtherName{ get; set; } } public class MyClass { public string TheName { get; set; } public int TheAge { get; set; } } lets say that I bound the…
Rami Alshareef
  • 7,015
  • 12
  • 47
  • 75
2
votes
1 answer

How do I alter the items in my DropDownList in ASP.NET

I have this that gets bound in my code behind: Default How do I alter the list items in…
cdub
  • 24,555
  • 57
  • 174
  • 303
2
votes
1 answer

GridView DataBound Fields - SQL Parameters

When during execution are DataBound GridView fields bound to SQL Parameters? I have a few DataBound fields and UpdateParameters that relate to them. Sometimes my UpdateCommand will execute successfully and other times I will get null reference…
Will
  • 989
  • 4
  • 19
  • 33
2
votes
1 answer

How to set focus to a databounded TextBox in WPF when the selection change?

I have a TextBox that is databound to a TreeView. If the selected element chnages the TextBox shows me the Name of it. What i want is, set the focus to the TextBox if the selection has changed and select the text in the TextBox. Is this possible…
jwillmer
  • 3,570
  • 5
  • 37
  • 73
2
votes
2 answers

Changing background color of a separator in WPF data bound combo box

I have a combobox that is bound to a dataset that then uses a datatrigger to insert a separator when it encounters a '-' in the data (example in this question). The background of the menu has custom color, set by using a resource dictionary. The…
jmlumpkin
  • 922
  • 2
  • 14
  • 34
2
votes
1 answer

Javascript validation inside gridview cell

I have a single entry master with country name in a gridview . I have to edit the data in a grid view in asp.net c#. I want to validate the textbox inside edit template to see if the user enters invalid characters. I want to validate that using…
Karthik Ratnam
  • 3,032
  • 2
  • 20
  • 25
2
votes
3 answers

Working with DataGridViewRow.DataBoundItem - transform to Enumerable Object?

I have a DataGridView with myGridView.DataSource = GetSomeData() // method called public IQueryable GetSomeData() { var source = from r in records select r; return source; // made correction from 'r' to…
IAbstract
  • 19,551
  • 15
  • 98
  • 146
2
votes
2 answers

DataGridView: Format values without actually changing the bounded data?

I've been searching through the web but I have not been able to find an answer. I have a DataGridView with a BindingSource bounded, which has a List of objects of a custom class. Among the fields of the class, I have a string field which I want to…
Sergio Rosas
  • 545
  • 12
  • 27
2
votes
1 answer

Why returned value is not being saved in DetailsView?

The null object reference was solved. Now I need the returned value to be saved to the record. Here is the data bound code: Private Sub dvSMasterCurrentYear_DataBound(sender As Object, e As EventArgs) Handles dvSMasterCurrentYear.DataBound …
jim davis
  • 63
  • 3
2
votes
4 answers

ASP.Net Form Databound problems

I know there is a similar problem on this forum, but the solutions did not really work for me. I am populating form controls with fields from a few different data sources, and the data shows up great. I have an ImageButton control, which has an…
Jason Bitman
2
votes
1 answer

Joined tables and databound controls; how would I bind my image controls so they will be bound to different images?

I didn't know exactly how to phrase this question, so sorry if it sounded a little weird to you guys. It is a follow up to my question about joined tables and table aliases, only this time my issue is with the ASP.NET markup. As I said in my…
Shortstuff81000
  • 469
  • 1
  • 3
  • 15
2
votes
1 answer

ComboBox binding to SQL DB

I have a SQL Database where two tables have PK Relation. tblProject.contractorID is Foreign Key column and tblCompany.contractorID is Primary Key column. I have created a Windows Form, marked tblProject.contractorID as ComboBox, marked tblProject…
1
2
3
11 12