5 Answers, 1 is accepted
0
Hello Reid,
You can access the text in the status bar as shown below:
or:
Please note that the StatusBar will be marked as obsolete in the next release of RadControls for ASP.NET AJAX which is expected tomorrow.
I recommend you use a CommandItemTemplate or GridFooterItem instead.
Command item template
Accessing the footer item on PreRender:
I hope that the provided information is helpful.
Best regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
You can access the text in the status bar as shown below:
protected void RadGrid1_PreRender(object sender, EventArgs e) |
{ |
RadGrid1.StatusBarSettings.ReadyText = "Total items: " + RadGrid1.Items.Count; |
} |
or:
GridStatusBarItem item = (GridStatusBarItem)RadGrid1.MasterTableView.GetItems(GridItemType.StatusBar)[0]; |
Please note that the StatusBar will be marked as obsolete in the next release of RadControls for ASP.NET AJAX which is expected tomorrow.
I recommend you use a CommandItemTemplate or GridFooterItem instead.
Command item template
Accessing the footer item on PreRender:
protected void RadGrid1_PreRender(object sender, EventArgs e) |
{ |
GridFooterItem item = (GridFooterItem)RadGrid1.MasterTableView.GetItems(GridItemType.Footer)[0]; |
item["yourColumn"].Text = "Total items: " + RadGrid1.Items.Count; |
} |
I hope that the provided information is helpful.
Best regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0

Reid
Top achievements
Rank 2
answered on 19 Feb 2009, 12:52 AM
Daniel,
Thanks for responding.
Point taken about grim future for the StatusBar. I do not understand the Column in the Footer? Do I need to create another column?
Thanks for responding.
Point taken about grim future for the StatusBar. I do not understand the Column in the Footer? Do I need to create another column?
0

Shinu
Top achievements
Rank 2
answered on 19 Feb 2009, 04:57 AM
Hi Reid,
You can access the footer of any column in your Grid's column collection using the column's UniqueName property.
ASPX:
CS:
Note: Set the ShowFooter property to true.
Thanks
Shinu
You can access the footer of any column in your Grid's column collection using the column's UniqueName property.
ASPX:
<Columns> |
<telerik:GridBoundColumn DataField="ProductName" UniqueName="ProductName" HeaderText="ProductName" ></telerik:GridBoundColumn> |
.............. |
</Columns> |
CS:
protected void RadGrid1_PreRender(object sender, EventArgs e) |
{ |
GridFooterItem item = (GridFooterItem)RadGrid1.MasterTableView.GetItems(GridItemType.Footer)[0]; |
item["ProductName"].Text = "Total items: " + RadGrid1.Items.Count; |
} |
Note: Set the ShowFooter property to true.
Thanks
Shinu
0

Reid
Top achievements
Rank 2
answered on 19 Feb 2009, 05:05 PM
Hello Shinu,
This grid is using an item template and the status text displays but only in the first column (an AutoGeneratedEdit column) when I use a column name in use. How can you make the message as wide as the grid, and wrap if need be?
Thanks
This grid is using an item template and the status text displays but only in the first column (an AutoGeneratedEdit column) when I use a column name in use. How can you make the message as wide as the grid, and wrap if need be?
Thanks
0

Shinu
Top achievements
Rank 2
answered on 20 Feb 2009, 04:57 AM
Hi,
Try adding a LiteralControl to the Grid to show the Status message and see whether it works.
CS:
Shinu
Try adding a LiteralControl to the Grid to show the Status message and see whether it works.
CS:
RadGrid1.Controls.Add(new LiteralControl(string.Format("<div style='color:Blue;text-align:center'>{0}</div>", "Status Text"))); |
Shinu