Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
210 views

I have aspx page that use a Radgrid to display list of records,
During Editing command of the record, I am loading dynamically usercontrol "Record_Details.ascx" to display the record details using another Radgrid control "Record_Grid".

For that I am using OnNeedDataSource="RecoredRadGrid_OnNeedDataSource" event handler to load Record_Grid inside the usercontrol by passing the record ID from the RadGrid on the aspx page,

an error message is showing :"The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases"

Stack Trace: 

[HttpException (0x80004005): The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.] System.Web.UI.ControlCollection.Add(Control child) +11827274 Telerik.Web.UI.RadAjaxControl.CreateUpdatePanel(Control initiator, String eventName, Control updated, UpdatePanelRenderMode panelRenderMode, Unit panelHeight, String panelCssClass) +1935 Telerik.Web.UI.RadAjaxControl.OnPagePreRender(Object sender, EventArgs e) +3883 System.EventHandler.Invoke(Object sender, EventArgs e) +0 System.Web.UI.Control.OnPreRender(EventArgs e) +11897165 System.Web.UI.Control.PreRenderRecursiveInternal() +107 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7675

I could find solution/workaorund to this issue by removing OnNeedDataSource of "Record_Grid" inside Record_Details.ascx , and load the datasource during ItemDataBound event handler of the Records RadGrid in .aspx page.

My question is why I am not able to use "OnNeedDataSource="RecoredRadGrid_OnNeedDataSource" to load the "Record_Grid" data from inside the Usercontrol, and error thrown each time I used it.

Basel
Top achievements
Rank 1
 asked on 17 Feb 2017
1 answer
123 views

Hi,

 

The following technique we are using for Eg RadCombobox for sending an additional parameter to the call back function

 

Why is this not working for the ImageManager ClientCallbackFunction?

imageManager.ClientCallbackFunction = "function(sender, args){ImageManagerFunction(sender, args, 'NL');}"

 

Marc

Rumen
Telerik team
 answered on 17 Feb 2017
0 answers
192 views

Hi,

I have a RadGrid with 2 DetailTables. Events inside a Detail Table are not firing for the first time, but it is firing for second attempt. 

Please find below the issues i am facing:

1) Check box in 1st Detail View is not hitting OnCheckedChanged for the first attempt, but postback is happening and OnItemDataBound event is getting triggered. OnCheckedChanged  event is firing for the second attempt

2) OnTextChanged of RadNumericTextBox  in 2nd Detail View is not firing for the first attempt, but postback is happening and OnItemDataBound event is getting triggered. it is firing in second attempt.

 

<telerik:RadGrid ID="rGrid" runat="server" OnNeedDataSource="rGrid_NeedDataSource" RenderMode="Lightweight" 
                        GridLines="None" OnPreRender="rGrid_PreRender" OnItemDataBound="rGrid_ItemDataBound"
                        OnDetailTableDataBind="rGrid_DetailTableDataBind" OnDeleteCommand="rGrid_DeleteCommand" OnItemCommand="rGrid_ItemCommand">
                        <MasterTableView AutoGenerateColumns="false" DataKeyNames="Id" ShowFooter="true" Name="Master" HierarchyLoadMode="Client" RetainExpandStateOnRebind="true" HorizontalAlign="Right">
                            <DetailTables>
                                <telerik:GridTableView DataKeyNames="EventDesc"  HorizontalAlign="Left" Name="DetailTableView" Width="105%" AutoGenerateColumns="false" ShowHeader="false" HierarchyLoadMode="Client" CssClass="inner_grid" RetainExpandStateOnRebind="true">
                                    <DetailTables>
                                        <telerik:GridTableView Width="100%" HorizontalAlign="Right" AutoGenerateColumns="false" ShowHeader="true" NoDetailRecordsText="No invoice recorded" Name="DetailTable1" RetainExpandStateOnRebind="true">
                                            <Columns>
                                                 <telerik:GridTemplateColumn HeaderText="Amount" HeaderStyle-Width="126px">
                                                    <ItemTemplate>
                                                        <telerik:RadNumericTextBox ID="rtxtAmount" runat="server" MinValue="0" DbValue='<%# Eval("Amount") %>' Width="95px"
                                                            OnTextChanged="rtxtAmount" AutoPostBack="true" >
                                                            <IncrementSettings InterceptMouseWheel="false" InterceptArrowKeys="false" />
                                                        </telerik:RadNumericTextBox>
                                                    </ItemTemplate>
                                                </telerik:GridTemplateColumn>

                                            </Columns>
                                        </telerik:GridTableView>
                                    </DetailTables>
                                    <Columns>

                                  <telerik:GridTemplateColumn UniqueName="chkBox" HeaderStyle-Width="15px">
                                            <ItemTemplate>
                                                <asp:CheckBox ID="CheckBoxSubGid" runat="server" OnCheckedChanged="CheckBoxSubGid_CheckedChanged"                                                                          AutoPostBack="true" />
                                            </ItemTemplate>
                                  </telerik:GridTemplateColumn>

                                   </Columns>
                                </telerik:GridTableView>
                            </DetailTables>
                            <Columns>

                           <telerik:GridTemplateColumn DataField="EventDesc" HeaderText="description" UniqueName="description" >
                                    <ItemTemplate>
                                        <telerik:RadTextBox ID="rtxtdescription" runat="server" TextMode="MultiLine" Text='<%# Eval("description") %>' >                                                                          </telerik:RadTextBox>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>

                               </Columns>
                        </MasterTableView>
                    </telerik:RadGrid>

 

Could you please let me know the solution ?

Thanks in advance!!

Regards,

Puru

Purushothama
Top achievements
Rank 1
 asked on 17 Feb 2017
0 answers
143 views

Hi

How to use select all checkbox in Telerik Gridview and Filter option for unselected item 

How to implement a telerik grid having filter control and select all option(Check Box).....  The purpose is to filter grid row items from a list and then to cancel the selection of the filtered result set.

Jaya
Top achievements
Rank 1
 asked on 17 Feb 2017
0 answers
275 views

HI

 

I have  a Page containing Telerik Grid view with Filter Control. When I use the filter control after selecting all values using checkbox (for selected all item), the selected checkboxes gets cleared after running filter. How to Retain the selected Telerik Grid row Item .

Jaya
Top achievements
Rank 1
 asked on 17 Feb 2017
0 answers
128 views

Hi

 

I have  a Page containing Telerik Grid view with Filter Control. When I use the filter control after selecting all values using checkbox (for selected all item), the selected checkboxes gets cleared after running filter. How to Retain the selected Telerik Grid row Item .

Jaya
Top achievements
Rank 1
 asked on 17 Feb 2017
0 answers
127 views

Hello, 

 

I have  a button , ajaxpanel and grid . On button Click a for loop is working.  Data is binding when for loop ends. But I want to update grid when each data added to searchlist. What I am not doing?

Thanks

 

 

List<SearchResult> results;

  protected void RadButton1_Click(object sender, EventArgs e)
    {

results=new List<SearchResult> ();

 for (int i = 0; i < 100; i++)
        {

SearchResult sr=new SearchResult();

 

// Here call a web service and getdata.

sr.ServiceName=services[i];

sr.Data=webresponse.Data;

results.add(sr);

Radgrid1.datasource=results;

Radgrid1.databind();
        }

 

}

 

 

 

     <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
  <AjaxSettings>
     <telerik:AjaxSetting AjaxControlID="RadButton1">
        <UpdatedControls>
           <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
        </UpdatedControls>
     </telerik:AjaxSetting>
     <telerik:AjaxSetting AjaxControlID="RadGrid1">
        <UpdatedControls>
           <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
        </UpdatedControls>
     </telerik:AjaxSetting>
  </AjaxSettings>
</telerik:RadAjaxManager>

KARLIDAG
Top achievements
Rank 1
 asked on 17 Feb 2017
0 answers
166 views

When I export the RadEditor's content having table in it, it doesn't the table. Here is the simple HTML from the HTML tab of the editor (I did not with HTML and this is auto generated HTML when I place the table.)

<div>
<div>
<table>
    <tbody>
        <tr>
            <td>&nbsp;1</td>
            <td>2&nbsp;</td>
        </tr>
    </tbody>
</table>
<br />
Test
</div>
</div>

 

I am using Telerik 2011.2.712.40. Below is the attributes set for the editor in ASPX page, 

<telerik:RadEditor ID="radEditor1" runat="server" Skin="Default" Height="500px" Width="100%"
                                OnClientSelectionChange="OnClientSelectionChange" AutoResizeHeight="false" ContentFilters="DefaultFilters,MakeUrlsAbsolute"
                                OnClientCommandExecuting="OnClientCommandExecuting" NewLineMode="Div"  >
                                <ExportSettings FileName="exporttopdf" OpenInNewWindow="true" Pdf-PageBottomMargin="1.0 cm"
                                    Pdf-PageLeftMargin="1.5 cm" Pdf-PageRightMargin="1.5 cm" Pdf-PageTopMargin="1.0 cm">
                                </ExportSettings>

I am using the method, radEditor1.ExportToPdf(); in CodeBehind.

Deepa
Top achievements
Rank 1
 asked on 16 Feb 2017
1 answer
81 views
A fairly simple question:

Which CSS classes will I need to access and what will I need to change in them in order to effectively Horizontally Center the list of nodes in the Navigation bar?  

My aim is either to just center them, or center them in a 1080px wide area in the center.

Thank you!
Chris
Top achievements
Rank 1
 answered on 16 Feb 2017
1 answer
117 views

I try to binding year is 2560 with Kendo AJAX  but on grid display 2017.

It work on grid Kendo MVC with the same data.

I really have to use Kendo AJAX to development,So Is there  any missing?

 

Eyup
Telerik team
 answered on 16 Feb 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?