Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
516 views
Hello,

I've got a problem with filtering multiple columns in a RadGrid. The RadGrid code is shown below. Basically, the RadGrid below sets the CurrentFilterFunction property to default value, which is what we want. The issue is if a user changes the default filter function on multiple columns and attempts to filter based on those columns, it doesn't work because the first column filter that was changed will reset to the default CurrentFilterFunction value when the page posts back. Is there a way to save both filter function changes and allow the user to filter on multiple columns that way?
<telerik:RadGrid ID="TasksGrid" runat="server" >
    <MasterTableView>
        <Columns>
            <telerik:GridBoundColumn DataField="TaskID" HeaderStyle-Width="95" ItemStyle-Width="95"    HeaderText="Task ID" SortExpression="TaskID" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"></telerik:GridBoundColumn>
            <GridRadComboFilter:GridRadComboFilter DataField="FlagID" HeaderText="Flag" SortExpression="FlagID" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="50" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50" />
            <telerik:GridBoundColumn DataField="AssignedTo" HeaderText="Assigned To" SortExpression="AssignedTo" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Site" HeaderText="Site" SortExpression="Site" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Product" HeaderText="Product" SortExpression="Product" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"></telerik:GridBoundColumn >
            <telerik:GridBoundColumn DataField="SupportType" HeaderText="Support Type" SortExpression="SupportType" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true"></telerik:GridBoundColumn >
            <telerik:GridBoundColumn DataField="Issue" HeaderText="Reported Issue" SortExpression="Issue" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"></telerik:GridBoundColumn >
            <telerik:GridBoundColumn DataField="LastUpdatedText" HeaderText="Last Updated Text" SortExpression="LastUpdatedText" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"></telerik:GridBoundColumn >
            <telerik:GridDateTimeColumn FilterControlWidth="110px" DataField="LastUpdatedDate" SortExpression="LastUpdatedDate" HeaderText="Last Updated Date" PickerType="DatePicker" DataFormatString="{0:d}" DataType="System.DateTime"></telerik:GridDateTimeColumn>
            <telerik:GridDateTimeColumn FilterControlWidth="110px" DataField="RequestedCompletionDate" SortExpression="RequestedCompletionDate" HeaderText="Req Completion Date" PickerType="DatePicker" DataFormatString="{0:d}" DataType="System.DateTime"></telerik:GridDateTimeColumn>
            <telerik:GridBoundColumn DataField="Status" HeaderText="Status" SortExpression="Status" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"></telerik:GridBoundColumn >                   
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
Eyup
Telerik team
 answered on 06 Aug 2015
3 answers
275 views
Hi,

I have a simple RadGrid control.
For each data item in the Datasource I create a User Control.
The user control is determined at runtime according to the data-item (or data item id).
I use LoadControl function to load the control.

I want to add this control as a nested view template, so I can collapse/expand each row and edit the different controls.
Once I finish editing the controls - (all in client side), I hit a save button to persist all the information to database.

I will have to loop through the rows, get the user-control and execute a save function in it.

What would be the best practice to achieve this?
I started by adding NestedViewTemplate  with a container panel to hold the various user controls.
This is how it looks like:
<MasterTableView AutoGenerateColumns="False" DataKeyNames="Id"  GroupLoadMode="Client" HierarchyLoadMode="Client">
                <NestedViewTemplate>
                    <asp:Panel runat="server" ID="configControlContainer" CssClass="viewWrap" Visible="true">
                    </asp:Panel>
                </NestedViewTemplate>
                <Columns>
.
.
.

Thank you,

-Itye
Eyup
Telerik team
 answered on 06 Aug 2015
6 answers
270 views
Hi guys,

I found this excellent example

http://demos.telerik.com/aspnet-ajax/scheduler/examples/outlook2007/defaultcs.aspx

Which is just what I need to implement.

But when I copy and paste into my application I get this error

The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.


and 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) +11274544
   Telerik.Web.SkinRegistrar.RegisterCssReference(Page _page, Control _control, String _url) +619

[HttpException (0x80004005): Please, see whether wrapping the code block, generating the exception, within RadCodeBlock resolves the error.]
   Telerik.Web.SkinRegistrar.RegisterCssReference(Page _page, Control _control, String _url) +724
   Telerik.Web.SkinRegistrar.RegisterCssReferences(ISkinnableControl _control) +1182


Do you have any clue, what I'm doing wrong?

Many thanks!
Maria Ilieva
Telerik team
 answered on 06 Aug 2015
1 answer
1.7K+ views

 I Added the grid in the Sharepoint web part  , I did not add any code behind  , I just added to the aspx the following : 

<telerik:RadGrid ID="RadGrid1" runat="server" >
 
</telerik:RadGrid>

The exception is:

 The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.

 

  • [HttpException (0x80004005): The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.] System.Web.UI.ControlCollection.Add(Control child) +353 Telerik.Web.SkinRegistrar.RegisterCssReference(Page page, Type registerType, String url) +618 [HttpException (0x80004005): Please, see whether wrapping the code block, generating the exception, within RadCodeBlock resolves the error.] Telerik.Web.SkinRegistrar.RegisterCssReference(Page page, Type registerType, String url) +729 Telerik.Web.SkinRegistrar.RegisterCssReferences(ISkinnableControl control) +683 Telerik.Web.UI.RadGrid.ControlPreRender() +56 System.Web.UI.Control.PreRenderRecursiveInternal() +155 System.Web.UI.Control.PreRenderRecursiveInternal() +240 System.Web.UI.Control.PreRenderRecursiveInternal() +240 System.Web.UI.Control.PreRenderRecursiveInternal() +240 System.Web.UI.Control.PreRenderRecursiveInternal() +240 System.Web.UI.Control.PreRenderRecursiveInternal() +240 System.Web.UI.Control.PreRenderRecursiveInternal() +240 System.Web.UI.Control.PreRenderRecursiveInternal() +240 System.Web.UI.Control.PreRenderRecursiveInternal() +240 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4106

 

 

Any suggestions ?

Maria Ilieva
Telerik team
 answered on 06 Aug 2015
5 answers
83 views
Probably not possible but....

It would be neat if one could embed user controls into the editor. This would then allow us as developers to create editable layouts that contain user controls.

Thanks
Ianko
Telerik team
 answered on 06 Aug 2015
4 answers
128 views

We recently upgraded to .Net 4.5 and I am now receiving a 404 File or Directory Not Found error when I try to upload a pdf.  I have made all the changes to the web.config that were suggested in the documentation.

Any help would be appreciated

 

Ianko
Telerik team
 answered on 06 Aug 2015
2 answers
79 views

I have an issue with ​radgrids on public pages on my site (pages I want search engines to spider) are showing the back/next image button instead of the new "Mobile" buttons.

See attached images. One is from a datagrid with SEOPaging turn on (Old Buttons) and one with SEOPaging turned off (New Buttons).

Cradz
Top achievements
Rank 1
 answered on 05 Aug 2015
16 answers
357 views
For some reason, we're getting the attached error when using the RadUpload to upload a 43MB file. The funny thing is that the progress stops moving, even though it takes several minutes before the error pops up. On our test system, I can sometimes get 1-2% before it stops. I then have to wait for a while before the error comes up. During this time, I'm not sure anything is happening. On our production system, it get's a bit further before giving the error. Either way, the time, speed, and progress all stop.

What is causing this error to occur? I double checked and the web.config is setup correctly. We can upload other files, just not this one.
Ivan Danchev
Telerik team
 answered on 05 Aug 2015
10 answers
548 views
Is it possible to change the color of the generated QR Code?
Konstantin Dikov
Telerik team
 answered on 05 Aug 2015
3 answers
657 views
Hello,

We have the implementation as such in one of our pages:
<telerik:RadCaptcha ID="RadCaptcha1"   Runat="server" ErrorMessage="The code you entered is not valid." ForeColor="Red"
                                 CaptchaImage-BackgroundColor="#4c669F" CaptchaImage-TextColor="White" ValidationGroup="Group"
                                 CaptchaTextBoxCssClass="employee" CaptchaTextBoxLabel="&nbsp; Type the code from the image" ImageStorageLocation="Session"/>

Config:
<httpHandlers>
      <add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
      <add path="ChartImage.axd" verb="*" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Version=2012.1.411.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/>
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResourceSession" verb="*" validate="false"/>
      <!--captcha-->
    </httpHandlers>
<handlers>
      <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
      <add name="ChartImageWebControlHandler" preCondition="integratedMode" verb="*" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Version=2012.1.411.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>
      <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResourceSession"/>
      <!--captcha-->
    </handlers>

This is working well in my local machine but not when it is deployed to server. Server is a 2008R2 web server.

Please post back with a solution.
Slav
Telerik team
 answered on 05 Aug 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?