Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
111 views
             
<ClientSettings EnableRowHoverStyle="true"
                    <Selecting AllowRowSelect="True" /> 
</ClientSettings> 
I have a grid with the above client settings. The grid is placed in an AjaxPanel.

When user select one row and try to hit the Edit button, in the button click, I try to make the row editable as

rgvEmployeeCareer.MasterTableView.Items[rgvEmployeeCareer.SelectedIndexes[0]].Edit = true
BindGrid(); 




When the RadAjaxPanel EnableAJAX="False" it works fine. But when I set it to true, it gives me a javascript error 'Object reference not set...'

What is the issue?

Thanks
PraveenVenu
Iana Tsolova
Telerik team
 answered on 14 May 2009
1 answer
107 views
Hi,

If I use, grouping on a grid that's bind just paged data ( let's say 20 records)..
grouping is being affected on that 20 records. So is there any implementation that grouping regenerates main sql query so that
user sees grouped that thru all records.
 
EXAMPLE

radGrid1.datasource = sqlHelper.GetPagedData(between 10-30) //brings 20 records thru 10000 records
and let's say radGrid1 is grouped.
So what we see here is just grouped data in 20 records.
what we wanna see is grouped data in 10000 records.
is it possible? how?

ps: in all examples and demos all the data is binded to grid. In real life it never is like so.
Georgi Krustev
Telerik team
 answered on 14 May 2009
1 answer
101 views
Hi there!

I've run into a bit of a snag. I have a modal RadWindow that loads an aspx page containing just a user control. Inside that user control I have a button and I want to close the RadWindow when I press it. Any ideas how that could be accomplished?

Thanks,
Andrei
Georgi Tunev
Telerik team
 answered on 14 May 2009
1 answer
71 views
What I am would like to do is use a radwindow to return a Confirmation Number to the user. However I thought i would be able to do something similar to a tooltip. Put a table with the <windows> tag with the label that will return the number.

Is this possible... Here is the code of what I am trying to do. right now I just get the pop up but nothing updates on the label ?


 <telerik:RadWindow ID="rdwnConfNumb" runat="server" Behaviors="close, maximize" Skin="Mac" Modal="True">
            <windows>
            <telerik:RadWindow runat="server"   Width="325px"
            Height="385px">  
             <table>
            <tr>
            <td>
            <asp:Label ID="Label1" runat="server" Text="Confirmation Number: "></asp:Label>
            </td>
                <td>
                    <asp:Label ID="lblConfNumb" runat="server" Text=""></asp:Label>
                </td>
            </tr>
        </table>          
            </telerik:RadWindow>
            </windows>
    </telerik:RadWindow>

code behind:

 public void ShowConfirmNumber()
    {
        lblConfNumb.Text = _ConfirmNumber.ToString();     
        rdwnConfNumb.VisibleOnPageLoad  = true;
    }
Georgi Tunev
Telerik team
 answered on 14 May 2009
7 answers
454 views
Hi,

i have a problem wih RadGrid when exporting to excel.. The Problem occurs if three things are present:

1) inside the CommandItemTemplate there is a usercontrol
<CommandItemTemplate> 
       <uc2:test ID="Test1" runat="server" /> 
</CommandItemTemplate> 

2) inside the UserControl test.ascx there is another control from Prometheus, eg a RadTextbox

3) now when i have a ajaxified grid inside MS-UpdatePanel with UserControl in CommandItemTemplate and use
RadGrid1.ExportSettings.IgnorePaging = false
everything works ok.

But when i try to set to use
ExportSettings.IgnorePaging = true;

i will get an error

Script controls may not be registered after PreRender.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Script controls may not be registered after PreRender.

Source Error:

            Line 8:    <asp:LinkButton ID="btnExport" runat="server" CommandName="exportexcel" OnClick="btnExport_Click">LinkButton</asp:LinkButton>
Line 9: <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" GridLines="None"
Line 10: AllowPaging="True" AllowSorting="True" AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True"
Line 11: AllowMultiRowEdit="True" AllowMultiRowSelection="True" OnItemDataBound="RadGrid1_ItemDataBound"

Stack Trace:

[InvalidOperationException: Script controls may not be registered after PreRender.]
System.Web.UI.ScriptControlManager.RegisterScriptControl(TScriptControl scriptControl) +269
System.Web.UI.ScriptManager.RegisterScriptControl(TScriptControl scriptControl) +99
Telerik.Web.UI.RadWebControl.RegisterScriptControl() +26
Telerik.Web.UI.RadWebControl.OnPreRender(EventArgs e) +19
Telerik.Web.UI.RadInputControl.OnPreRender(EventArgs e) +10
System.Web.UI.Control.PreRenderRecursiveInternal() +86
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.AddedControl(Control control, Int32 index) +2115833
System.Web.UI.ControlCollection.Add(Control child) +146
System.Web.UI.Control.AddParsedSubObject(Object obj) +38
System.Web.UI.WebControls.TableCell.AddParsedSubObject(Object obj) +195
System.Web.UI.Control.System.Web.UI.IParserAccessor.AddParsedSubObject(Object obj) +7
ASP.gui3_parts_grids_dokugrid_org_ascx.__BuildControl__control6(Control __ctrl) in d:\01..Eigene Dateien\01..Projekte Develop\wwwroot\Quisa\gui3_parts\grids\dokugrid_org.ascx:9
System.Web.UI.CompiledTemplateBuilder.InstantiateIn(Control container) +12
Telerik.Web.UI.GridCommandItem.InitializeCommandItem() +97
Telerik.Web.UI.GridCommandItem.SetupItem(Boolean dataBind, Object dataItem, GridColumn[] columns, ControlCollection rows) +72
Telerik.Web.UI.GridTableView.CreateBottomCommandItem(Boolean useDataSource, GridColumn[] copiedColumnSet, GridTFoot tfoot) +109
Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +770
Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +481
System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +59
System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +111
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +29
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
Telerik.Web.UI.GridTableView.PerformSelect() +4
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
Telerik.Web.UI.GridTableView.DataBind() +298
Telerik.Web.UI.RadGrid.DataBind() +93
Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason) +181
Telerik.Web.UI.RadGrid.RebindForExport() +96
Telerik.Web.UI.Grid.Export.TableViewExporter.PrepareForExport() +210
Telerik.Web.UI.Grid.Export.TableViewExporter.ExcelExportRenderForm(HtmlTextWriter nullWriter, Control form) +84
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +98
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +59
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +68
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +37
Telerik.Web.UI.Grid.Export.TableViewExporter.ExcelExportRenderPage(HtmlTextWriter nullWriter, Control page) +102
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +98
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
System.Web.UI.Page.Render(HtmlTextWriter writer) +26
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2558

can you please have a look whats wrong here?

thanks!
achim

Sebastian
Telerik team
 answered on 14 May 2009
1 answer
89 views
I am using RadMultipage without tabstrip but whenever I tried to change the page it generates an error that property or method is not supported. I tried both selectPagebyindex and byId. The code is

 <form id="form1" runat="server">  
      
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
    </telerik:RadScriptManager> 
      
    <telerik:RadSplitter ID="RadSplitter1" Runat="server" Height="100%"   
        Orientation="Horizontal" Width="100%" Items-Capacity="4" SplitBarsSize="">  
        <telerik:RadPane ID="RadPane1" Runat="server" Height="15%" Width=""   
            EnableEmbeddedBaseStylesheet="False" EnableEmbeddedSkins="False" Index="0"   
            Skin="">  
            <table align="center" class="AdminTable" cellpadding="4" cellspacing="0" width="90%">  
        <tr> 
            <td class="AdminTitle" align="center">  
                <asp:Label ID="lblBuilding" runat="server" Text="Reports"></asp:Label> 
            </td> 
            <td class="AdminTitleDetail" align="left">  
                <asp:Label ID="lblInfo" runat="server" Text="Reporting provides the ability to generate reports from system metrics of devices, servers, and network infrastructure."></asp:Label> 
            </td> 
            <td class="AdminTitleDetail" align="center" width="160">  
                <asp:Button ID="btnApply" runat="server" Text="Apply" CssClass="AdminButton"   
                    Visible="False" /> 
            </td> 
        </tr> 
    </table> 
     <table class="AdminTable" border="0" cellpadding="0" cellspacing="0" align="center" width="90%">  
        <tr> 
            <td width="60px">  
                <img id="menu1" src="images/dashboardselected.jpg" class="AdminMenu" onmouseover="menuOver(this)" onmouseout="menuOut(this)" onclick="RadMultiPage1.SelectPageById('DeskTop');return(false)"></td> 
            <td> 
                <img id="menu2" src="images/camerasunselected.jpg" class="AdminMenu" onmouseover="menuOver(this)" onmouseout="menuOut(this)" onclick="RadMultiPage1.SelectPageById('CamerasHealth');return(false)"/></td> 
            <td> 
                <img id="menu3" src="images/devicesunselected.jpg" class="AdminMenu" onmouseover="menuOver(this)" onmouseout="menuOut(this)" onclick="RadMultiPage1.SelectPageById('DevicesHealth');return(false)"/></td> 
            <td> 
                <img id="menu4" src="images/serversunselected.jpg" class="AdminMenu" onmouseover="menuOver(this)" onmouseout="menuOut(this)" onclick="RadMultiPage1.SelectPageById('ServerHealth');return(false)"/></td> 
            <td> 
                <img id="menu5" src="images/storageunselected.jpg" class="AdminMenu" onmouseover="menuOver(this)" onmouseout="menuOut(this)" onclick="RadMultiPage1.SelectPageById('StorageHealth');return(false)"/></td> 
            <td> 
              <!--  <img id="menu6" src="images/reportingunselected.jpg" visible="false" class="AdminMenu" onmouseover="menuOver(this)" onmouseout="menuOut(this)" onclick="menuSelect(this)"/></td> --> 
              
            <td style="background-image: url(images/hdr_bg.jpg)" width="100%">  
                <input id="NavHidden" type="hidden" value="menu1" runat="server"/></td> 
            <td><img src="images/tabendrightblue.jpg" width="8px" height="20px"></td> 
        </tr> 
    </table> 
        </telerik:RadPane> 
        <telerik:RadPane ID="RadPane2" Runat="server" Height="85%" Locked="True"   
                Width="">  
            <telerik:RadMultiPage ID="RadMultiPage1"  Runat="server" Height="100%"   
                Width="100%">  
                <telerik:RadPageView ID="DeskTop" runat="server">  
                <table class="style1" border="0" cellpadding="0" cellspacing="0" align="center">  
            <tr> 
                <td align="center" valign="middle">  
                     
                    <asp:Image ID="imgCamera" runat="server" ImageUrl="Camera.gif"   
                         /> 
                     
                </td> 
                <td class="style3" align="center"    
                    style="background-image: url('images/grayline.JPG'); background-repeat: repeat-y">  
                   </td> 
                <td align="center">  
                    <asp:Image ID="imgServer" runat="server" ImageUrl="Server.gif" style="  margin-left:12px; margin-bottom:12px;"  /> 
                </td> 
            </tr> 
            <tr> 
                <td class="style4"style="background-image: url('images/hgreyline.JPG'); background-repeat: repeat-x">   
                    &nbsp;</td> 
                <td class="style3"align="center"    
                    style="background-image: url('images/grayline.JPG'); background-repeat: repeat-y">  
                    </td> 
                <td class="style4"style="background-image: url('images/hgreyline.JPG'); background-repeat: repeat-x">   
                    </td> 
            </tr> 
            <tr> 
                 <td align="center" valign="middle">   
                     <asp:Image ID="imgDevice" runat="server" ImageUrl="Device.gif"  /> 
                   
                 </td> 
                 <td class="style3" align="center"   
                    style="background-image: url('images/grayline.JPG'); background-repeat: repeat-y">   
                     </td> 
                 <td align="center" valign="middle">  
                     <asp:Image ID="imgStorage" runat="server" ImageUrl="Storage.gif"  /> 
                 </td> 
            </tr> 
        </table> 
                </telerik:RadPageView> 
                 <telerik:RadPageView ID="CamerasHealth" runat="server"></telerik:RadPageView> 
                  <telerik:RadPageView ID="DevicesHealth" runat="server"></telerik:RadPageView> 
                  <telerik:RadPageView ID="ServerHealth" runat="server"></telerik:RadPageView> 
                   <telerik:RadPageView ID="StorageHealth" runat="server"></telerik:RadPageView> 
            </telerik:RadMultiPage> 
        </telerik:RadPane> 
    </telerik:RadSplitter> 
       
    </form> 

I will appreciate if anyone can help me
Alex Lawson
Top achievements
Rank 1
 answered on 14 May 2009
5 answers
117 views
Assume a usercontrol has a manager proxy.  In one case I'll use the UC on a content page under a master page, and in another case I'll use the UC on a standalone page.  I want it to behave the same regardless of the container.

My basic question is, how do we ensure that the Proxy is wired to the container Manager regardless of what the container is?

When we use mgr=RadAjaxManager.GetCurrent(this.Page) , it returns a Manager, but the UC is coded to operate on it's local Proxy.

If RadControls "automatically" wires a Manager to all nested proxies, does this happen in the Render event?  I just want to make sure that when I manipulate the proxy in Load or PreRender for example, that the settings are respected by the top-level manager wherever it happens to be.  If this requires the UC to selectively get a handle to the Manager or the Proxy, depending on who the container is, so be it.  I just need to know the rules.

In a more complex example, what if a usercontrol is nested in another UC?  I would hope that the lowest-level proxy can manage it's own controls rather than having to get a reference to the container proxy so that it can wire itself up.  This brings up two more questions:
  If a UC is in a UC, does the nested UC need to be in a panel?
  Does the container need to set a trigger for the child UC to trigger itself?

All of the docs/examples on this topic use the most basic scenarios.  I've never seen anything complex or covering numerous scenarios in the same project.  Is there complete flow documentation somewhere, even some internal doc at Telerik, a spec or something that Support people use to remind themselves how the product should be behaving?  I think a doc like this will help everyone with questions about this to easily understand the expected behavior.  I'm not looking for handouts of code samples, just a reference to complete documentation would be enough.

TIA
Iana Tsolova
Telerik team
 answered on 14 May 2009
1 answer
217 views
Hi
I have a grid control which uses a template for the editing/inserting. In my template, I have my own user control which has a property which is usually databound.
When inserting by pressing the insert command in the grid command item template, I look out for the InitInsertCommandName, and create some default values for the insert template, like so:

protected void radApprovers_ItemCommand(object source, GridCommandEventArgs e)
       {
            if (e.CommandName == RadGrid.InitInsertCommandName)
            {
                // Cancel the default operation
                e.Canceled = true;
                //Prepare an IDictionary with the predefined values
                System.Collections.Specialized.ListDictionary newValues = new System.Collections.Specialized.ListDictionary();
                newValues["company_id"] = cmbCompaniesFilter.SelectedCompanyId;         
                //Insert the item and rebind
                e.Item.OwnerTableView.InsertItem(newValues);
            }
}

As you can see, I'm setting the default values for the column company_id. Here's the problem:
I want to put the grid into insert mode dynamically (which I'm doing through a page url request variable). I'm using the following code to do so:

System.Collections.Specialized.ListDictionary newValues = new System.Collections.Specialized.ListDictionary();
 newValues["account_id"] = SessionManager.GetAccountId(this);
newValues["company_id"] = cmbCompaniesFilter.SelectedCompanyId;
gridApprovers.MasterTableView.IsItemInserted = true;
gridApprovers.MasterTableView.InsertItem(newValues);

The problem is that when I call InsertItem(newValues) I get the following error:
"Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.". I have to set a value here, otherwise it tries to bind a DBNull to an integer property, which will raise a "Specified cast is not valid" error when it binds.

Can you please tell me how I can go about dynamically creating databinding values when dynamically setting the grid into Insert mode?
Thanks


Tsvetoslav
Telerik team
 answered on 14 May 2009
2 answers
89 views
Hello,

I have a grid on my page that with the AllowMultiRowEdit set to true. I create the columns through code. I would like to have one of the columns to have a template header. I don't need a template for any other item type.

Is there a way to have a template only for the header of the column?

Thanks,

Oded
Oded
Top achievements
Rank 1
 answered on 14 May 2009
1 answer
87 views
Dear All,

I have One tabstrip and a multipage associated with this tabstrip.
I want to load controls when user selects the tab. Does anyone know how to do it please tell me ...



 

<telerik:RadTabStrip ID="rdTabCustomer" runat="server" MultiPageID="a">

 

 

 

 

<Tabs>

 

 

 

 

<telerik:RadTab Text="Caller" Value="Caller">

 

 

 

 

</telerik:RadTab>

 

 

 

 

<telerik:RadTab Text="Customer" Value="Customer">

 

 

 

 

</telerik:RadTab>

 

 

 

 

</Tabs>

 

 

 

 

</telerik:RadTabStrip><telerik:RadMultiPage ID="a" runat="server">

 

 

 

 

<telerik:RadPageView ID="aa" runat="server">

 

 

 

 

<General:Generalcc ID="sss" runat="server" />

 

 

 

 

</telerik:RadPageView>

 

 

 

 

<telerik:RadPageView ID="RadPageView1" runat="server">

 

 

 

 

<General:GeneralCustomer ID="GeneralCustomer1" runat="server" />

 

 

 

 

</telerik:RadPageView>

 

 

 

 

</telerik:RadMultiPage>


Thanks & Regards
Brijendra Pandey    

 

 

 

Alex Lawson
Top achievements
Rank 1
 answered on 14 May 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?