9 Answers, 1 is accepted
0
Hi Mahesh,
in c# it would be something like :
this.RadGridView.ShowColumnFooters = true;
Sincerely yours,
Pavel Pavlov
the Telerik team
in c# it would be something like :
this.RadGridView.ShowColumnFooters = true;
Sincerely yours,
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
MK
Top achievements
Rank 1
answered on 03 Aug 2010, 09:45 AM
Hi Pave,
Thanks
But i want to add one textblock in footer using C#. How can i do?
Thanks
But i want to add one textblock in footer using C#. How can i do?
0
Accepted
Hello,
Vlad
the Telerik team
Here is an example:
column.Footer = new TextBlock();
Vlad
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
Nicolas Wagener
Top achievements
Rank 1
answered on 26 Aug 2010, 12:25 PM
Hello,
Is it possible to put a TextBlock into the Footer ? I mean just a Texblock, not an aggregate function.
Like this :
I tried it without succeed.
Thank You.
Is it possible to put a TextBlock into the Footer ? I mean just a Texblock, not an aggregate function.
Like this :
TextBlock tbTest =
new
TextBlock() { Text=
"Test"
, Foreground =
new
SolidColorBrush(Colors.Red) };
RadGridView1.Columns[
"Name"
].Footer = tbTest;
//RadGridView1.Columns[0].Footer = tbTest;
I tried it without succeed.
Thank You.
0
Hi Nicolas Wagener,
Yes, that is correct. You just need to show the column footers by setting the ShowColumnFooters property of the gridview to True.
Also, make sure that when the code is executed the RadGridView1.Columns["Name"] is not null, e.g. the columns are already generated.
All the best,
Veselin Vasilev
the Telerik team
Yes, that is correct. You just need to show the column footers by setting the ShowColumnFooters property of the gridview to True.
Also, make sure that when the code is executed the RadGridView1.Columns["Name"] is not null, e.g. the columns are already generated.
All the best,
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
Nicolas Wagener
Top achievements
Rank 1
answered on 26 Aug 2010, 02:24 PM
Hello,
sorry but I'm probably missing something ...
here is some code snippets :
MainPage.xaml :
MainPage.cs :
When the button is clicked, my Column isn't "null" but nothing appears into the footers.
Thanks again for your help.
Nicolas.
sorry but I'm probably missing something ...
here is some code snippets :
MainPage.xaml :
<
Grid
x:Name
=
"LayoutRoot"
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"30"
/>
<
RowDefinition
/>
</
Grid.RowDefinitions
>
<
Button
Content
=
"Click me"
Click
=
"Button_Click"
/>
<
telerikGridView:RadGridView
x:Name
=
"RadGridView1"
ShowColumnFooters
=
"True"
Grid.Row
=
"1"
/>
</
Grid
>
MainPage.cs :
public
partial
class
MainPage : UserControl
{
public
MainPage()
{
InitializeComponent();
RadGridView1.ItemsSource = from i
in
Enumerable.Range(0, 10)
select
new
MyObject()
{
ID = i,
Name = String.Format(
"Name{0}"
, i)
};
}
private
void
Button_Click(
object
sender, RoutedEventArgs e)
{
TextBlock tbTest =
new
TextBlock() { Text=
"Test"
, Foreground =
new
SolidColorBrush(Colors.Red) };
GridViewColumnCollection dataColumn = RadGridView1.Columns;
// .ElementAt<GridViewDataColumn>(1); // ["Name"]
foreach
(GridViewColumn column
in
dataColumn)
{
if
(column !=
null
)
column.Footer = tbTest;
}
//var countFunction = new CountFunction();
//countFunction.FunctionName = "MyCountFunction";
//RadGridView1.Columns["ID"].AggregateFunctions.Add(countFunction);
//RadGridView1.Rebind();
//RadGridView1.Columns["Name"].Footer = RadGridView1.AggregateResults["MyCountFunction"];
}
}
public
class
MyObject
{
public
int
ID {
get
;
set
; }
public
string
Name {
get
;
set
; }
}
When the button is clicked, my Column isn't "null" but nothing appears into the footers.
Thanks again for your help.
Nicolas.
0
Hello Nicolas Wagener,
Please try this:
Best wishes,
Veselin Vasilev
the Telerik team
Please try this:
foreach
(GridViewColumn column
in
clubsGrid.Columns)
{
if
(column !=
null
)
column.Footer =
new
TextBlock()
{
Text =
"Test"
,
Foreground =
new
SolidColorBrush(Colors.Red)
};
}
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
Nicolas Wagener
Top achievements
Rank 1
answered on 26 Aug 2010, 03:04 PM
Sorry, no changes.
I run the last version of the binaries : RadControls for Silverlight Q2 2010 SP1.
Nicolas.
I run the last version of the binaries : RadControls for Silverlight Q2 2010 SP1.
Nicolas.
0
Hi Nicolas Wagener,
Hm, actually I executed that code in the DataLoaded event of the gridview. Trying it in button click did not change the footer. This probably is a bug so I am logging it in the PITS: Setting the Footer on Button_Click event does not work
I have updated your Telerik Points.
All the best,
Veselin Vasilev
the Telerik team
Hm, actually I executed that code in the DataLoaded event of the gridview. Trying it in button click did not change the footer. This probably is a bug so I am logging it in the PITS: Setting the Footer on Button_Click event does not work
I have updated your Telerik Points.
All the best,
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