This is a migrated thread and some comments may be shown as answers.

ListTextFormatString in GridDropDownColumn

3 Answers 97 Views
Grid
This is a migrated thread and some comments may be shown as answers.
rachel
Top achievements
Rank 1
rachel asked on 25 Jan 2011, 03:26 PM
Hello,
i'm using with RadGrid for edit by EditMode="InPlace".
i have a GridDropDownColumn and the source of the combo is:
class MyData{int Id, string Description1, string Description2}
i want that every item in the combo will display Description1 + " " + Description2
i have tried to use with the  ListTextFormatString but i dont know how set to ListTextField two columns.
is it possible? or any solution?
thnaks.

3 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 28 Jan 2011, 10:58 AM
Hello rachel,

The ListTextFormat property is used to format the text of the DropDownControl displayed when the grid is on edit mode. If in regular mode you want to display the contanation of the Description1 + Description2 field values, I would suggest that you use GridCalculatedColumn. Find more about it below:

http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/columntypes/defaultcs.aspx
http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/calculatedcolumns/defaultcs.aspx

Greetings,
Iana
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
rachel
Top achievements
Rank 1
answered on 30 Jan 2011, 11:40 AM
i need it on edit mode !
i need that the combobox will display 2 fields as Text (desc1 + desc2).
0
Iana Tsolova
Telerik team
answered on 31 Jan 2011, 05:07 PM
Hi rachel,

In this case you can use GridTemplateColumn with RadComboBox in its EditItemTemplate. Then define the RadComboBox ItemTemplate as desired.

Refer to this demo for more information:
http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/templates/defaultcs.aspx

All the best,
Iana
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Grid
Asked by
rachel
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
rachel
Top achievements
Rank 1
Share this question
or