Questions tagged [datatextfield]
18 questions
5
votes
4 answers
How to bind the ASP.NET drop down list DataTextField property to a nested property
I want to bind the DataTextField property of a ASP.NET drop down control to a property of an object that is a property of the initial data source. How would I accomplish that particular task.
Drop down data source data schema
public class A
{
…

Michael Kniskern
- 24,792
- 68
- 164
- 231
3
votes
3 answers
How to concatenate values in dropdownlist in asp.net
recently while working on the dropdownlist, i came accross a strange issue, i am binding a datatable to dropdownlist, now my datatable contains 3 columns, (Name,Id,Count), in DataTextField i want to concatenate Name and count like…

Abbas
- 4,948
- 31
- 95
- 161
3
votes
2 answers
Rave Reports DataText Left
I'm using Delphi 7 and Rave Reports.
How can I set the DataText.Left property (from Rave Reports) dinamicaly according to the size of another DataText that comes before.
I tried using the width from the previous DataText, the Length of the field…

Felipe
- 31
- 2
2
votes
2 answers
DataTextField in a ListBox is a combination of 2 fields
I have a listbox containing Users.
The datasource is an generic list of the type User (contains, id, firstname, lastname, ...).
Now I want to use the id as datavalue (through dataValueField) and I want LastName + ' ' + Firstname as a…

user29964
- 15,740
- 21
- 56
- 63
2
votes
1 answer
Databind to object parameter that has one or more optional parameters
I have an object, called 'PERSON'
This person object has a title, firstName & Surname property as well as many other which are at the moment irrelevant. It also has a read only property called Fullname which concatenates the two or three parameters…

Kevin Dark
- 458
- 5
- 15
1
vote
4 answers
Listbox formatting using DataTextField property
I have a list box in my aspx page:

asma
- 2,795
- 13
- 60
- 87
1
vote
3 answers
Populate DataTextField with "Example Name | Example Number"
I have a SQL select statement and using the results I bind it to an asp dropdown.
String strQuery ="SELECT RTRIM(NAME), NUMBER . . ."
customerselect.DataTextField = "NAME+ ' | ' +NUMBER";
I need to display in the DataTextField:
Example Name |…

user3147424
- 3,022
- 5
- 19
- 22
1
vote
3 answers
How to show item in dropdownlist as being selected when we have corresponding datatextfield from gridview selected row
Code:
DataSet ds = _dalEquipmentwiseCheckList.getEquipmentName();
ddEquipmentName.DataSource = ds.Tables[0].DefaultView;
ddEquipmentName.DataTextField = ds.Tables[0].Columns[1].ToString();
ddEquipmentName.DataValueField =…

dhiraj
- 73
- 2
- 14
0
votes
0 answers
Add select option in DataText Field in dropdownlist
DataTable dtt = new DataTable();
adp = new SqlDataAdapter("Select ContractId,ContractNo From Contract Join Customer on Contract.Customer=Customer.CustomerId where Customer.EmailId='"+dropcustomer.SelectedValue+"' ",…
0
votes
3 answers
DropDownList DataTextField on Navigation property
i need some help with the following.
i get a list of objects from the Entity Framework data context.
var list = context.EntityA;
the EntityA is the main object (contains the primary key), but has a navigation property called "EntityALanguages",…

chris vietor
- 2,050
- 1
- 20
- 29
0
votes
2 answers
Dom insert the cursor into data text field
I'm a beginner to HTML DOM and what I want to achieve is focus textarea so that cursor will be placed in it to type.
0
votes
1 answer
How can extend AutoComplete to change dataSource and dataTextField dynamically in kendo?
how change datasource and dataTextField with extent autocomplete kendo when user enter number or text ? for example. I want when user enter id show name in dropdown list and when enter name show name .

andishjavan
- 31
- 6
0
votes
1 answer
Multiple class properties to display in listbox datatextfield
I'm currently trying to join two class properties inside an asp.net ListBox Control. I want to display the date then whether or not the appointment is AM/PM. Is this possible? Thank
Chris
Dim lstAppointments As List(Of AppointmentSlotInfo) = New…

chrisblue13
- 263
- 3
- 18
0
votes
0 answers
Can I use a specific dictionary key as a DataTextField if that dictionary is a property of my datasource?
Rough class schema:
public class Entity
{
public Guid ID;
public Dictionary Attributes;
}
Attributes has the following keys: listname (string), membercount(integer), type (boolean).
I have a Telerik RadComboBox which is…

Nzall
- 3,439
- 5
- 29
- 59
0
votes
2 answers
DataTextField from field's property
I have class something like
public class A
{
public string name;
}
public class B
{
public int Id;
public A obj;
}
Then, I have ASP.NET WebForms application and page with ListBox control.
I want to set List as DataSource of ListBox.…

Max Zhukov
- 877
- 1
- 8
- 32