Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
254 views
I have a RadGrid with "add new record" features. The table fits perfectly in the window but when I click on "Add new record", it opens up and became too big for the window. How can I keep the table within the same dimensions after clicking on "add new record"?
Princy
Top achievements
Rank 2
 answered on 27 Aug 2013
2 answers
221 views
Hi,
I want use the RadRotator for show the news of a site.

Populate Control
DataTable dt = new LuposArt.AssistenzaRullo.News().GetCollection();
RadRotator1.DataSource = dt;
RadRotator1.DataBind();


ASPX Control
<telerik:RadRotator ID="RadRotator1" runat="server" RotatorType="AutomaticAdvance" ScrollDirection="Up" ScrollDuration="20000" FrameDuration="1000" >
<ItemTemplate>
<b><%# DataBinder.Eval(Container.DataItem, "NewsDate")%> - <%# DataBinder.Eval(Container.DataItem, "NewsTitle")%></b><br />
<div><%# DataBinder.Eval(Container.DataItem, "NewsNote")%>
</ItemTemplate>
</telerik:RadRotator>


If I set the property ScrollDirect="Up" the control show all the news of colelction (3 news)
If I cut the property ScrollDirect the control work good (scrool right==>left) but is not that I want.
I want the vertical scroll...

I don't understand the problem :-(

lupotana
Top achievements
Rank 1
 answered on 27 Aug 2013
2 answers
592 views
I have a web form that keeps throwing this error:

SCRIPT5007: Object expected
Telerik.Web.UI.WebResource.axd, line 6 character 51366

It shows MicrosoftAjax.js, obfuscated.
At the indicated location we see:

return function(c,d){for(var b=0,e=a.length;b<e;b++)a[b](c,d)}},

The error is on the bolded part. The element a[0] is null.

I know this isn't a Telerik issue but I'm not sure if we can manipulate the environment to get Telerik.Web.UI.WebResource.axd to load another MicrosoftAjax.js from CDN or elsewhere.

How can we diagnose this?

Only IE seems to choke on the issue. FireFox might be choking too but silently. My code is not behaving well and I'm not sure if this error has anything to do with it.

Thanks.
TonyG
Top achievements
Rank 1
 answered on 27 Aug 2013
4 answers
481 views
Hi All,
  I have Three level Hierarchy RadGrid.
  I have to display the grid  all records(master or details table) expended mode.
  And its working fine by enabling property of master & detailTables HierarchyDefaultExpanded="true"
  But problem is i want to hide the "Header of detailsTables" if there is no child records in any level.

Any Suggestion?

Thanks,
Surander
Waseem
Top achievements
Rank 1
 answered on 26 Aug 2013
3 answers
2.6K+ views
I am using a RadGrid to list a bunch of records using an ItemTemplate format, but want to hide the fact that it is actually a grid.

Right now, all the headers are visible, including those for columns not being included in the ItemTemplate.

I'm sure I am just missing a simple setting, but I can't find it.  How do I hide the headers altogether?
Waseem
Top achievements
Rank 1
 answered on 26 Aug 2013
2 answers
178 views
please help me. ı have a rad editör. when ı export content to pdf. turkis carakter convert #. how can ı solve this problem.
mehmet
Top achievements
Rank 1
 answered on 26 Aug 2013
1 answer
149 views

Hi,

I have problem with hierarchical grid. It loses child tables and data after postback. The problem is with my own component which wraps grid with search textbox control.

If I'm using grid without my component it works correctly:

<telerik:RadGrid ID="grd" runat="server" PageSize="40" DataSourceID="ds1" AllowPaging="true" AllowAutomaticDeletes="true" Width="650px"
        OnSelectedIndexChanged="userList_ResultGrid_SelectedIndexChanged" OnItemDeleted="userList_ResultGrid_ItemDeleted">
        <MasterTableView AutoGenerateColumns="false" DataKeyNames="Id" ClientDataKeyNames="Id" HierarchyLoadMode="Client">
            <DetailTables>
                <telerik:GridTableView DataSourceID="ds2" DataKeyNames="Id" ClientDataKeyNames="Id" Width="100%" Name="UserRoles" AutoGenerateColumns="false" AllowPaging="false" NoDetailRecordsText="No additional roles assigned with this user.">
                    <ParentTableRelation>
                        <telerik:GridRelationFields DetailKeyField="PrimaryUserId" MasterKeyField="Id" />
                    </ParentTableRelation>
                    <Columns>
                        <telerik:GridBoundColumn DataField="Role.Title" HeaderText="Role" />
                    </Columns>
                </telerik:GridTableView>
            </DetailTables>
            <Columns>
                <telerik:GridTemplateColumn HeaderText="">
                    <HeaderStyle Width="32px" />
                    <ItemTemplate>
                        <asp:Panel ID="Active" runat="server" Style="height: 16px; width: 16px;" CssClass='<%# (bool)Eval("Active") ? "active-user" : "disabled-user" %>' />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn DataField="Name" HeaderText="User Name" />
                <telerik:GridBoundColumn DataField="Email" HeaderText="Login" />
                <telerik:GridButtonColumn ConfirmText="Are you sure you want to delete this user?"
                    ConfirmDialogType="Classic" ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete"
                    Text="Delete" UniqueName="DeleteColumn" ImageUrl="~/Data/Skins/First/Grid/Delete.png">
                    <HeaderStyle Width="32px" />
                    <ItemStyle HorizontalAlign="Center" />
                </telerik:GridButtonColumn>
            </Columns>
        </MasterTableView>
        <ClientSettings EnablePostBackOnRowClick="true">
            <Selecting AllowRowSelect="true" />
            <ClientEvents OnRowContextMenu="users_RowContextMenu" />
            <Scrolling AllowScroll="True" UseStaticHeaders="True" EnableVirtualScrollPaging="True" />
        </ClientSettings>
    </telerik:RadGrid>
    <asp:EntityDataSource ID="ds1" runat="server" ContextTypeName="ImpersonatedSecurityEntities" EntitySetName="Users" Where="it.PrimaryUserId is null" />
    <asp:EntityDataSource ID="ds2" runat="server" ContextTypeName="ImpersonatedSecurityEntities" EntitySetName="Users" Where="it.PrimaryUserId = @PrimaryUserId">
        <WhereParameters>
            <asp:Parameter Name="PrimaryUserId" DbType="Guid" />
        </WhereParameters>
    </asp:EntityDataSource>

I'm using my component more than 1 year without problems but I never defined hierarchy. Now I added hierarchy and it does not work. Here is the code:

<bfo:GridSmartSearch ID="userList" runat="server" ShowAlphabeticPager="true" AlphabeticPagerType="Full"
    GridSmartSearchType="AjaxManager">
    <SearchTextBox EmptyMessage="Type here to search users..." Width="250px" />
    <ResultGrid PageSize="40" AllowPaging="true" AllowAutomaticDeletes="true" Width="650px"
        OnSelectedIndexChanged="userList_ResultGrid_SelectedIndexChanged" OnItemDeleted="userList_ResultGrid_ItemDeleted">
        <MasterTableView AutoGenerateColumns="false" DataKeyNames="Id" ClientDataKeyNames="Id" HierarchyLoadMode="Client">
            <DetailTables>
                <telerik:GridTableView DataSourceID="dsA" DataKeyNames="Id" ClientDataKeyNames="Id" Width="100%" Name="UserRoles" AutoGenerateColumns="false" AllowPaging="false" NoDetailRecordsText="No additional roles assigned with this user.">
                    <ParentTableRelation>
                        <telerik:GridRelationFields DetailKeyField="PrimaryUserId" MasterKeyField="Id" />
                    </ParentTableRelation>
                    <Columns>
                        <telerik:GridBoundColumn DataField="Role.Title" HeaderText="Role" />
                    </Columns>
                </telerik:GridTableView>
            </DetailTables>
            <Columns>
                <telerik:GridTemplateColumn HeaderText="">
                    <HeaderStyle Width="32px" />
                    <ItemTemplate>
                        <asp:Panel ID="Active" runat="server" Style="height: 16px; width: 16px;" CssClass='<%# (bool)Eval("Active") ? "active-user" : "disabled-user" %>' />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn DataField="Name" HeaderText="User Name" />
                <telerik:GridBoundColumn DataField="Email" HeaderText="Login" />
                <telerik:GridButtonColumn ConfirmText="Are you sure you want to delete this user?"
                    ConfirmDialogType="Classic" ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete"
                    Text="Delete" UniqueName="DeleteColumn" ImageUrl="~/Data/Skins/First/Grid/Delete.png">
                    <HeaderStyle Width="32px" />
                    <ItemStyle HorizontalAlign="Center" />
                </telerik:GridButtonColumn>
            </Columns>
        </MasterTableView>
        <ClientSettings EnablePostBackOnRowClick="true">
            <Selecting AllowRowSelect="true" />
            <ClientEvents OnRowContextMenu="users_RowContextMenu" />
            <Scrolling AllowScroll="True" UseStaticHeaders="True" EnableVirtualScrollPaging="True" />
        </ClientSettings>
    </ResultGrid>
    <DataSource TypeName="Bfgl.First.Web.UI.UsersGridSmartSearchDataSource" DeleteMethod="Delete">
        <SelectParameters>
            <asp:ControlParameter Name="category" ControlID="cmdUserFilterCategory" ConvertEmptyStringToNull="true" />
            <asp:ControlParameter Name="roleId" ControlID="cmdUserFilterRole" ConvertEmptyStringToNull="true" />
        </SelectParameters>
    </DataSource>
    <ControlsContainer>
        <asp:EntityDataSource ID="ds2" runat="server" ContextTypeName="Bfgl.First.Security.Data.Models.ImpersonatedSecurityEntities" EntitySetName="Users" Where="it.PrimaryUserId = @PrimaryUserId">
            <WhereParameters>
                <asp:Parameter Name="PrimaryUserId" DbType="Guid" />
            </WhereParameters>
        </asp:EntityDataSource>
    </ControlsContainer>
</bfo:GridSmartSearch>

And here are key parts of GridSmartSearch component:

public partial class GridSmartSearch : RadWebControl, INamingContainer
    {
        private RadTextBox searchTextBox;
        [Browsable(false)]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        public RadTextBox SearchTextBox
        {
            get
            {
                if (this.searchTextBox == null)
                {
                    this.searchTextBox = new RadTextBox();
                }
                return this.searchTextBox;
            }
        }
 
        private RadGrid resultGrid;
        [Browsable(false)]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        public RadGrid ResultGrid
        {
            get
            {
                if (this.resultGrid == null)
                {
                    this.resultGrid = new RadGrid();
                }
                return this.resultGrid;
            }
        }
 
        private ObjectDataSource dataSource;
        [Browsable(false)]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        public ObjectDataSource DataSource
        {
            get
            {
                if (this.dataSource == null)
                {
                    this.dataSource = new ObjectDataSource();
                }
                return this.dataSource;
            }
        }
 
        private Panel controlsContainer;
        [Browsable(false)]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        public Panel ControlsContainer
        {
            get
            {
                if (this.controlsContainer == null)
                {
                    this.controlsContainer = new Panel();
                }
                return this.controlsContainer;
            }
        }
 
        protected override void CreateChildControls()
        {
            base.CreateChildControls();
 
            this.Controls.Clear();
 
            this.ConfigureView();
            this.ConfigureDataSource();
 
            if (String.IsNullOrWhiteSpace(this.ResultGrid.DataSourceID))
            {
                this.ResultGrid.DataSourceID = this.DataSource.ID;
            }
        }
 
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            this.EnsureChildControls();
        }
 
        private void ConfigureView()
        {
            // PageLetterHiddenField
            this.PageLetterHiddenField.ID = "pageLetterHiddenField";
            this.Controls.Add(this.PageLetterHiddenField);
 
            // SearchTextBox
            this.SearchTextBox.ID = "searchTextBox";
            this.Controls.Add(this.SearchTextBox);
 
            if (this.GridSmartSearchType == UI.GridSmartSearchType.XmlHttpPanel)
            {
                // XmlHttpPanel
                this.XmlHttpPanel.ID = "xmlHttpPanel";
                this.XmlHttpPanel.EnableClientScriptEvaluation = true;
                this.XmlHttpPanel.RenderMode = XmlHttpPanelRenderMode.Block;
                this.XmlHttpPanel.ServiceRequest += this.XmlHttpPanel_ServiceRequest;
                this.Controls.Add(this.XmlHttpPanel);
            }
 
            // ResultGrid
            this.ResultGrid.ID = "resultGrid";
            if (this.ShowAlphabeticPager)
            {
                this.ResultGrid.PagerStyle.Mode = GridPagerMode.NumericPages;
                this.ResultGrid.PagerStyle.AlwaysVisible = true;
            }
            this.ResultGrid.ItemCreated += this.ResultGrid_ItemCreated;
            this.ResultGrid.ItemCommand += this.ResultGrid_ItemCommand;
 
            var ajaxLoadingPanel = (RadAjaxLoadingPanel)null;
            // Ajax Loading Panel
            if (this.ShowLoadingPanel)
            {
                ajaxLoadingPanel = new RadAjaxLoadingPanel { ID = "ajaxLoadingPanel" };
                this.Controls.Add(ajaxLoadingPanel);
            }
 
            switch (this.GridSmartSearchType)
            {
                case UI.GridSmartSearchType.XmlHttpPanel:
                    this.XmlHttpPanel.Controls.Add(this.ResultGrid);
                    if (ajaxLoadingPanel != null)
                    {
                        this.XmlHttpPanel.LoadingPanelID = ajaxLoadingPanel.ID;
                    }
                    break;
                case UI.GridSmartSearchType.AjaxManager:
                    this.Controls.Add(this.ResultGrid);
                    this.Page.Load += (sender, e) =>
                    {
                        var mgr = RadAjaxManager.GetCurrent(this.Page);
                        if (mgr != null)
                        {
                            mgr.AjaxSettings.AddAjaxSetting(this.SearchTextBox, this.ResultGrid, ajaxLoadingPanel);
                            mgr.AjaxSettings.AddAjaxSetting(this.ResultGrid, this.ResultGrid, ajaxLoadingPanel);
                        }
                    };
                    break;
                default:
                    this.Controls.Add(this.ResultGrid);
                    break;
            }
 
            this.Controls.Add(this.ControlsContainer);
        }
 
        private void ConfigureDataSource()
        {
            this.DataSource.ID = "dataSource";
 
            if (String.IsNullOrEmpty(this.DataSource.SelectMethod))
            {
                this.DataSource.SelectMethod = "Select";
            }
            if (String.IsNullOrEmpty(this.DataSource.SelectCountMethod))
            {
                this.DataSource.SelectCountMethod = "SelectCount";
            }
            this.DataSource.EnablePaging = true;
            if (String.IsNullOrWhiteSpace(this.DataSource.TypeName))
            {
                this.DataSource.TypeName = typeof(SampleGridSmartSearchDataSource).FullName;
            }
            this.DataSource.SelectParameters.Add(new Parameter("query", DbType.String) { ConvertEmptyStringToNull = true });
            this.DataSource.SelectParameters.Add(new Parameter("pageLetter", DbType.String) { ConvertEmptyStringToNull = true });
            this.DataSource.Selecting += this.DataSource_Selecting;
 
            this.Controls.Add(this.DataSource);
        }
    }

 

 

I attached screenshots before and after postback.

Could you help me somebody please?

Thanks
Vlad

Daniel
Telerik team
 answered on 26 Aug 2013
3 answers
442 views
Hi,

how to disable ajax for a particular button in a page through javascript?

thanks,
mano

Pavlina
Telerik team
 answered on 26 Aug 2013
2 answers
107 views
Anyone who uses Facebook is aware of the red-circled "1", "2", "3" . . . etc. that appears near the top of the screen.  This images look like tooltips though stay visible until various other things in the app occur.

Is this something I can emulate with the RadToolTip?  If so, how?

If not, do you have any suggestions how I could do it otherwise?

Robert
Robert
Top achievements
Rank 1
 answered on 26 Aug 2013
1 answer
195 views
Dear All,
I have installed Telerik control with the "Telerik.Web.UI_2011_2_712_Dev.msi". It is basically Q2 2011 version. When i am installing it then it showing that it is installed for VS2008 and VS2010. Both are installed in my PC. It is not installed for VS2012. I want the telerik controls in the VS2012 toolbox. How can I do that also in the installed folder there are two folders called bin35 and bin40, There is no folder for bin45. So how can i do that? please help me.
Missing User
 answered on 26 Aug 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?