Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
96 views
I have a grid which is working exactly as I want apart from one slight annoyance which I can't seem to fix.

My grid has a paging turned on and a page size of 25. In my example, my grid has 566 pages.

I have also allowed grouping on the grid so users can drag the column header to the grouping bar.

When a user creates a group and the number of rows for that group exceeds my page size, then a message shows saying...

"Group: x (showing y of z items. Group continues on the next page)"

However, I have a group which has 36 items in and, by chance, the first 11 of these fall on one page and the remaining 25 on the next.

On the first page for this group (which happens to be page 3 of my grid), the group header message reads...

"Group: x (showing 11 of 36 items. Group continues on the next page)"

but on the second page (page 4 of my grid) the group header message reads...

 "Group: x (... group continued from the previous page. Showing 0 of 36 items."

Surely this should read...

 "Group: x (... group continued from the previous page. Showing 25 of 36 items."

Is this a known bug or am I missing something?
Vasil
Telerik team
 answered on 01 Dec 2010
3 answers
24 views
+
Hi everyone,

I have a RadGrid which i am builind up from xml in my code behind. The problem is that when sorting the 'date created' column, the grid sorts the fields as if it were a string. For example 01/03/10 would come before 02/03/05.

Here is the code:

 

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">

 

 

<telerik:RadGrid ID="rgHistory" ItemStyle-Font-Size="10px" AlternatingItemStyle-Font-Size="10px"

 

 

HeaderStyle-Font-Size="10px" runat="server" AllowSorting="True"

 

 

Skin="WebBlue" Width="895px" AutoGenerateColumns="false">

 

 

<AlternatingItemStyle Font-Size="10px" />

 

 

<ItemStyle Font-Size="10px" />

 

 

<MasterTableView TableLayout="Fixed" Width="100%">

 

 

<Columns>

 

 

<telerik:GridDateTimeColumn DataField="Created Date" DataType="System.DateTime" DataFormatString="{0:dd/MM/yyyy}" HeaderStyle-Width="50px" HeaderText="Created Date"

 

 

UniqueName="Created Date" >

 

 

<HeaderStyle Width="52px" />

 

 

</telerik:GridDateTimeColumn>

 

 

<telerik:GridBoundColumn DataField="Details" HeaderStyle-Width="360px" HeaderText="Details"

 

 

UniqueName="Details">

 

 

<HeaderStyle Width="360px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Handler" HeaderStyle-Width="75px" HeaderText="Handler"

 

 

UniqueName="Handler">

 

 

<HeaderStyle Width="75px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Action Type" HeaderStyle-Width="40px" HeaderText="Action Type"

 

 

UniqueName="Action Type">

 

 

<HeaderStyle Width="39px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Corr Type" HeaderStyle-Width="40px" HeaderText="Corr Type"

 

 

UniqueName="Corr Type">

 

 

<HeaderStyle Width="39px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Cost Code" HeaderStyle-Width="80px" HeaderText="Cost Code"

 

 

UniqueName="Cost Code">

 

 

<HeaderStyle Width="80px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="No of Units" HeaderStyle-Width="40px" HeaderText="No of Units"

 

 

UniqueName="No of Units">

 

 

<HeaderStyle Width="39px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Cost Value" HeaderStyle-Width="40px" HeaderText="Cost Value"

 

 

UniqueName="Cost Value">

 

 

<HeaderStyle Width="39px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Completed Date" HeaderStyle-Width="50px" HeaderText="Completed Date"

 

 

UniqueName="Completed Date">

 

 

<HeaderStyle Width="52px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Cost Desc" HeaderStyle-Width="80px" HeaderText="Cost Desc"

 

 

UniqueName="Cost Desc">

 

 

<HeaderStyle Width="80px" />

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

<RowIndicatorColumn>

 

 

<HeaderStyle Width="20px" />

 

 

</RowIndicatorColumn>

 

 

<ExpandCollapseColumn>

 

 

<HeaderStyle Width="20px" />

 

 

</ExpandCollapseColumn>

 

 

</MasterTableView>

 

 

<HeaderStyle Font-Size="10px" />

 

 

</telerik:RadGrid>

 

 

</telerik:RadAjaxPanel>

 


The grid is bound to a datatable:

 

Dim table As DataTable

 

table =

New DataTable("History")

 

 

Dim rCreatedDate As DataColumn = New DataColumn("Created Date")

 

rCreatedDate.DataType = System.Type.GetType(

"System.DateTime")

 

table.Columns.Add(rCreatedDate)

 

Dim rDetails As DataColumn = New DataColumn("Details")

 

rCreatedDate.DataType = System.Type.GetType(

"System.String")

 

table.Columns.Add(rDetails)

 

Dim rHandler As DataColumn = New DataColumn("Handler")

 

rCreatedDate.DataType = System.Type.GetType(

"System.String")

 

table.Columns.Add(rHandler)

 

Dim rActionType As DataColumn = New DataColumn("Action Type")

 

rCreatedDate.DataType = System.Type.GetType(

"System.String")

 

table.Columns.Add(rActionType)

 

Dim rCorrType As DataColumn = New DataColumn("Corr Type")

 

rCreatedDate.DataType = System.Type.GetType(

"System.String")

 

table.Columns.Add(rCorrType)

 

Dim rCostCode As DataColumn = New DataColumn("Cost Code")

 

rCreatedDate.DataType = System.Type.GetType(

"System.String")

 

table.Columns.Add(rCostCode)

 

Dim rCostNoUnits As DataColumn = New DataColumn("No of Units")

 

rCreatedDate.DataType = System.Type.GetType(

"System.String")

 

table.Columns.Add(rCostNoUnits)

 

Dim rCostValue As DataColumn = New DataColumn("Cost Value")

 

rCreatedDate.DataType = System.Type.GetType(

"System.String")

 

table.Columns.Add(rCostValue)

 

Dim rCompletedDate As DataColumn = New DataColumn("Completed Date")

 

rCreatedDate.DataType = System.Type.GetType(

"System.String")

 

table.Columns.Add(rCompletedDate)

 

Dim rCostDescription As DataColumn = New DataColumn("Cost Desc")

 

rCreatedDate.DataType = System.Type.GetType(

"System.String")

 

table.Columns.Add(rCostDescription)

 

 

newRow.Item(

"Created Date") = historyItem.SelectSingleNode("following-sibling::history.created_date").InnerText

 

newRow.Item(

"Details") = historyItem.SelectSingleNode("following-sibling::history.details").InnerText

 

newRow.Item(

"Handler") = historyItem.SelectSingleNode("following-sibling::history.handler").InnerText

 

newRow.Item(

"Action Type") = historyItem.SelectSingleNode("following-sibling::history.action_type").InnerText

 

newRow.Item(

"Corr Type") = historyItem.SelectSingleNode("following-sibling::history.corr_type").InnerText

 

newRow.Item(

"Cost Code") = historyItem.SelectSingleNode("following-sibling::history.cost_code").InnerText

 

newRow.Item(

"No of Units") = historyItem.SelectSingleNode("following-sibling::history.cost_no_units").InnerText

 

newRow.Item(

"Cost Value") = historyItem.SelectSingleNode("following-sibling::history.cost_value").InnerText

 

newRow.Item(

"Completed Date") = historyItem.SelectSingleNode("following-sibling::history.completed_date").InnerText

 

newRow.Item(

"Cost Desc") = historyItem.SelectSingleNode("following-sibling::history.cost-description").InnerText

 

table.Rows.Add(newRow)


 

Dim grid As RadGrid

 

grid = Page.FindControl(

"rgHistory")

 

grid.DataSource = table

grid.DataBind()


------------------------------------------------------------------------------------------

Any help would be great.

Thanks
Pavlina
Telerik team
 answered on 01 Dec 2010
3 answers
183 views
I have a RadGrid which has a GridButtonColumn.  Until recently when clicking on the button image in the grid, the ItemCommand event was firing as expected and I was being redirected to another page as specified in the code behind.  As of yesterday, nothing happens when clicking on the button image in the grid though no code changes have occurred.

The ItemCommand event for the grid does fire when filtering or sorting columns in the grid, just not when clicking on the image button.

Here's the code in the aspx page for the first part of the RadGrid and the GridButtonColumn...
<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" AllowFilteringByColumn="true" AllowPaging="True" AutoGenerateColumns="False" Skin="tds" EnableEmbeddedSkins="false" AllowSorting="True" EnableLinqExpressions="false" >
    <MasterTableView HeaderStyle-HorizontalAlign="Center" dataKeyNames="intItemID, intItemTypeID" TableLayout="Fixed">
        <PagerStyle Mode="NextPrevNumericAndAdvanced" AlwaysVisible="true" Position="TopAndBottom" />
        <Columns>
            <%--Review--%>
            <telerik:GridButtonColumn UniqueName="btnReview" Text="Review" ButtonType="ImageButton" ImageUrl="/TestDevelopment/images/review.png" CommandName="review" HeaderStyle-Width="40px">
            </telerik:GridButtonColumn>

I am able to see the button and the image is the one specified in the 'ImageURL'.

Here is the code in the .vb page for the ItemCommand event, note I've commented out the code that would appear in the 'If' statement with just a comment line for security/privacy reasons:
Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand
        If e.CommandName = "review" Then
                  //redirect page here
                End If
End Sub

In debug mode, I have a breakpoint on the 'If' line in the ItemCommand and when sorting or filtering on the grid the breakpoint is hit.  However, when clicking on the image button in the grid the breakpoint is never hit.

Could someone provide any suggestions as to what may have caused this?
Thanks!
Pavlina
Telerik team
 answered on 01 Dec 2010
1 answer
94 views
Hi,

Is there a way to sort custom FileExplorer columns? Preferably client side?
The sever side fileExplorer.Grid.SortCommand event doesn't fire, either for pre-defined or custom columns.

Is there a way to use a custom sort order for the pre-defined columns 'Name'?
Preferably I would like a "natural" sort order, e.g. file1, file2, file12
FileExplorer sorts this as file1, file12, file2

Best regards,
Andreas
Fiko
Telerik team
 answered on 01 Dec 2010
2 answers
46 views
I see Editor.css file though. Has the file been renamed to Editor.css ? I need to set default font and font size for the Editor. Do I need to make those changes in Editor.css file ?I am using  RadControls for ASP.NET AJAX Q2 2010
Rumen
Telerik team
 answered on 01 Dec 2010
1 answer
94 views
Hi,

I get Microsoft JScript runtime error: 'attributes' is null or not an object when I add more than 3 item in my radmenuitem. I am adding it dynamically creating new radmenuitem("Myvalues"). I have my custom skin as said in below url to match my site theme

http://www.telerik.com/help/aspnet-ajax/menu_appearancecreatingacustomskin.html

Can you please let me know the possible errors.

Thanks
Bino
Princy
Top achievements
Rank 2
 answered on 01 Dec 2010
2 answers
85 views
Hello,

I am using Grid ... when I click Export to Excel in a blank grid, paging controls are getting displayed

Is there anyways to avoid this?!

Raj
Pavlina
Telerik team
 answered on 01 Dec 2010
1 answer
31 views
Hi All,

I am implementing a RadGrid without paging. What is the webservice signature for this case?
I researched the documentation and found how to do this with paging enabled, but it does not say anything about not having paging.

Thanks,
E.
Iana Tsolova
Telerik team
 answered on 01 Dec 2010
4 answers
95 views
Hello All,

I searched the forum but could not find the answers to the following questions...

1.
LoadXMLString is used to load the treeView controls discussed below.
On a web page with three treeView controls, some elements (branch or leaf) have a link and a ToolTip.
When I right-click the element and create a bookmark, the name of the bookmark is using the text in the ToolTip rather than the label on the element, e.g. if the label's Text attribute in XML is ABC and the Tooltip is 123, the bookmark created will have 123 as the name instead of ABC.

Is there a way to configure the tree to use the Text instead of the Tooltip?

2.
Here is a sample of the XML used to load one of the trees:
<Node H="10.00.00.00" NavigateUrl="~/Default.aspx?ID=10.00.00.00" 
Target="_blank" Text="Energy (551)" Image="./Images/2_1.gif" 
Tooltip="Energy">
<Node H="10.10.00.00" Text="Energy">

As you may notice, the second node does not have a NavigateUrl tag, yet it still shows as a link in the tree i.e. when I hover the mouse over the label, the pointer changes to a hand and the text becomes underlined. Of course, when clicking on it, nothing happens.

Is there a way of preventing elements from showing as a hyperlink when NavigateUrl is null?

Thank you.
Sorin
Peter
Telerik team
 answered on 01 Dec 2010
1 answer
105 views
Hi,

I'm building my own custom "toolbar" (it's not a RadToolBar) on a page containing a FileExplorer, amongst other things. From that custom toolbar, I'd like to invoke some of the built in commands in FileExplorer.

So, as an example, when clicking my own custom "New Folder" button, it does the exact same thing as the New Folder toolbar button does in FileExplorer: Opens up the FileExplorers _own_ 'New Folder' dialog.

I would like to be able to do this for 'New Folder', 'Delete', 'Upload', and the rest of the built in commands in FileExplorer.

It it doable?

Thank you,
Best regards,
Andreas



Fiko
Telerik team
 answered on 01 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?