Telerik Forums
UI for ASP.NET AJAX Forum
14 answers
327 views
Hi,

After an AJAX postback occurs, I notice that the CSS is reloaded but with an incorrectly html encoded & instead of &.

This is a bit hard to explain, so please see it for yourself at this site: http://tinyurl.com/4zcuexz

The three cascading drop downs on the right of the screen use Telerik Ajax.

To reproduce the bug:

1) Open Firebug's CSS panel, and you will see that there is a CSS file called something like DependencyHandler.axd?s=L2Nzcy9tYWluLmNzczs%3d&t=Css&cdv=97

2) Initiate an ajax postback by making a selection from the top drop down.

3) Now look in Firebug and you will see that a new CSS stylesheets has appeared, with an incorrectly encoded & in the querystring:
DependencyHandler.axd?s=L2Nzcy9tYWluLmNzczs%3d&t=Css&cdv=97

This website was built a long time ago, and we are using version 2010.3.1317.40 of Telerik.
Antonio Stoilkov
Telerik team
 answered on 22 Aug 2012
9 answers
732 views

Hi,

    I've been encountering a problem when I use RadScriptManager. In the master page, I registered the Telerik.Web.UI and added the RadScriptManager.

<%@ Register Assembly="Telerik.Web.UI, Version=2008.1.619.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 

and added the RadScriptManager:

<telerik:RadScriptManager ID="ScriptManager1" runat="server" EnableTheming="True"/>  

But when I try to use this master page, I get an error. The error says:

NullReferenceException: Object reference not set to an instance of an object.]
   Telerik.Web.UI.WebResource.Exists(String path, String applicationPath) +257
   Telerik.Web.UI.RadScriptManager.OnPreRender(EventArgs e) +80
   System.Web.UI.Control.PreRenderRecursiveInternal() +77
   System.Web.UI.Control.PreRenderRecursiveInternal() +161
   System.Web.UI.Control.PreRenderRecursiveInternal() +161
   System.Web.UI.Control.PreRenderRecursiveInternal() +161
   System.Web.UI.Control.PreRenderRecursiveInternal() +161
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360


I am not sure what the problem is or where to start looking. I tried removing the RadScriptManager and use <asp:ScriptManager> instead and the error is gone. Can somebody help me with this?

Thank you!


Regards,
Francis

Daniel
Telerik team
 answered on 22 Aug 2012
3 answers
194 views
How do you prevent the RadMenu from displaying the submenu items as a drop down.

For example:

+ Home
+ Services
   - Coding
   - Web Design
   - SQL Server
+ Contact

I only want to display: Home | Services | Contact

Thanks!
Princy
Top achievements
Rank 2
 answered on 22 Aug 2012
25 answers
503 views
I'm trying to install Telerik ASP.NET 2011 Q1 and it's failing. 

First download installation log: http://dl.dropbox.com/u/1929707/Telerik.Web.UI_2011_1_315_Dev.msi.log
Second download installation log: http://dl.dropbox.com/u/1929707/Telerik.Web.UI_2011_1_315_Dev%20%281%29.msi.log

Thanks,
Daryl
Chavdar Dimitrov
Telerik team
 answered on 22 Aug 2012
1 answer
79 views
I can load a RadGrid in the main page using get_masterTableView().  However, If I have the grid in an ASCX page, what do I need to do to load that grid from the main ASPX page?  I can get a reference to the grid:
var myGrid = document.getElementById('<%= ((RadGrid)myControl.FindControl("RadGrid1")).ClientID %>')
but get_masterTableView() is not valid for myGrid.
Marin
Telerik team
 answered on 22 Aug 2012
3 answers
190 views
I have been adding validation to a RadGrid, whenever i try to add any Validation groups it causes the RequiredFieldValidator to not work at all

Is there any work around for this? I would like to have a summary of errors listed

<telerik:RadGrid ID="RadGrid2" runat="server" Width="100%"
                    AllowAutomaticInserts="True"
                    AllowAutomaticUpdates="True"
                    AllowPaging="True"
                    AllowMultiRowEdit="false"
                    AllowMultiRowSelection="false"
                    AutoGenerateColumns="False"
                    DataSourceID="SqlDataSource2"
                    EnableLinqExpressions="false"
                    GridLines="None"
                    OnItemCreated="RadGrid2_ItemCreated"
                    OnItemDataBound="RadGrid2_ItemDataBound"
                    OnItemUpdated="RadGrid2_ItemUpdated"
                    OnItemInserted="RadGrid2_ItemInserted"
                    OnDataBound="RadGrid2_DataBound"
                    OnItemCommand="RadGrid2_ItemCommand"
                    OnPreRender="RadGrid2_PreRender">
                    <PagerStyle Mode="NextPrevAndNumeric" />
                    <MasterTableView Width="100%" CommandItemDisplay="Bottom" EditMode="InPlace"
                        DataSourceID="SqlDataSource2" HorizontalAlign="NotSet" AutoGenerateColumns="false">
                        <Columns>
                            <telerik:GridBoundColumn DataField="ProductTypeId" HeaderText="ProductTypeId" SortExpression="ProductTypeId" UniqueName="ProductTypeId" Visible="false">
                            </telerik:GridBoundColumn>
 
                            <telerik:GridBoundColumn DataField="ProductAttributeDefKeyOri" HeaderText="ProductAttributeDefKeyOri" SortExpression="ProductAttributeDefKeyOri" UniqueName="ProductAttributeDefKeyOri" Visible="false">
                            </telerik:GridBoundColumn>
                             
                            <telerik:GridDropDownColumn ListTextField="Name" ListValueField="ProductAttributeDefKey" DataSourceID="SqlDataSource3" HeaderText="Attribute" DataField="ProductAttributeDefKey" UniqueName="ProductAttributeDefKey" DropDownControlType="DropDownList" EnableEmptyListItem="true" EmptyListItemText="Select an attribute..." EmptyListItemValue="">
                            </telerik:GridDropDownColumn>
 
                            <telerik:GridTemplateColumn DefaultInsertValue="1" DataField="SortOrder" HeaderText="Sort Order" SortExpression="SortOrder" UniqueName="SortOrder"  ForceExtractValue="Always" >
                                <EditItemTemplate>
                                    <telerik:RadNumericTextBox runat="server" ID="tbSortOrder" DbValue='<%# Bind("SortOrder") %>' ShowSpinButtons="true" SpinDownCssClass="" SpinUpCssClass="" Width="50px" MinValue="1" MaxValue="999" NumberFormat-DecimalDigits="0" CssClass="textbox_increment">
                                    </telerik:RadNumericTextBox>
                                    <asp:RequiredFieldValidator runat="server" ControlToValidate="tbSortOrder" ErrorMessage="*" ValidationGroup="grid2"></asp:RequiredFieldValidator>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <%# Eval("SortOrder")%>
                                </ItemTemplate>
                                <ItemStyle CssClass="MyImageButton" />
                            </telerik:GridTemplateColumn>
 
                            <telerik:GridCheckBoxColumn DataField="Enabled" HeaderText="Enabled" SortExpression="Enabled" UniqueName="Enabled" DefaultInsertValue="Checked"  >
                            </telerik:GridCheckBoxColumn>
 
                            <telerik:GridCheckBoxColumn DataField="Required" HeaderText="Required" SortExpression="Required" UniqueName="Required" DefaultInsertValue="1">
                            </telerik:GridCheckBoxColumn>
 
                            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                                <ItemStyle CssClass="MyImageButton" />
                            </telerik:GridEditCommandColumn>
                        </Columns>
                        <EditFormSettings ColumnNumber="2" CaptionFormatString="Edit Attribute" InsertCaption="Add Attribute">
                            <FormTableItemStyle Wrap="true"></FormTableItemStyle>
                            <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
                            <FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="0" BackColor="White" Width="100%" />
                            <FormTableStyle CellSpacing="0" CellPadding="1" BackColor="White" />
                            <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
                            <PopUpSettings Modal="true" />
                            <EditColumn ButtonType="ImageButton" InsertText="Add Attribute" UpdateText="Update Attribute" UniqueName="EditCommandColumn1" CancelText="Cancel Edit"></EditColumn>
                            <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
                        </EditFormSettings>
                        <CommandItemSettings AddNewRecordText="Add Attribute" />
                    </MasterTableView>
                </telerik:RadGrid>

protected void RadGrid2_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
        {
            if (e.Item is GridEditableItem && e.Item.IsInEditMode)
            {
                //attribute validation
                GridEditableItem item = e.Item as GridEditableItem;
                DropDownList dropDownList1 = item["ProductAttributeDefKey"].Controls[0] as DropDownList;
                GridDropDownColumnEditor editor = (GridDropDownColumnEditor)item.EditManager.GetColumnEditor("ProductAttributeDefKey");
                TableCell cell = (TableCell)editor.ContainerControl;
 
                RequiredFieldValidator validator = new RequiredFieldValidator();
                validator.ControlToValidate = dropDownList1.ID;
                validator.ErrorMessage = "*";
                validator.ValidationGroup = "grid2";
                cell.Controls.Add(validator);
            }
             
            if (e.Item is GridEditableItem && e.Item.IsInEditMode)
            {
                if (e.Item.OwnerTableView.IsItemInserted)
                {
                    //set required and enabled default values for inserting
                    GridEditableItem edititem = (GridEditableItem)e.Item;
                    CheckBox chkbx = (CheckBox)edititem["Enabled"].Controls[0];
                    chkbx.Checked = true;
                    chkbx = (CheckBox)edititem["Required"].Controls[0];
                    chkbx.Checked = true;
                }
            }
        }

Marin
Telerik team
 answered on 22 Aug 2012
1 answer
96 views
Hi, I was searching for the telerik radtextbox in my asp.net project and I can't find the control. Am I able to use this control in my web project? If so, could you tell me how I would get that dll into my project so I can start using the control?

Thanks,
Ben
Shinu
Top achievements
Rank 2
 answered on 22 Aug 2012
3 answers
156 views
I had several issues when I converted my classic radcontrols Q3 2008 to asp.net ajax Q1 2012. I had updated as well the framework from .Net 2.0 to .Net 4.0 and using Visual Studio 2010 from VS2k5. Now only button works well with RadAjaxManager. All my asp Dropdown, Checkbox, Radiobutton etc dont fire postback anymore and no longer works with RadAjaxManager. Any reason why this happen? Any workaround?
Cat Cheshire
Top achievements
Rank 1
 answered on 22 Aug 2012
1 answer
120 views
When I drag a file over the upload text, it will show a section with text "Drop files here". Is there a way to customize the section style such as backgroud-color, padding-top, padding-left?
Princy
Top achievements
Rank 2
 answered on 22 Aug 2012
4 answers
513 views
Hi,

I am using asp.net 2.0.

Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand
        If e.CommandName = "RowClick" Then
            Dim item As GridDataItem = e.Item
            selUserid = item("UserId").Text
            TxtName.Text = item("Name").Text
            TxtUserName.Text = item("UserName").Text
            TxtEmail.Text = item("Email").Text
            TxtPassword.Text = item("Password").Text 
            TxtPhone.Text = item("UserPhone").Text
            cmbCity.Text = item("PosId").Text
        End If
    End Sub


The password textbox is in password mode, but by clicking on grid all the textboxes are filled with values except password textbox.

Can any body help me out.

Thanks in advance
Shinu
Top achievements
Rank 2
 answered on 22 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?