Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
198 views
Hi,

I am working on one simple ASP.Net page which has very few controls (textbox, combo box and search button) apart from two separate Radgrid controls. 

I am attaching data coming from WCF service after hitting Search button. The data coming from WCF is also correct and comparatively small in size. (15 -20 records at the max).

This scenario is works for other pages on the application except one page, I am getting following JavaScript error while loading ViewState-  Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Failed to load viewstate.  The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.  For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.

So I managed to display data by using following settings

EnableViewState="true" ViewStateMode="Disabled".

But the issue is I want to use inline edit mode for insert and some other events are also not fired with disabled viewstate.

I would like to know what might go wrong with the radGrid and i am getting the above error?
This behavior is not observed on other ASP.Net pages on the site.

During testing, i just binded data to simple code like
<rad:RadGrid ID="grAccruals" runat="server" /> and got view state error
and I am able to display data with
<rad:RadGrid ID="grAccruals" runat="server" EnableViewState="true" ViewStateMode="Disabled"/>

Can anybody help me on debugging this issue? Which area I should look for to enable view state?

Thanks in advanced.

Mandy
Top achievements
Rank 1
 asked on 11 Jul 2012
1 answer
69 views
Hello
I have the following ASPX code

<telerik:RadNumericTextBox ID="Tmonto" runat="server" SkinID="campoNT">

This used to render as the following HTML code prior to the upgrade (formatting tags removed)
<input name="ctl00_CP1_Tmonto_text" class="riTextBox riEnabled" id="ctl00_CP1_Tmonto_text"&nbsp; type="text" />


But now it renders as:
<input name="ctl00$CP1$Tmonto" class="riTextBox riHover" id="ctl00_CP1_Tmonto"&nbsp; type="text" />


The control ID has changed!? However, I have a lot of script code that references "ctl00_cp1_Tmonto_text"  !
Do I need to change all such code? Is there some setting that allows "old style" rendering? Which are now the "rules"? is" _text" no longer appended?

Kostadin
Telerik team
 answered on 11 Jul 2012
1 answer
198 views
In a radtreeview I need to change the text colour when expand. i.e. nodes should have a different colour if it get expanded once.
Princy
Top achievements
Rank 2
 answered on 11 Jul 2012
3 answers
70 views
I have a grid with a very large number of columns (40+). We hide most by default, but we need to be able to show/hide all of them. Because there are so many columns, the 'Columns' menu in the HeaderContextMenu has become unusably large, especially on lower resolution screens. I'd like to split this menu into several much smaller menus. I've been able to add more menus to the HeaderContextMenu and move items from the 'Columns' menu into my new menus, but once I move the items, they no longer function. How can I split them into multiple menus and have them still behave as expected?
Maria Ilieva
Telerik team
 answered on 11 Jul 2012
3 answers
210 views
Hello @ all,

after using RadComboBox inside my Application it seems that all asp:LinkButtons, that are render inside an asp:DataList, are broken.
I got a page, were i implemented an asp:DataList that renders multiple asp:LinkButtons with dynamic CommandArguments and CommandNames. 
<asp:DataList ID="_myControlDataList" runat="server" OnDataBinding="OnMyControlDataBind"
            RepeatDirection="Vertical" BorderWidth="0px" CellPadding="0" CellSpacing="0"
            Width="100%">
            <ItemTemplate>
                <asp:LinkButton runat="server" ID="_myControlItemLink" CommandName='<%# DataBinder.Eval(Container.DataItem, "CommandName") %>'
                    CommandArgument='<%# DataBinder.Eval(Container.DataItem, "CommandArgument") %>'
                    OnCommand="OnItemCommand" ToolTip='<%# DataBinder.Eval(Container.DataItem, "ToolTip") %>' >
                    <div class="toolbarPopupText">
                        <img class="toolbarPopupIcon" border="0" src='<%# DataBinder.Eval(Container.DataItem, "ImageUrl") %>' title='<%# DataBinder.Eval(Container.DataItem, "ToolTip") %>' />
                        <%# DataBinder.Eval(Container.DataItem, "Name") %>
                    </div>
                </asp:LinkButton>
            </ItemTemplate>
            <SeparatorTemplate>
            </SeparatorTemplate>
        </asp:DataList>

Till now, everything works fine.

Then i started to implement an RadComboBox (loading content dynamic) on that page. Example shows RadComboBox inside of an DataList, but behavior is the same.

<tc:RadComboBox ID="_radComboBox" runat="server"
                                Key='<%# DataBinder.Eval(Container.DataItem, "Key") %>'
                                DataTextFormatString='<%# DataBinder.Eval(Container.DataItem, "Name") %>'
                                Width="250px"
                                Height="250px"
                                CssClass="stringBox"
                                AutoPostBack="true"
                                MarkFirstMatch="true"
                                EnableLoadOnDemand="true"
                                HighlightTemplatedItems="true"
                                EnableVirtualScrolling="true"
                                ShowMoreResultsBox="false"
                                ShowWhileLoading="true"
                                ShowDropDownOnTextboxClick="true"
                                OnSelectedIndexChanged="OnSelectedIndexChanged"                              
                                OnDataBinding="OnItemDataBind"
                                OnItemDataBound="OnItemDataBound"
                                OnItemsRequested="OnItemsRequested"
                                OnLoad="OnComboBoxLoad">
                            <ItemTemplate>
                                <table class="directAccessTable">
                                    <tr class="directAccessTRName" valign="top">
                                        <td rowspan="2" valign="top">
                                            <asp:Image runat="server" ID="_status"
                                                AlternateText=<%# DataBinder.Eval(Container.DataItem, "ImageText") %>
                                                ImageAlign="Middle"
                                                ImageUrl=<%# DataBinder.Eval(Container.DataItem, "ImageIcon") %>
                                                ToolTip=<%# DataBinder.Eval(Container.DataItem, "ImageText") %>
                                                Visible=<%# DataBinder.Eval(Container.DataItem, "ImageVisible") %> />
                                        </td>
                                        <td valign="top"><span class="directAccessName"><%# DataBinder.Eval(Container.DataItem, "Name") %></span></td>
                                    </tr>
                                    <tr valign="top" class="directAccessTRDesc">
                                        <td valign="top"><span class="directAccessDescription"><%# DataBinder.Eval(Container.DataItem, "Description")%></span></td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </tc:RadComboBox>

Now, if i do not touch the RadComboBox, the link buttons work fine. But after loading the Content on Demand, the asp:LinkButtons above are broken and i got these JS Errormessages in FF and Crome and no Postbacks were send:

POST http://localhost/Aplication/ 405 (Method Not Allowed) ScriptResource.axd:2
w.executeRequest ScriptResource.axd:2
w.executeRequest ScriptResource.axd:2
w.invoke ScriptResource.axd:2
e._onFormSubmit ScriptResource.axd:2
e._doPostBack ScriptResource.axd:2
w.createDelegate ScriptResource.axd:2
WebForm_DoPostBackWithOptions WebResource.axd:42
e._doPostBackWithOptions ScriptResource.axd:2
w.createDelegate ScriptResource.axd:2
(anonymous function) /Application/:1
Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 405 ScriptResource.axd:2
w.create ScriptResource.axd:2
e._createPageRequestManagerServerError ScriptResource.axd:2
e._onFormSubmitCompleted ScriptResource.axd:2
w.createDelegate ScriptResource.axd:2
w.getHandler ScriptResource.axd:2
d ScriptResource.axd:2
w.completed ScriptResource.axd:2
b.Net.XMLHttpExecutor.f._onReadyStateChange

After searching a bit on telerik page i found a possible solution that counts on telerik-Settings in web.config page. But everything i change there doesn't fix my problem. Maybe someone can help me?

Here are my web.config Settings for Telerik:
    <modules>
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" preCondition="integratedMode" />
      <add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode" />
    </modules>
    <handlers>
      <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode" />
      <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode" />
      <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode" />
      <add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode" />
      <add name="ASBXHandler" verb="GET,HEAD,POST" path="*.asbx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    </handlers>
<httpHandlers>
      <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />
      <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />
      <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />
      <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" />
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
</httpHandlers>
 
<httpModules>
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" />
      <add name="RadCompression" type="Telerik.Web.UI.RadCompression" />
</httpModules>

My Telerki.Web.UI.dll has the Version 2012.1.215.40

Can anyone help me? 
What more informations do you maybe need?
 
Tobias
Top achievements
Rank 1
 answered on 11 Jul 2012
0 answers
66 views
Hi everyone, 

I'm using a Radgrid to show some information... One of the features i've decided to set is the Export to Excel.

Everything works fine, except for some fields that are Guids.... Those values for the guids don't are exported to the file.

Any help would be very appreciated.
antao
Top achievements
Rank 1
 asked on 11 Jul 2012
3 answers
1.5K+ views
Hi
I am using radgrid 5.1.2
I am sure this is an obvious question but I can't find it in the documentation. How do i find the row index of the grid in the item data bound event
thanks
Princy
Top achievements
Rank 2
 answered on 11 Jul 2012
3 answers
58 views
I have a radGrid and am trying to get the ItemCommand buttons working. When the item command button is clicked the ItemCommand event filres and I can see here that the grid has 4 items (rgdGrid.Items.Count = 4). But when the page pre render event fires the items have been lost (rgdGrid.Items.Count = 0).

I bind data programatically then the grid is first shown and do not need to do it again. Viewstate is enabled for this grid control.

Any ideas?
------------------------------------------

protected

 

void rgdGrid_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)

 

protected

 

override void OnPreRender(EventArgs e)
------------------------------------------

 

<

 

telerik:RadGrid ID="rgdGrid" runat="server" AutoGenerateColumns="False" Culture="en-GB"

 

 

 

 

 

ShowStatusBar="True" ShowFooter="False" OnUpdateCommand="rgdGrid_UpdateCommand"

 

 

 

 

 

OnEditCommand="rgdGrid_EditCommand"

 

 

OnItemDataBound="rgdGrid_ItemDataBound" OnCancelCommand="rgdGrid_CancelCommand"

 

 

 

 

 

AllowSorting="True" GroupingEnabled="False" OnSortCommand="rgdGrid_SortCommand"

 

 

 

 

 

Width="100%" ShowGroupPanel="True" Skin="Web20" MasterTableView-CellPadding="0"

 

 

 

 

 

MasterTableView-CellSpacing="0" CellPadding="0"

 

 

onitemcommand="rgdGrid_ItemCommand">

 

 

 

 

 

<MasterTableView EnableHeaderContextMenu="true" EditMode="InPlace" ItemStyle-Wrap="False"

 

 

 

 

 

CommandItemDisplay="TopAndBottom" >

 

 

 

 

 

<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">

 

 

 

 

 

</RowIndicatorColumn>

 

 

 

 

 

<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">

 

 

 

 

 

</ExpandCollapseColumn>

 

 

 

 

 

<Columns>

 

-----------------------------------------------------

<

 

CommandItemTemplate>

 

 

<p style="text-align: right;">

 

 

<asp:LinkButton ID="btnEditSelected" runat="server" CommandName="EditAll" Visible="True"

 

 

Text="Edit" />

 

 

<asp:LinkButton ID="btnUpdate" runat="server" CommandName="UpdateAll" Visible="True"

 

 

Text="Update" />

 

 

</p>

 

 

</CommandItemTemplate>

 

Shinu
Top achievements
Rank 2
 answered on 11 Jul 2012
2 answers
305 views
Hi all, i have a problem with RadGrid.

When i enter into a page where there is a RadGrid, i want that RadGrid Insert Form is opened.

I have looked for on the forum but i didint find any solution for my problem.

I tryed what you suggested in the following forum

http://www.telerik.com/community/forums/aspnet/grid/i-want-call-radgrid1-insertcommand-from-a-button-out-of-rad-grid.aspx#484224

but my case is a bit different.


I have tryed to call

radgrid1.Items[0].FireCommandEvent("InitInsert", string.Empty)

in Page_Load and this works if i have at least 1 item. If my RadGrid is empty, it fires and exception because the radgrid1.Items[0] doesn't exist. Can you give me a little advice?

Many thank
Alessandro
Alessandro
Top achievements
Rank 1
 answered on 11 Jul 2012
1 answer
153 views
I'm getting this error constantly:

http://i.imgur.com/CYPdu.jpg 

This happens when I click in a RadButton that fires a RadAlert using this:

DirectCast(Me.Page.FindControl("WindowManager"), RadWindowManager).RadAlert("Endereço foi salvo com sucesso.", 330, 100, "Sucesso", "alertCallBackFn")

My WindowManager is:

<telerik:RadWindowManager ID="WindowManager" runat="server" EnableShadow="true" EnableViewState="false" ReloadOnShow="true">
    <ConfirmTemplate>
        <div class="rwDialogPopup radconfirm">
            <div class="rwDialogText">
                {1}
            </div>
            <div>
                <a onclick="$find('{0}').close(true);" class="rwPopupButton" href="javascript:void(0);"><span class="rwOuterSpan"><span class="rwInnerSpan">Sim</span></span></a> <a onclick="$find('{0}').close(false);" class="rwPopupButton" href="javascript:void(0);"><span class="rwOuterSpan"><span class="rwInnerSpan">Não</span></span></a>
            </div>
        </div>
    </ConfirmTemplate>
</telerik:RadWindowManager>

And my callback function It's:

<telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
    <script language="javascript" type="text/javascript">
 
        function alertCallBackFn(arg) {
            CloseRadWindow();
        }
 
        function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow)
                oWindow = window.radWindow;
            else if (window.frameElement.radWindow)
                oWindow = window.frameElement.radWindow;
            return oWindow;
        }
 
        function CloseRadWindow() {
            var oWindow = GetRadWindow();
            oWindow.argument = null;
            oWindow.close();
            return false;
        
 
    </script>
</telerik:RadCodeBlock>

All this code is on a page that is opened through RadWindow, and the error happens before the RadAlert it is shown.
Slav
Telerik team
 answered on 11 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?