Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
216 views
It 's simple, I only show custom edit form from web user control ( not need to bind data ). Ex: each User, I want to show a picture from picture.acsx when I click on row.
<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True"
    AllowPaging="True" AllowSorting="True"  DataSourceID="ObjectDataSource1"
    GridLines="None" Skin="Black" AllowMultiRowSelection="True"
    onitemcommand="RadGrid1_ItemCommand"
    AutoGenerateEditColumn="True" ShowStatusBar="True"  >
     
<MasterTableView DataSourceID ="ObjectDataSource1" >
<EditFormSettings UserControlName="picture.ascx" EditFormType="WebUserControl">
                    <EditColumn UniqueName="EditCommandColumn1">
                    </EditColumn>
                </EditFormSettings>
</MasterTableView>
    <ClientSettings AllowColumnsReorder="True" EnablePostBackOnRowClick="true">
         
    </ClientSettings>
</telerik:RadGrid>
I had insert
<EditFormSettings UserControlName="picture.ascx" EditFormType="WebUserControl">
                    <EditColumn UniqueName="EditCommandColumn1">
                    </EditColumn>
                </EditFormSettings>
both
protected void RadGrid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
       {
        
               e.Item.OwnerTableView.IsItemInserted = false;
               e.Item.OwnerTableView.EditFormSettings.UserControlName = "picture.ascx";
            
       }

But it doesn't work. What 's wrong ??? or I missed anything ??? I had read:
+ http://www.telerik.com/help/aspnet-ajax/grdcustomeditforms.html
+http://www.telerik.com/help/aspnet-ajax/grddifferenteditformsoneditandinsert.html
and demo http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx
But I don't still understand . Because I don't need bind data from grid to webusercontrol. Thanks a lot !!!
Dheeraj
Top achievements
Rank 1
 answered on 03 Dec 2010
1 answer
72 views

Hi All,

I have a radchart (having drill-down feature), once user clicks the bars, the 2nd chart gets open with refined data.
My need is that, on click of the 2nd chart's series or seriesItem or legends  user need to reach again to top chart.

I know through legends, but how can i tackle when user clicks series/seriesItem.

Velin
Telerik team
 answered on 03 Dec 2010
5 answers
391 views
Hello,

I have a RadGrid with the export to excel command enabled, and a RadFilter to filter the grid data.

When I try to export the grid to excel after applying filters, an exception occurs.
But the grid exports fine to excel if no filters are applied.

Please explain how to fix or workaround the problem.

Exception Info:

Script controls may not be registered after PreRender.

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

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

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidOperationException: Script controls may not be registered after PreRender.]   System.Web.UI.ScriptControlManager.RegisterScriptControl(TScriptControl scriptControl) +206   System.Web.UI.ScriptManager.RegisterScriptControl(TScriptControl scriptControl) +67   Telerik.Web.UI.RadInputControl.RegisterScriptControl() +42   Telerik.Web.UI.RadWebControl.ControlPreRender() +15   Telerik.Web.UI.RadInputControl.ControlPreRender() +12   Telerik.Web.UI.RadNumericTextBox.OnPreRender(EventArgs e) +152   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.AddedControl(Control control, Int32 index) +8682853   System.Web.UI.ControlCollection.Add(Control child) +80   Telerik.Web.UI.RadFilter.CreateFilterItems() +504   Telerik.Web.UI.RadFilter.CreateControlHierarchy() +13   Telerik.Web.UI.RadFilter.CreateChildControls() +78   System.Web.UI.Control.EnsureChildControls() +87   Telerik.Web.UI.RadFilter.RecreateControl() +44   Telerik.Web.UI.RadFilter.ContainerFieldDescriptorsReady(Object sender, RadFilterFildDesciptorsEventArgs e) +27   Telerik.Web.UI.RadGrid.OnFieldDescriptorsReady(RadFilterFildDesciptorsEventArgs e) +65   Telerik.Web.UI.RadGrid.UpdateFilterControl() +130   Telerik.Web.UI.GridTableView.SavePagingData(Boolean useDataSource, GridPagingManager paging) +228   Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +1001   Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +500   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +57   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +114   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142   Telerik.Web.UI.GridTableView.PerformSelect() +4   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73   Telerik.Web.UI.GridTableView.DataBind() +224   Telerik.Web.UI.RadGrid.DataBind() +80   Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason) +2132   Telerik.Web.UI.RadGrid.RebindForExport() +95   Telerik.Web.UI.Grid.Export.TableViewExporter.ExcelExportRenderForm(HtmlTextWriter nullWriter, Control form) +853   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +8677897   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +51   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40   Telerik.Web.UI.Grid.Export.TableViewExporter.ExcelExportRenderPage(HtmlTextWriter nullWriter, Control page) +93   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19   System.Web.UI.Page.Render(HtmlTextWriter writer) +29   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.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +640   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19   System.Web.UI.Page.Render(HtmlTextWriter writer) +29   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.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266

Aspx snippets:

<script type="text/javascript"> 
    //<![CDATA[ 
        function RequestStart(sender, args) { 
            if (args.get_eventTarget().indexOf("ExportToExcelButton") != -1) { 
                args.set_enableAjax(false); 
            } 
        } 
    //]]> 
    </script> 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> 
     
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" onajaxrequest="RadAjaxManager1_AjaxRequest" ClientEvents-OnRequestStart="RequestStart"> 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="gridClientes" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="gridClientes"> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="gridClientes" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
        <ClientEvents OnRequestStart="RequestStart" /> 
    </telerik:RadAjaxManager> 

<div><telerik:RadFilter ID="RadFilter1" runat="server" FilterContainerID="gridClientes" ShowApplyButton="True" /></div> 
                    <telerik:RadGrid ID="gridClientes" runat="server" GridLines="None" 
                        AutoGenerateColumns="False" AllowPaging="True" AllowSorting="True" 
                        OnSortCommand="gridClientes_SortCommand" OnPageIndexChanged="gridClientes_PageIndexChanged" OnPageSizeChanged="gridClientes_PageSizeChanged" 
                        OnNeedDataSource="gridClientes_NeedDataSource" OnItemCommand="gridClientes_ItemCommand" OnUpdateCommand="gridClientes_UpdateCommand" OnItemDataBound="gridClientes_ItemDataBound" 
                        PageSize="50"> 
                         <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top" EditMode="InPlace"> 
                            <CommandItemSettings ShowExportToExcelButton="true" ExportToExcelText="Exportar a Excel" ShowRefreshButton="False" ShowAddNewRecordButton="False" /> 
                             
                            <Columns> 
                               <Columns> 
                                <telerik:GridBoundColumn DataField="Field1" SortExpression="Field1" UniqueName="Field1"></telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Field2" SortExpression="Field2" UniqueName="Field2"></telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Field3" SortExpression="Field3" UniqueName="Field3"></telerik:GridBoundColumn> 
                            </Columns> 
                         </MasterTableView> 
                         <ClientSettings EnableRowHoverStyle="True" ReorderColumnsOnClient="True" AllowColumnsReorder="True"> 
                            <ClientEvents OnRowSelected="gridClientes_OnRowSelected" /> 
                            <Selecting AllowRowSelect="True" /> 
                            <Scrolling AllowScroll="True" UseStaticHeaders="True"></Scrolling> 
                            <Resizing AllowColumnResize="true" /> 
                         </ClientSettings> 
                         <ExportSettings FileName="clientes"  OpenInNewWindow="True" IgnorePaging="True"  Excel-Format="ExcelML" ExportOnlyData="True"></ExportSettings> 
                         <PagerStyle AlwaysVisible="true" Position="Bottom" /> 
                    </telerik:RadGrid> 


Thanks in advance.
Nikolay Rusev
Telerik team
 answered on 03 Dec 2010
1 answer
122 views
I read a lot of posts relating to column widths, but i didn't come across what i was looking for.  Please forgive me if this is a repost.

I have a problem that can be quite clearly seen in the Scrolling demo here:
http://demos.telerik.com/aspnet-ajax/grid/examples/client/scrolling/defaultcs.aspx

Turn the static headers on and off and watch the sizes of the columns.

When i have the client scrolling + static headers turned on, my grid no longer automatically sizes the columns in a reasonable way.  I have a grid with a number of very small columns, and a couple of large descriptive ones.  With scrolling and static headers off, it looks great.  The big descriptive columns take up the majority of the space, and the smaller columns are allocated almost nothing - tight around the data.

As soon as static headers + scrolling is on, the widths are almost random.  The description columns will now only get *slightly* more than others - and none of the columns are tight around the data.  When the description fields are shrunk down, they wrap such that each row is now giant - it makes it basically unreadable.

Bottom Line:
Is there any possible way i can do something to maintain the great auto sizing, but still get static headers + scrolling?

-RP


EDIT: i feel like i should probably point out that i cannot hard code my column widths here - not even in percentages.  The number of columns being displayed, as well as the data contained within, will vary greatly.  The default auto sizing handles that perfectly, but is upset by the static + scroll.
Dimo
Telerik team
 answered on 03 Dec 2010
0 answers
150 views
Hi ALL,

        I have one treeview on left panel which will bind from database, treeview have N no. of parents and each parent have N no. of childs and each child have N number sub child.

On right side i have one textbox, when user enter some value and if it is one of treenode (Parent/Child/SubChild) then it should be selected..and on that particular selected node i need to fire treeview_nodechange event to bind right side grid.When user try to search text from textbox than treeview may be collapse or expanded, but once page load tree always be collapse.


Parent1
 
    Child11

    Child12
 
           Sub Child21

           Sub Child22
 
           Sub Child23

Parent2

     Child21

           Sub Child21

           Sub Child22

     Child22


Here on page load grid will be collapsed, when user try to search text like "Child11" then Parent1 should be expand and Child11 should be selected.

Same suppose user try to search "Sub Child22" than Parent2 and Child21 should be expand and "Sub Child21" should be selected

And in both case treeview_nodechange event should be fire.

I try this using

                   RadTreeView1.FindNodeByText(SearchText).Selected := true;

Its running properly for parent node only, while i am trying with any child or sub child node it will give me error and got the node as null.

Please help me on same.

Thanks
            
Kaushal
Top achievements
Rank 1
 asked on 03 Dec 2010
5 answers
151 views
Hello guys,

I encounter a very weird problem; I have a page which basically kills my IIS 7.5 (Win7 X32) - requesting it takes very, very long time with a non-ending message "downloading picture nfeswr;t3e4uiowugbhhzfxdcb nvdzf.hgdx ....  WebResource.axd blah...blah"; in the end IIS process blocks and I have to restart the service. Requesting the same page from the Visual Studio 2008 development server works fast and without any issues; do you have a clue about what can cause this behaviour?

Thanks,
Cris
rahul
Top achievements
Rank 1
 answered on 03 Dec 2010
4 answers
435 views
Hi ALL,

          I have one main page, main page have one button, on click of button i had open one RadWindow which have Add Operation,while user enter required information and try to click on Add button i had open third Child RadWindow for indicating progress, once progress will complete Progress and Add Window will close.

MainPage -> Click On Button -> Add Form -> Click On Save -> Progress Window Open -> Process Complete- > Progress and Add Form closed.

         Now what i want, when user click on Main Page Button child window will populate, once all information enter to Add Form user try to save it, once user click on save button progress window will get display from Add Form, here i need to close Add Form when progress popup will get display....

MainPage -> Click On Button -> Add Form -> Click On Save -> Progress Window Open -> Close Add Form->Process Complete- > Progress Window closed.

Please do me help to achieve this kind of functionality.

Thanks
Kaushal.
Kaushal
Top achievements
Rank 1
 answered on 03 Dec 2010
1 answer
111 views
I have a grid that has x number of records on page 1. On page 2 there is a single record. If I check the single record on page 2, the header "All" checkbox also checks itself. If there anyway to prevent this? I only want the "All" checkbox to be checked when I actually check it.
Shinu
Top achievements
Rank 2
 answered on 03 Dec 2010
2 answers
114 views
I am having trouble having my splitter within a sliding pane become full width (100%) on the sliding pane expansion.
Basically, the nested splitter is remaining at the width of the Pane (RadPane6 in my example) that the Sliding Zone is nested in.  Check out the pictures to see what I mean.  If I Pin the sliding panel, the nested splitter's width refreshes and appears as expected.
The code below shows the setup in action.

<telerik:RadSplitter ID="RadSplitter3" runat="server" BackColor="Red" Height="100%"
        SplitBarsSize="5px" VisibleDuringInit="False" Width="100%">
        <telerik:RadPane ID="RadPane5" runat="server" BackColor="#0099CC" Index="0">
            <telerik:RadPanelBar ID="RadPanelBar2" runat="server" ExpandMode="FullExpandedItem"
                Width="100%" Height="100%">
                <Items>
                    <telerik:RadPanelItem runat="server" Text="Element" Selected="True" Expanded="True"
                        BackColor="Yellow" Height="100%">
                        <Items>
                            <telerik:RadPanelItem runat="server" Value="Element">
                                <ItemTemplate>
                                    <div id="ElementHolder" runat="server" style="width: 100%; height: 460px; overflow: hidden">
                                        <table>
                                            <tr>
                                                <td>
                                                </td>
                                                <td style="width: 50px" valign="top">
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </ItemTemplate>
                            </telerik:RadPanelItem>
                        </Items>
                        <HeaderTemplate>
                            <div style="margin-left: 5px">
                                <asp:Label ID="Label1" name="ElementDescriptor" runat="server" Text="Element"></asp:Label></div>
                        </HeaderTemplate>
                    </telerik:RadPanelItem>
                    <telerik:RadPanelItem runat="server" Text="Category" BackColor="#8080FF">
                        <Items>
                            <telerik:RadPanelItem runat="server" Value="Category">
                                <ItemTemplate>
                                    <div id="CategoryHolder" runat="server" style="width: 100%; height: 100%; overflow: hidden">
                                        <table>
                                            <tr>
                                                <td>
                                                </td>
                                                <td style="width: 50px" valign="top">
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </ItemTemplate>
                            </telerik:RadPanelItem>
                        </Items>
                        <HeaderTemplate>
                            <div style="margin-left: 5px">
                                <asp:Label ID="Label2" runat="server" Text="Category"></asp:Label></div>
                        </HeaderTemplate>
                    </telerik:RadPanelItem>
                    <telerik:RadPanelItem runat="server" Text="Criteria" BackColor="#00C000">
                        <Items>
                            <telerik:RadPanelItem runat="server" Value="Criteria">
                                <ItemTemplate>
                                    <div id="CriteriaHolder" runat="server" style="width: 100%; height: 100%; overflow: hidden">
                                        <table>
                                            <tr>
                                                <td>
                                                </td>
                                                <td style="width: 50px" valign="top">
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </ItemTemplate>
                            </telerik:RadPanelItem>
                        </Items>
                        <HeaderTemplate>
                            <div style="margin-left: 5px">
                                <asp:Label ID="Label3" runat="server" Text="Criteria"></asp:Label></div>
                        </HeaderTemplate>
                    </telerik:RadPanelItem>
                </Items>
                <ExpandAnimation Duration="1000" />
                <CollapseAnimation Duration="1000" />
            </telerik:RadPanelBar>
        </telerik:RadPane>
        <telerik:RadPane ID="RadPane6" runat="server" BackColor="#FFFF66" Width="23px">
            <telerik:RadSlidingZone ID="RadSlidingZone2" runat="server" ClickToOpen="True" SlideDirection="Left">
                <telerik:RadSlidingPane ID="RadSlidingPane2" runat="server" EnableResize="False"
                    Scrolling="None" Width="200px" BackColor="#0066FF">
                    <div style="background-color: #00FF00; width: 100%; height: 100%; overflow: visible;">
                        <telerik:RadSplitter ID="RadSplitter4" runat="server" Height="100%" Orientation="Horizontal"
                            ResizeMode="AdjacentPane" SplitBarsSize="5px" Width="100%" BackColor="#FF99FF">
                            <telerik:RadPane ID="RadPane7" runat="server" Width="100%" BackColor="#FF9999">
                                <asp:Panel ID="Panel1" runat="server" Width="100%">
                                </asp:Panel>
                            </telerik:RadPane>
                            <telerik:RadPane ID="RadPane8" runat="server" Width="100%" Height="30px" BackColor="#FFFF66">
                            </telerik:RadPane>
                        </telerik:RadSplitter>
                    </div>
                </telerik:RadSlidingPane>
            </telerik:RadSlidingZone></telerik:RadPane>
    </telerik:RadSplitter>

Please let me know how to rectify this issue.
Thanks,
Steele.
Steele
Top achievements
Rank 1
 answered on 03 Dec 2010
5 answers
521 views
I am using RadGrid control and I need to export the grid as an excel but export to excel icon is not showing in command item settings tag.

<CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true"
                ShowExportToCsvButton="true" />


Please suggest ASAP.
panchooo
Top achievements
Rank 2
 answered on 03 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?