Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
106 views
Hello,

i'm using a treeview with hierachical data binding,
when i'm expanding a node with hundred children in IE, i must wait five seconds but with the same page in the same condition in firefox is instant.

I use Firefox 4 and IE 8 with Windows XP
Eddy
Top achievements
Rank 1
 answered on 12 May 2011
1 answer
222 views
I have the following code in place on a RadGrid. I need to be able to access the ddColumns dropdown HTML element from Javascript.and get the selected value from the dropdown list. Can anyone give me an example of how to do this?

<telerik:RadGrid ID="rgSchedules" Width="100%" CssClass="centergrid" runat="server" ShowFooter="true"
                        OnItemDataBound="rgNettingProductSchedules_ItemDataBound" OnDetailTableDataBind="rgNettingProductSchedules_DetailTableDataBind"
                        OnSortCommand="rgNettingProductSchedules_SortCommand" OnItemCommand="rgNettingProductSchedules_ItemCommand" AllowSorting="false"
                        SortingSettings-SortedBackColor="ControlDark" AllowFilteringByColumn="false" AllowPaging="false" AllowMultiRowSelection="true">
                        <%-- OnDataBound="rgSchedules_DataBound" --%>
                        <GroupingSettings CaseSensitive="false" />
                        <ClientSettings>
                            <ClientEvents OnHierarchyExpanded="RowExpanded" />                            
                            <Selecting AllowRowSelect="true" />
                            <Selecting EnableDragToSelectRows="false" />
                        </ClientSettings>
                        <MasterTableView Name="Scheduling" DataKeyNames="Id" AllowMultiColumnSorting="false" AllowNaturalSort="true" AllowPaging="false"
                            HierarchyLoadMode="Client" AllowFilteringByColumn="false" AutoGenerateColumns="false" CommandItemDisplay="Top" CommandItemStyle-Height="30px">
                            <CommandItemTemplate>
                                <table width="100%" >
                                    <tr>
                                        <td align="left" >
                                            <%--<a href="javascript:void(0);" onclick="javascript:BeginIndexCollection();">--%>
                                            <a href="javascript:void(0);" onclick="javascript:InitGroupEdit();">
                                            <asp:Image ID="Image3" runat="server" style="padding: 0px 5px 0px 5px; border: none;" ImageUrl="~/_assets/images/Edit.gif" />
                                                Group Schedule Edit
                                            </a>
                                            &nbsp;&nbsp;&nbsp;
                                           <a href="javascript:void(0);" onclick="javascript:BeginShiftIndexCollection();">
                                            <asp:Image ID="Image4" runat="server" style="padding: 0px 5px 0px 5px; border: none;" ImageUrl="~/_assets/images/Edit.gif" />
                                                Group Shift Edit
                                            </a>
                                        </td>
                                        <td align="left">
                                            <asp:Label ID="lblColumn" runat="server" style="color:White" Text="Show/Hide Columns"></asp:Label>
                                             <asp:DropDownList ID="ddColumns" onchange="ShowHideColumn()" runat="server">
                                                <asp:ListItem Selected="True" Value="SelectOne" Text="Select One" />
                                                <asp:ListItem Value="Alloy" Text="Alloy" />
                                                <asp:ListItem Value="PlannedCasts" Text="Planned Casts" />
                                                <asp:ListItem Value="PlannedCastsLbs" Text="Planned Casts Lbs" />
                                                <asp:ListItem Value="PlannedGoodLbs" Text="Planned Good Lbs" />
                                                <asp:ListItem Value="ActualCast" Text="Actual Cast"/>
                                                <asp:ListItem Value="ActualCastLbs" Text="Actual Cast Lbs" />
                                                <asp:ListItem Value="ActualGoodLbs" Text="Actual Good Lbs" />
                                                <asp:ListItem Value="Scenario" Text="Scenario" />
                                            </asp:DropDownList>
                                        </td>
                                    </tr>                            
                                </table>                        
                            </CommandItemTemplate>


function ShowHideColumn() {
                var radGrid = GetProductGrid();
                var dd = document.getElementById("ddColumns");
                alert(dd);

                var table = radGrid.get_masterTableView();
                var column = table.getColumnByUniqueName("Alloy");
                
                if (column.style.display = "none")
                    column.style.display = "";
                else
                    column.style.display = "none";
            }        
Princy
Top achievements
Rank 2
 answered on 12 May 2011
1 answer
73 views
Hi,

I am evaluating Telerik Grid for a commercial application, and have a need to do some custom formatting on some cells. The scenario is that one of the columns would have data such as "John Smith - 1234" and I would like to display only "John Smith". The caveat is that if the user chooses to group by the column, I need the grouping to be done according to "John Smith - 1234".

In situations where there is a "John Smith - 1234" and a "John Smith - 5678", they would both display as "John Smith" in the grid, but if I group by the column they would be separate groups.

Is that supported by Telerik Grid? I could not find relevant documentation or examples.

Thank you,
Nicolas
Martin
Telerik team
 answered on 12 May 2011
1 answer
127 views
Folks,

Environment: RadControls for ajax 2011 v1 with VStudio 2010. I am using below link as a prototype.

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/detailtabledatabind/defaultcs.aspx

I know there is a Telerik tutorial to hide the (expand/collapse) if no child rows. But my intention is to hide the expand/collapse if no child rows or Customer name starts with 'AN' or 'BL' in GridDataitem.

Thanks

gc_0620
Jayesh Goyani
Top achievements
Rank 2
 answered on 12 May 2011
2 answers
78 views
Hello,

 I have a grid. In which one of the column header I have added image in ItemDataBound event.

I observed that the image is added next to text.

Is it possible to change the location of image within column header ?

Also I wish to have more control on the space and alignment of the image ? 
Shinu
Top achievements
Rank 2
 answered on 12 May 2011
4 answers
143 views
Hi,

   I am using RadGrid ,an d i have given ClientselectColumn for multiselect.
From the server side am using following code

string

 

script = string.Empty;

 

 

script = script +

"selected = new Array();";

 

 

 

foreach (int id in lstselectedIDS)

 

 

{

 

script = script +

"selected.push(\"" + id + "\");";

 

 

}

 

script +=

"SetSelectedRowCount();";

 

 

 

base.AddStartupScript(script);

from the client side am taking the elements in the selected array and making the selection in Rowcreated event  like this

 

 

function

 

Grid_RowCreated(sender, args) {

 

 

 

 

var _Id = args.getDataKeyValue(sender.get_masterTableView().get_name());

 

 

 

 

if (selected.contains(_Id)) {

 

 

args.get_gridDataItem().set_selected(

 

true);

 

 

}
}

Because of this when ever i click on Check box for deselecting it is happening correctly. But if i click again for selecting it it is not happening properly. I need click checkbox 2 times for making a selection.

This is happening only for the selected rows.

If i use server side selection in ItemdataBoud Event, am not getting this problem.
Like
e.Item.Selected=true;
But i need to use the former one

And also am facing this problem in  many screens,please help me by giving the solution as soon as possible.


Thanks,
John

john
Top achievements
Rank 1
 answered on 12 May 2011
5 answers
295 views
In the legacy TreeView, you could set the NavigateUrl and Target properties on a Node.  When used in conjunction with the RadSplitter, you could load content into a specific RadPane by using these settings on a Node  This appears to be broken in the just-released Q3 version.

For example, in this example, when you click on one of the TreeViewNodes, the entire page gets replaced by the NavigateURL setting.  You would expect that the content gets directed into the Content pane.

<

telerik:RadSplitter ID="RadSplitter1" runat="server" Orientation="Vertical" Width="700" Height="500">

<telerik:RadPane ID="Tree" runat="server" Width="30%">

<telerik:RadTreeView ID="RadTreeView1" runat="server">

<Nodes>

<telerik:RadTreeNode runat="server" Target="Content" Text="MSDN" NavigateUrl="http://msdn.microsoft.com"></telerik:RadTreeNode>

<telerik:RadTreeNode runat="server" NavigateUrl="http://www.google.com" Target="Content"

Text="Google">

</telerik:RadTreeNode>

</Nodes>

</telerik:RadTreeView>

</telerik:RadPane>

<telerik:RadSplitBar runat="server" />

<telerik:RadPane ID="Content" runat="server" ContentUrl="about:blank" Width="70%">

</telerik:RadPane>

</telerik:RadSplitter>

I'll open a case.

Mac P
Top achievements
Rank 1
 answered on 12 May 2011
1 answer
88 views
Hi

How can I format date in auto generated column? Can someone point me to the right direction?

Thanks In advance
Shabbir.
Gimmik
Top achievements
Rank 1
 answered on 12 May 2011
1 answer
120 views
I am building a custom content provider to allow FileExplorer to use RackSpace CloudFiles.  So far, I've been able to get it to list directories and contents flawlessly.  However, there seems to be an issue uploading and deleting files (objects).

In my provider class I have the required "DeleteFile" method (really you guys should have a Interface to implement, NOT a class to inherit) however the DeleteFile method is never called when deleting, same goes for the StoreFile method when uploading.

Instead I get the following error: The selected file could not be deleted because the application did not have enough permissions.  Please contact system administrator

I have checked and the Delete and Upload paths are set correctly, and ViewState is turned on as well, but no matter what I do, the FileExplorer never actually calls the Content Provider methods...

ISSUE SOLUTION:
The solution is pretty simple... I did not have an overriding method in my provider for "CheckDeletePermissions" method.  Unfortunately because these providers are setup to Inherit a base provider instead of Implementing an Interface there is nothing to "force" me as a programmer to implement all MANDATORY overrides... I guess it's a matter of preference but I enjoy using Interfaces, they do a great job of enforcing correct programming for providers.

At at any rate, I have implemented this override method and not instead of calling the base provider class for Deleting it's calling the customer provider on delete instead.  I will also assume that overriding "CheckWritePermissions" will also take care of my uploading issue.

Happy Coding, good luck to the rest of you.
Mitch
Top achievements
Rank 1
 answered on 11 May 2011
1 answer
244 views
I have a radGrid which displays a couple of GridBoundColumns representing decimal data fields in editmode as a Percentage = DataFormatString="{p:0}", but if I go to edit one of these and click update I generate the following error, since the other textbox is displaying with "  %"  in the value, ..

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Input string was not in a correct format.

How can I have my cake and eat it too? I want to Display percentages as whole numbers and edit them the same way?
grid is named rdAsset

 

 

<

 

telerik:GridBoundColumn DataField="Target" DataType="System.Decimal" DataFormatString="{0:p2}"  HeaderText="Target%" SortExpression="Target" UniqueName="Target">

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="TargetRange" DataType="System.Decimal" DataFormatString="{0:p2}"

 

 

 

HeaderText="Target Range%" SortExpression="TargetRange" UniqueName="TargetRange">

 

 

</telerik:GridBoundColumn>

 

 

 

 

In the code behind, I have...

 

 

 

protected void rdAsset_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)

 

 

{

 

 

if (e.Item is GridEditableItem && (e.Item as GridEditableItem).IsInEditMode )

 

 

{

 

 

GridEditFormItem item = e.Item as GridEditFormItem;

 

 

 

TextBox target = item["Target"].Controls[0] as TextBox;

 

 

target.Text =

String.Format("{0:p2}", (item.DataItem as DataRowView).Row["Target"]);

 

 

 

TextBox targetRange = item["TargetRange"].Controls[0] as TextBox;

 

 

targetRange.Text =

String.Format("{0:p2}", (item.DataItem as DataRowView).Row["TargetRange"]);

 

 

 

}

Gimmik
Top achievements
Rank 1
 answered on 11 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?