Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
201 views
Hi everybody,

i am customizing the AlertTemplate of my RadWindowManager.
I have some trouble with the button inside the template.
While using an asp:button without any problems i always get an error when i change the asp:button with a radbutton-control.
The errormessage says:

"Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request. "

In detail:

"[InvalidOperationException: Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.]
   Telerik.Web.UI.ScriptRegistrar.GetScriptManager(Control control) +157
   Telerik.Web.UI.RadWebControl.get_ScriptManager() +16
   Telerik.Web.UI.RadWebControl.RegisterScriptDescriptors() +26
   Telerik.Web.UI.RadWebControl.Render(HtmlTextWriter writer) +84
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Control.Render(HtmlTextWriter writer) +10
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   Telerik.Web.UI.RadWindowManager.GetTemplateContent(String templateName) +152
   Telerik.Web.UI.RadWindowManager.ControlPreRender() +318
   Telerik.Web.UI.RadWebControl.OnPreRender(EventArgs e) +22
   System.Web.UI.Control.PreRenderRecursiveInternal() +80
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
"

Is this behavior by design? Can i use radbutton in the templates of RadWindowManager?

greetings, Philipp
Georgi Tunev
Telerik team
 answered on 12 May 2011
1 answer
105 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
217 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
71 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
116 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
73 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
131 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
292 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
80 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
117 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?