Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
583 views

Hi,

getting the famous webform_initcallback error that I cannot possibly solve with your advise in this form or internet..

asp page

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="WebApplication2.WebForm1" %>
 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
     
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
        </telerik:RadScriptManager>
        <br />
        <telerik:RadComboBox ID="RadComboBox1" Runat="server">
        </telerik:RadComboBox>
        <br />
     
    </div>
    </form>
</body>
</html>

No back end code...

error message

<!DOCTYPE html>
 
<head><title>
 
</title><link href="/WebResource.axd?d=b8adWYak0tImLef4A3fc9Z8_PHe8zKE0KBeii0SRRMrZL_rQKR3OpEAm8hUy-uv03lBksH755XDi7vSiZ89vE2Xm8yPpbVN8tgDpIGivYDQnNkR_vImJ98FznLpy2TKAt0SsnUx2PpsgZlfIGCOmNw2&t=635173547820000000" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=h0MkSn0fIoCPzk73lQFHIcHNbbdB7miPzq0lW5BCUc2QtaYhGg6oJBoMFR0wbWaB8UaxdZe3R9EyFVRK4ngG7EepI4EmV4tkPwQv3vgtmRmHTl8AEeJK5E0WCrCPbHzqJpTJv08DA_1P6x83siCLNOY_Sw2_VhZ4J8dyPVXyt-Q1&t=635173547820000000" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /></head>
<body>
    <form method="post" action="WebForm1.aspx" id="form1">
<div class="aspNetHidden">
<input type="hidden" name="RadScriptManager1_TSM" id="RadScriptManager1_TSM" value="" />
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="Tm5N149yuKmzXB/3B/Ftu2dBnyIRBLBAcvYw8KDmwRC/RfHfYVBiQgUN8ptL4eCcbTI1nKphaomYMnQpljB21sjXL0iRXqYJPSGxSyBRh83N5SX1V1/8v4/Ugrgz+N+zM/fOXegnUBVzVX2plp21ebPiA6udRabI2DvItsRdt2D/e2fNxfyi+dG9WdhoYu6zFnPqYpQOPi2ORTaMmuFz8BrZ4aDKbsHFslH9pwzhY5/5aPQcngfhwpBPqfartm35mbi5Oha7KTAL54PlE+5wd1yb9lKS0hWiuGM+fzehrownLdaZQCgCtgcnyh0t7s2el2150Y2QZzSbyUwPMncnpg==" />
</div>
 
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
    theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</script>
 
 
<script src="/WebResource.axd?d=pynGkmcFUV13He1Qd6_TZET-9_WfhWfl_XSuxoR-zJfEfiMeDl8e9dCAvy19aYDj4W7rFHhZMkA7EuwSPbjGhw2&t=635053916887951880" type="text/javascript"></script>
 
 
<script src="/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3abd2cc352-ff4f-463d-bb67-37f24bb2febd%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2013.3.1015.45%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a7a1d9c2d-6cf2-464f-9ad3-e479c730ac61%3a16e4e7cd%3af7645509%3a2003d0b8%3a24ee1bba%3af46195d3%3a1e771326%3a88144a7a%3aaa288e2d" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.');
//]]>
</script>
 
    <div>
     
        <script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('RadScriptManager1', 'form1', [], [], [], 90, '');
//]]>
</script>
 
        <br />
        <div id="RadComboBox1" class="RadComboBox RadComboBox_Default" style="width:160px;">
    <!-- 2013.3.1015.45 --><table summary="combobox" style="border-width:0;border-collapse:collapse;width:100%">
        <tr class="rcbReadOnly">
            <td class="rcbInputCell rcbInputCellLeft" style="width:100%;"><input name="RadComboBox1" type="text" class="rcbInput radPreventDecorate" id="RadComboBox1_Input" value="" readonly="readonly" /></td><td class="rcbArrowCell rcbArrowCellRight"><a id="RadComboBox1_Arrow" style="overflow: hidden;display: block;position: relative;outline: none;">select</a></td>
        </tr>
    </table><div class="rcbSlide" style="z-index:6000;"><div id="RadComboBox1_DropDown" class="RadComboBoxDropDown RadComboBoxDropDown_Default " style="display:none;"><div class="rcbScroll rcbWidth" style="width:100%;"></div></div></div><input id="RadComboBox1_ClientState" name="RadComboBox1_ClientState" type="hidden" />
</div>
        <br />
     
    </div>
     
 
<script type="text/javascript">
//<![CDATA[
 
WebForm_InitCallback();Sys.Application.add_init(function() {
    $create(Telerik.Web.UI.RadComboBox, {"_dropDownWidth":0,"_height":0,"_skin":"Default","_uniqueId":"RadComboBox1","clientStateFieldID":"RadComboBox1_ClientState","collapseAnimation":"{\"duration\":450}","expandAnimation":"{\"duration\":450}","itemData":[],"localization":"{\"AllItemsCheckedString\":\"All items checked\",\"ItemsCheckedString\":\"items checked\",\"CheckAllString\":\"Check All\"}"}, null, null, $get("RadComboBox1"));
});
//]]>
</script>
</form>
</body>
<script type="text/javascript">window.__vwd_mapping_data={"map":[{"sourceFile":"~/WebForm1.aspx"}]};</script>
<!-- Visual Studio Browser Link -->
<script type="text/javascript" src="/__vwd/js/artery"></script>
<!-- End Browser Link -->
</html>
What am I missing?

Slav
Telerik team
 answered on 02 Jun 2014
9 answers
1.6K+ views
How can i hide the grid when grid is bound to a null collection?

If i set grid visibility to false on grid_NeedDataSource event then no data is displayed even next time when it is bound  with some valid data.
Protected Sub gridConsolidation_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles gridConsolidation.NeedDataSource
    'Get filtered object data whose functional and technical improvement recommended
    Dim filterExpression As String
    filterExpression = String.Format("Opportunity_Id = {0} and Recommendation_Type_Id In ({1})", ddlOpportunity.SelectedValue, _
                                     CType(RecommendationType.Consolidation, Integer))

'dtRecommendationInitiative is a datatable to be used as grid datasource
    Dim dt As DataTable = GetFilteredDataview(dtRecommendationInitiative, filterExpression)
    Dim dataCount As Integer = dt.Rows.Count
    gridConsolidation.VirtualItemCount = dataCount
    gridConsolidation.AllowCustomPaging = Not ShouldApplySortFilterOrGroup(gridConsolidation)
    gridConsolidation.DataSource = dt
 
    'If gridConsolidation.Items.Count > 0 Then
 
    '    divConsolidationGrid.Style.Value = "display:block"
    '    btnMergeToExisting.Visible = True
    '    btnMergeToNew.Visible = True
    '    btnSave.Enabled = True
    '    btnCancel.Enabled = True
    'Else
    '    divConsolidationGrid.Style.Value = "display:none"
    '    btnMergeToExisting.Visible = False
    '    btnMergeToNew.Visible = False
    '    btnSave.Enabled = False
    '    btnCancel.Enabled = False
    'End If
End Sub


Regrds,
Abhishek
Princy
Top achievements
Rank 2
 answered on 02 Jun 2014
1 answer
118 views
Hi

I attached image , in web page i am getting background colour for all cells, but when i print whole page via File->Print , it is not picking background color , if i enable Background Colours and Image in Browser Page setting, then it is picking cell color

I set color like below
 TreeListDataItem item = (TreeListDataItem)e.Item;
item[month.ToString()].BackColor = System.Drawing.Color.Red;
 item[month.ToString()].ForeColor = System.Drawing.Color.Red;

Please guide me,
Karthik.K
Konstantin Dikov
Telerik team
 answered on 02 Jun 2014
1 answer
127 views
I have a form with a number of fields before a RadMaskedTextBox and a number of fields after. In Chrome or Opera, when the focus is placed on the RadMaksedTextBox, the validation must pass, or you cannot tab or click out of the field, which is not the expected behavior. Here is an example exhibiting this behavior.

<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
             <telerik:RadScriptManager ID="RadScriptManager1" AjaxFrameworkMode="Enabled" runat="server" CompositeScript-ScriptMode="Auto" EnableEmbeddedjQuery="False" LoadScriptsBeforeUI="False" OutputCompression="AutoDetect"></telerik:RadScriptManager>
         
             <telerik:RadMaskedTextBox ID="txtSSN4" class="numeric" PromptChar="" SelectionOnFocus="SelectAll" runat="server" Width="44px" MaxLength="4" Mask="####" DisplayMask="****" DisplayText=""
                                                TabIndex="4" meta:resourcekey="txtSSN4Resource1" HideOnBlur="True" AutoCompleteType="Disabled">
                                            </telerik:RadMaskedTextBox
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" Text="*" ForeColor="Red"
                                                        ControlToValidate="txtSSN4" ErrorMessage="SSN4 is required." meta:resourcekey="RequiredFieldValidator3Resource1" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                            <asp:RegularExpressionValidator runat="server" meta:resourcekey="SSN4RangeValidatorResource1" ID="SSN4RangeValidator" ForeColor="Red" ControlToValidate="txtSSN4" Text="Format is incorrect." ErrorMessage="SSN4 format is incorrect." ValidationExpression="[0-9]{4}" SetFocusOnError="True"></asp:RegularExpressionValidator>               
            <asp:TextBox runat="server" ID="abc"></asp:TextBox>
        </div>
    </form>
 
</body>
</html>
Viktor Tachev
Telerik team
 answered on 02 Jun 2014
2 answers
168 views
Hello,

I'm currently working on a project with RadGrid.

It is possible to add to the list of the columns, "select all/none" checkbox?

Thanks,
Daniel



Konstantin Dikov
Telerik team
 answered on 02 Jun 2014
3 answers
199 views
I am wondering if FindControl on the NodeDataBound is an upcoming feature? Or is it has been replaced with something else that I am missing?  I expected to be able to do e.Node.FindControl to find a control in my ItemTemplate but have not been able to do so yet.  A simple reasoning behind the need for this could be tied to the Soccer/Football example.  Say you wanted an image in the ItemTemplate of a Star that was only visible if the player was a team captain or something along that line.
Shinu
Top achievements
Rank 2
 answered on 02 Jun 2014
1 answer
215 views
Currently the predefined buttons like Add new record, Refresh etc. are rendered in 2 elements:
1. an input button displaying an icon only
2. a link displaying a text

In some skins (e.g. Silk) such buttons are not prominent enough so a rad button with an icon would work much better. E.g. to Add & Refresh buttons on this page to be replaced with corresponding buttons from here .
For sure, it can be done by using CommandItem Template but it seems to be much re-work required. 
I wonder is there an easy way to achieve it by using built-in radGrid settings or css?
Viktor Tachev
Telerik team
 answered on 02 Jun 2014
3 answers
734 views
Amazing how many times this question has to get asked. With so many posts, you'd figure that after over a year of being on the market, Telerik would clearly show how to resize a grid to fill the height and width of its container. Please Telerik, stop putting together dumb examples showing us how its done by placing a grid inside of web page with virtually nothing else. Real applications are more complex and the HTML layout gets complicated and affects how the grid operates. I have just spent 3 hours reading postings here, the documentation and online demos yet I haven't found a single source of help on showing a consistent way of resolving this problem. Here is how my page is setup:

On the page is a RadTabstrip. The first PageView is used to setup criteria that the user inputs. After pressing a Radtoolbar button located outside of the tabstrip, the second tab is shown. It is ajaxfied and contains a RadGrid. The grid is not visible until that RadToolbar button is pressed and the RadAjaxManager is used to update it. And no, I don't use a RadAjaxPanel. The grid does in fact gets shown. The grid at this point is suppose to resize automatically to the size of the pageview which it doesn't.

Having read many posts, it seems that you are suppose to set the height and width of the grid's container to fixed pixel values and NOT to 100%. The problem I have here is that if I set the pageview (or whatever the parent container is) to any fixed value, the grid will end up being that height and width as well. Yes, that's what I want but how am I suppose to get the pageview to resize when the browser resizes? Any attempts I have made to read the height and width of the pageview returns either empty or 0.
Princy
Top achievements
Rank 2
 answered on 02 Jun 2014
5 answers
196 views
I have a RadGrid with AllowMultiRowSelection="true", EnablePostBackOnRowClick="false", and UseClientSelectColumnOnly="false".  I want the click-on-row behavior to be the same as the click-on-checkbox behavior; namely, clicking on the row will toggle that row on and off.

I know this isn't the intended behavior of the grid, but it ought to be possible through some client-side scripting.  Can anyone help me figure out such a script?
Venelin
Telerik team
 answered on 02 Jun 2014
5 answers
259 views
Hi,

This problem has cost me a few hours. I have a RadWindow which NavigationUrl is set to a page of my project. If I show the page in Firefox, everything is working fine. If I show the page in IE a blank page is displayed.

The reason was, that I had the following line in my CSS of my target page:
html, body
{
position: relative;
}


After deleting this line the page was displayed correct.

FYI
Princy
Top achievements
Rank 2
 answered on 02 Jun 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?