Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
75 views
Hello,

I am attempting to integrate Rad Controls for AJAX with an MVC View-Page. An issue I had early on has reared its head again during development. If I modify the mark-up for my page such that it is in an erroneous state, and then try and run the page, I would expect to see something akin to "Server Error - Error Message Here." Unfortunately, my error messages are becoming compressed and never decompressed. This leads to garbage characters being rendered on the screen instead of a helpful error message.

The first time I encountered this issue it was code in our solution --

public override void OnActionExecuting(ActionExecutingContext context)
{
    //This compression filter eats server errors. I'd like to see them during debugging.
    if (!HttpContext.Current.IsDebuggingEnabled)
    {
        HttpRequestBase request = context.HttpContext.Request;
 
        string acceptEncoding = request.Headers["Accept-Encoding"];
 
        if (string.IsNullOrEmpty(acceptEncoding))
            return;
 
        acceptEncoding = acceptEncoding.ToUpperInvariant();
 
        HttpResponseBase response = context.HttpContext.Response;
 
        if (acceptEncoding.Contains("GZIP"))
        {
            response.AppendHeader("Content-encoding", "gzip");
            response.Filter = new GZipStream(response.Filter, CompressionMode.Compress);
        }
        else if (acceptEncoding.Contains("DEFLATE"))
        {
            response.AppendHeader("Content-encoding", "deflate");
            response.Filter = new DeflateStream(response.Filter, CompressionMode.Compress);
        }
    }
}

After adding in the check for debugging I began seeing my helpful error messages again.

Now, I recently went into my web.config and added the lines necessary to enable RadCompression. My issue has arisen once again -- I see garbage characters instead of error messages.

Is there something I should be checking elsewhere in my code, the data type of the stream or something, to account for errors + RadCompression?

Kind regards,

Sean
Martin
Telerik team
 answered on 12 Jul 2011
3 answers
123 views
Hello,

How do I improve the load times of the Advanced Edit/Insert forms. I really need the Recurrance control but the load time is terrible. With a basic setup and no appointments on the Scheduler it still takes 5-6 seconds to load. I am also seeing the same response time on your demo pages. I also get the same results in my Dev environment as well as Production regardless of the form being modal or not or if debugging is on or off. I have read the posts on how to improve performance but they mostly relate to improving loading of appointments. I am seeing this response time with no appointments.There has got to be a way to make this faster?? Below is my basic setup. I am using 2010.3.1317.40 release. Thank you!

<

 

 

telerik:RadScheduler runat="server" ID="RadScheduler2" Width="750px" TimeZoneOffset="03:00:00"

 

 

 

    SelectedDate="2007-03-30" DayStartTime="08:00:00" DayEndTime="18:00:00" EnableViewState="false"

 

 

 

 

    StartInsertingInAdvancedForm="true" StartEditingInAdvancedForm="true"

 

 

 

    SelectedView="MonthView" DataKeyField="ID" DataSubjectField="Subject" DataStartField="Start"

 

 

 

    DataEndField="End" DataReminderField="Reminder" DataRecurrenceField="RecurrenceRule"

 

 

 

    DataRecurrenceParentKeyField="RecurrenceParentID" DataSourceID="AppointmentsDataSource"

 

 

 

    Reminders-Enabled="false" Skin="Telerik">

 

 

 

    <AdvancedForm Modal="false" />

 

 

 

    <ResourceTypes>

 

 

 

    <telerik:ResourceType KeyField="ID" Name="Room" TextField="RoomName" ForeignKeyField="RoomID" 
        DataSourceID="RoomsDataSource" />

 

 

 

    <telerik:ResourceType KeyField="ID" Name="User" TextField="UserName" ForeignKeyField="UserID"

 

 

 

        DataSourceID="UsersDataSource" />

 

 

 

    </ResourceTypes>

 

 

 

    <TimeSlotContextMenuSettings EnableDefault="true" />

 

 

 

    <AppointmentContextMenuSettings EnableDefault="true" />

 

 

 

</telerik:RadScheduler>

 


<

 

 

asp:SqlDataSource ID="AppointmentsDataSource" runat="server"

 

 

 

 

    ConnectionString="<%$ ConnectionStrings:Team_ConnectionString %>"

 

 

 

 

    OnSelecting="AppointmentsDataSource_Selecting" OnSelected="AppointmentsDataSource_Selected"

 

 

 

    SelectCommand="SELECT * FROM [TEMP_SCHDTEST] WHERE ([Start] < @RangeEnd AND [End] > @RangeStart) OR ([RecurrenceRule] <> '') OR ([RecurrenceParentID] IS NOT NULL)"

 

 

 

 

    InsertCommand="INSERT INTO [TEMP_SCHDTEST] ([Subject], [Start], [End], [UserID],

 

 

        [RoomID], [RecurrenceRule], [RecurrenceParentID], [Annotations], [Description], [Reminder],

 

        [LastModified]) VALUES (@Subject, @Start, @End, @UserID, @RoomID, @RecurrenceRule,

 

        @RecurrenceParentID, @Annotations, @Description, @Reminder, @LastModified)"

 

 

    UpdateCommand="UPDATE [Appointments] SET [Subject] = @Subject, [Start] = @Start, [End] = @End,

 

 

        [UserID] = @UserID, [RoomID] = @RoomID, [RecurrenceRule] = @RecurrenceRule,

 

        [RecurrenceParentID] = @RecurrenceParentID, [Annotations] = @Annotations, [Description] =     @Description, [Reminder] = @Reminder, [LastModified] = @LastModified WHERE [ID] = @ID"

 

 

    DeleteCommand="DELETE FROM [TEMP_SCHDTEST] WHERE [ID] = @ID">

 

 

 

<SelectParameters>

 

 

 

    <asp:Parameter Name="RangeStart" Type="DateTime" DefaultValue="1900/1/1" />

 

 

 

    <asp:Parameter Name="RangeEnd" Type="DateTime" DefaultValue="2900/1/1" />

 

 

 

</SelectParameters>

 

 

 

<DeleteParameters>

 

 

 

    <asp:Parameter Name="ID" Type="Int32" />

 

 

 

</DeleteParameters>

 

 

 

<UpdateParameters>

 

 

 

    <asp:Parameter Name="Subject" Type="String" />

 

 

 

    <asp:Parameter Name="Start" Type="DateTime" />

 

 

 

    <asp:Parameter Name="End" Type="DateTime" />

 

 

 

    <asp:Parameter Name="UserID" Type="Int32" />

 

 

 

    <asp:Parameter Name="RoomID" Type="Int32" />

 

 

 

    <asp:Parameter Name="RecurrenceRule" Type="String" />

 

 

 

    <asp:Parameter Name="RecurrenceParentID" Type="Int32" />

 

 

 

    <asp:Parameter Name="Annotations" Type="String" />

 

 

 

    <asp:Parameter Name="Description" Type="String" />

 

 

 

    <asp:Parameter Name="Reminder" Type="String" />

 

 

 

    <asp:Parameter Name="LastModified" Type="String" />

 

 

 

    <asp:Parameter Name="ID" Type="Int32" />

 

 

 

</UpdateParameters>

 

 

 

<InsertParameters>

 

 

 

    <asp:Parameter Name="Subject" Type="String" />

 

 

 

    <asp:Parameter Name="Start" Type="DateTime" />

 

 

 

    <asp:Parameter Name="End" Type="DateTime" />

 

 

 

    <asp:Parameter Name="UserID" Type="Int32" />

 

 

 

    <asp:Parameter Name="RoomID" Type="Int32" />

 

 

 

    <asp:Parameter Name="RecurrenceRule" Type="String" />

 

 

 

    <asp:Parameter Name="RecurrenceParentID" Type="Int32" />

 

 

 

    <asp:Parameter Name="Annotations" Type="String" />

 

 

 

    <asp:Parameter Name="Description" Type="String" />

 

 

 

    <asp:Parameter Name="Reminder" Type="String" />

 

 

 

    <asp:Parameter Name="LastModified" Type="String" />

 

 

 

</InsertParameters>

 

 

 

</asp:SqlDataSource>

 

Peter
Telerik team
 answered on 12 Jul 2011
2 answers
323 views
Hello,

I tried to insert a validation in my RadGrid like in the exemple here : http://www.telerik.com/help/aspnet-ajax/grid-validation.html.

Here's my code :
<telerik:RadGrid ID="rgActions" runat="server" Width="100%" ShowHeader="true" OnItemDataBound="rgActions_ItemDataBound" OnItemCommand="rgActions_ItemCommand">
        <MasterTableView NoMasterRecordsText="Aucune action" ShowHeadersWhenNoRecords="true" AutoGenerateColumns="false" EditMode="PopUp" DataKeyNames="Idaction"
            CommandItemDisplay="Top" InsertItemDisplay="Top">
            <CommandItemSettings AddNewRecordText="Ajouter une action" RefreshText="Actualiser" />
            <EditFormSettings PopUpSettings-Width="620px" PopUpSettings-Modal="true"></EditFormSettings>
            <RowIndicatorColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn DataField="Idaction" HeaderText="Idaction" ReadOnly="True" UniqueName="Idaction"
                    ForceExtractValue="InEditMode" Visible="False">
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn DataField="DateSaisie" HeaderText="Date saisie" UniqueName="DateSaisie"
                    ForceExtractValue="InEditMode">
                    <HeaderStyle Width="100px"/>
                    <ItemStyle Width="100px" VerticalAlign="Top"/>
                    <ItemTemplate>
                        <asp:Label ID="lblDateSaisie" runat="server" Text='<%# Eval("DateSaisie", "{0:dd/MM/yyyy}") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:Label ID="lblDateSaisie" runat="server" Text='<%# Eval("DateRealisation")==DBNull.Value ? DateTime.Now.Date.ToShortDateString() : Eval("DateSaisie", "{0:dd/MM/yyyy}") %>'></asp:Label>
                    </EditItemTemplate>
                </telerik:GridTemplateColumn>             
                <telerik:GridTemplateColumn DataField="Description" HeaderText="Description" UniqueName="Description"  ForceExtractValue="InEditMode">
                    <ItemStyle VerticalAlign="Top"/>
                    <ItemTemplate>
                        <asp:Label ID="lblDescription" runat="server" Text='<%# Eval("DescriptionHtml") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadTextBox ID="tbDescription" runat="server" Width="500px" Height="50px" TextMode="MultiLine" MaxLength="500" Text='<%# Eval("Description") %>'></telerik:RadTextBox>
                        <asp:RequiredFieldValidator ID="rfvDescription" runat="server" ErrorMessage="*" ControlToValidate="tbDescription" Display="Dynamic"></asp:RequiredFieldValidator>
                    </EditItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn DataField="DatePrevue" HeaderText="Date prévue" UniqueName="DatePrevue"  ForceExtractValue="InEditMode">
                    <HeaderStyle Width="100px"/>
                    <ItemStyle Width="100px" VerticalAlign="Top"/>
                    <ItemTemplate>
                        <asp:Label ID="lblDatePrevue" runat="server" Text='<%# Eval("DatePrevue", "{0:dd/MM/yyyy}") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadDatePicker ID="dpDatePrevue" runat="server" SelectedDate='<%# Eval("DatePrevue")==DBNull.Value ? DateTime.Now.Date : Eval("DatePrevue") %>'></telerik:RadDatePicker>
                        <asp:RequiredFieldValidator ID="rfvDatePrevue" runat="server" ErrorMessage="*" ControlToValidate="dpDatePrevue" Display="Dynamic"></asp:RequiredFieldValidator>
                    </EditItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn DataField="Personnes" HeaderText="Personne(s)" UniqueName="Personnes"  ForceExtractValue="InEditMode">
                    <HeaderStyle Width="30%"/>
                    <ItemStyle Width="30%" VerticalAlign="Top"/>
                    <ItemTemplate>
                        <asp:Label ID="lblPersonnes" runat="server" Text='<%# Eval("Personnes") %>'></asp:Label>                       
                    </ItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadTextBox ID="tbPersonnes" runat="server" Width="500px" Height="30px" TextMode="MultiLine"  MaxLength="200" Text='<%# Eval("Personnes") %>'></telerik:RadTextBox>
                        <asp:RequiredFieldValidator ID="rfvPersonnes" runat="server" ErrorMessage="*" ControlToValidate="tbPersonnes"  Display="Dynamic"></asp:RequiredFieldValidator>
                    </EditItemTemplate>
                </telerik:GridTemplateColumn>          
                <telerik:GridTemplateColumn DataField="DateRealisation" HeaderText="Date réalisation" UniqueName="DateRealisation"  ForceExtractValue="InEditMode">
                    <HeaderStyle Width="100px"/>
                    <ItemStyle Width="100px" VerticalAlign="Top"/>
                    <ItemTemplate>
                        <asp:Label ID="lblDateRealisation" runat="server" Text='<%# Eval("DateRealisation", "{0:dd/MM/yyyy}") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadDatePicker ID="dpDateRealisation" runat="server" SelectedDate='<%# Eval("DateRealisation")==DBNull.Value ? DateTime.Now.Date : Eval("DateRealisation") %>'></telerik:RadDatePicker>
                    </EditItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ButtonType="ImageButton"  EditText="Editer" UpdateText="Valider" CancelText="Annuler"  InsertText="Ajouter"
                    EditImageUrl="Resources/Images/Edit.gif" UpdateImageUrl="Resources/Images/Update.gif" CancelImageUrl="Resources/Images/Cancel.gif" InsertImageUrl="Resources/Images/Update.gif">
                    <HeaderStyle Width="40px" />  
                    <ItemStyle Width="40px" VerticalAlign="Top"/>    
                </telerik:GridEditCommandColumn>
            </Columns>
            <EditFormSettings>
                <EditColumn ButtonType="ImageButton" CancelText="Annuler" InsertText="Ajouter" UpdateText="Valider"
                 CancelImageUrl="Resources/images/Cancel.gif" UpdateImageUrl="Resources/images/Update.gif"  InsertImageUrl="Resources/images/Update.gif">
                </EditColumn>
            </EditFormSettings>
            <CommandItemTemplate>
                <asp:ImageButton ID="btnImageAddAction" runat="server" CommandName="InitInsert" ImageUrl="Resources/Images/Add.gif" style="vertical-align:middle;" />
                <asp:LinkButton ID="btnAddAction" runat="server" CommandName="InitInsert"  style="vertical-align:middle;">Ajouter une action</asp:LinkButton>
            </CommandItemTemplate>
        </MasterTableView>
        <ClientSettings>
            <ClientEvents OnPopUpShowing="PopUpShowing" />
            <Selecting AllowRowSelect="true" />
        </ClientSettings>
        <FilterMenu Skin="Office2007" EnableTheming="True">
            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
        </FilterMenu>
    </telerik:RadGrid>

But it doesn't work. Even if I don't put any date or text in my controls, the ItemCommand event is thrown. The worst is that I think it worked last week... What have i wrong ?

[Nean]
[Nean]
Top achievements
Rank 1
 answered on 12 Jul 2011
8 answers
83 views
Hy,

It seems that there is a style issue (maybe it has something to do with the one of the Radtoolbar). While the color of the text for "Design", "HTML", "Preview" is shown correctly under Firefox, it is kind of purple when showing the page with Internet Explorer (IE 9). I´ve tested the Skins Windows7 and Vista.

I am using the the Controls within a Webpart in an Sharepoint 2010 Environment.

Could you test it on your side?

Rumen
Telerik team
 answered on 12 Jul 2011
1 answer
202 views
Hey,

When I'm running my project on pc without internet connection telerik controls not working because the js files located on telerik website, is there a way to save this files locally.

Thanks.
Sebastian
Telerik team
 answered on 12 Jul 2011
1 answer
125 views
Hi

I have a radgrid of which I have made the EnableViewstate=false and added the OnNeedDatasource event. One column of the grid has delete buttons which is  image button. After disabling the view state the delete button is not working properly. The command argument and command name are not getting set properly. When the delete button is clicked its "OnCommand" event is fired but the command argument sets as empty there.

But it is set properly in the Onitemdatabound event. Under the same changes if i use linkbutton instead, it works fine. Please help.


Regards
Shirish 

Mira
Telerik team
 answered on 12 Jul 2011
1 answer
144 views
Hello,
I have a trivial problem, probably. Unfortunatelly I have no idea how to solve it. Bellow is my sample code to ilustrate the problem.
My TemplateColumn content (RadGrid2 control) has to have different functionality depends on Selectror column contents.
All ideas about what event of TemplateColumn or RadGrid2 (or others) i should use and how to get current Selector column/row value will be worm welcome. 
<telerik:RadTreeList ID="rtv" runat="server" DataSourceID="SqlDS" DataKeyNames="ID_ELEMENT" ParentDataKeyNames="ID_PARENT" DataMember="DefaultView" >
   <Columns>
      <telerik:TreeListBoundColumn DataField="Name" HeaderText="Name" UniqueName="columnName" ReadOnly="True">
      </telerik:TreeListBoundColumn>
      <telerik:TreeListBoundColumn DataField="SELECTOR" HeaderText="SELECTOR" ReadOnly="True" DataType="System.Int32" UniqueName="columnSELECTOR" Visible="False">
      </telerik:TreeListBoundColumn>
      <telerik:TreeListTemplateColumn UniqueName="Template" HeaderText="Template"
                DataField="ID_ELEMENT">
         <ItemTemplate>
            <telerik:RadGrid ID="RadGrid2" runat="server"  DataSourceID="SqlDS2">
               <MasterTableView DataSourceID="SqlDS2"></MasterTableView>
            </telerik:RadGrid>
         </ItemTemplate>
      </telerik:TreeListTemplateColumn>
   </Columns>
</telerik:RadTreeList>
 
<asp:SqlDataSource ID="SqlDS" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SELECT_COMMAND" SelectCommandType="StoredProcedure">
</asp:SqlDataSource>
 
<asp:SqlDataSource ID="SqlDS2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT_TEMPLATE" SelectCommandType="StoredProcedure">
   <SelectParameters>
      <asp:Parameter DefaultValue="0" Name="PARAM" Type="Int32" />
   </SelectParameters>
</asp:SqlDataSource>
Marin
Telerik team
 answered on 12 Jul 2011
3 answers
94 views
The double click event for the radsplitbar doesn't occurs when the spliter is in expanded mode..

but working fine when the spliter is in collapsed mode...

Give me some solution..
Dobromir
Telerik team
 answered on 12 Jul 2011
1 answer
106 views
Hello,

There are so many legends and need to display veticle instead of horizontal.

Legends should be on the right side of the chart.

What is the way to display legends at right and verticle ?

psa image for clear idea.
Evgenia
Telerik team
 answered on 12 Jul 2011
1 answer
70 views
Hi

I have a multi-select RadGrid.

I have supplied and ItemCommand handler in my server side code,
and it gets triggered when I click on a row.

I get the RowClick item command

However if I have focus on the grid and hold the shift key down
and then I hit the down or up arrows the Selection column
changes, but I don't get a server side ItemCommand triggered.

Is there some other event handler I need to hook into to handle
the shift key mechanism for multi-selecting?

TIA
Tsvetina
Telerik team
 answered on 12 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?