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

Column Cell Template

6 Answers 239 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Oscar Zapata
Top achievements
Rank 1
Oscar Zapata asked on 05 Jul 2010, 02:42 AM
Hi:
I need to design a cell template only for one column of the radgridview, How can do that? and
the cell template change depending the value of other column of the radgridview (in code behind).

please help me!
my Best Wishes
Oscar Zapata.
 

6 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 05 Jul 2010, 06:22 AM
Hello Oscar Zapata,

Plese have a look at this online demo. There is source code available as well.

Regards,
Pavel Pavlov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Daniel Meland
Top achievements
Rank 1
answered on 25 Aug 2010, 02:33 PM
This does not answer the question...
0
Veselin Vasilev
Telerik team
answered on 25 Aug 2010, 02:40 PM
Hello Daniel Meland,

The demo shows how a different DataTemplate can be applied to a cell depending on some conditions.
That is what you need - a CellTemplateSelector which chooses the correct template for the cell based on your custom logic.

I suggest that you check the online help articles which describe that in details:

I hope this helps.

Best wishes,
Veselin Vasilev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Daniel Meland
Top achievements
Rank 1
answered on 25 Aug 2010, 03:16 PM
OOps.

I just want the templated element so I can set its value at run time.

This only show s XAML, which is not code behind.
Thx
0
Veselin Vasilev
Telerik team
answered on 25 Aug 2010, 03:22 PM
Hello Daniel Meland,

Can you please describe in more detail your scenario so we can prepare a sample project for you?

Best wishes,
Veselin Vasilev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Daniel Meland
Top achievements
Rank 1
answered on 25 Aug 2010, 03:46 PM

THx for the reply

 

I Know this is simpler than I am making it, sry to take the time.

 

I have

                <telerik:GridViewColumn   >

                    <telerik:GridViewColumn.CellTemplate>

                        <DataTemplate>

                            <Image  Loaded="OnImageLoaded"  Name="Flag" ></Image>

                        </DataTemplate>

                    </telerik:GridViewColumn.CellTemplate>

                </telerik:GridViewColumn>

 

 

I want to set the Image.Source in the code behind at runtime.

 

Thx

 

Tags
GridView
Asked by
Oscar Zapata
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Daniel Meland
Top achievements
Rank 1
Veselin Vasilev
Telerik team
Share this question
or