Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
2.5K+ 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
166 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
125 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
419 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
92 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
173 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
3 answers
209 views
Hi

I have a DotNetNuke custom module where I am using an HTML editor. I have a input type checkbox and when i check\uncheck that checkbox, a jQuery method is called. I want the content of html editor in that method. How can i do that..?


<%@ Register TagPrefix="dnn" TagName="TextEditor"  Src="~/controls/TextEditor.ascx" %>
<div id="divCopyContent" >
<div id="divTab">
   <dnn:TextEditor ID="txtNotes" runat="server" Width="700px" />
</div>
<div class="copynote">
    <input class="chkCopyNote" type="checkbox" runat="server" id="chkCopyNote" />
     <asp:TextBox CssClass="customMessage" runat="server" ID="txtCustomMessage" TextMode="MultiLine" Height="100px" style="resize: none"></asp:TextBox>
</div>
</div>
<script type="text/javascript">
   jQuery(".copynote a").click(function () {
   var className = jQuery(this).attr('class');
            if (className.indexOf('true') != -1) {                        
      jQuery('#%=divCopyContent.ClientID%>').find(".customMessage").val(jQuery('#%=txtNotes.ClientID%>').val())
       }
       else {
                jQuery('#<%=divCopyContent.ClientID%>').find(".customMessage").val("");
            }
   });
</script>

i want to copy txtNotes' html content to txtCustomeMessage. 

Web.config settings

<dotnetnuke>
    <htmlEditor defaultProvider="RadEditorProvider">
      <providers>
        <clear />
        <add name="RadEditorProvider" type="Telerik.DNN.Providers.RadEditorProvider, Telerik.DNN.Providers.RadEditorProvider" providerPath="~\Providers\RadEditorProvider" AutoCreatePaths="true" ImagesPaths="Images,*PortalRoot*" />
      </providers>
    </htmlEditor>
</dotnetnuke>

Can anyone help me please...?

Thanks
Kamini
Ianko
Telerik team
 answered on 26 Aug 2013
5 answers
319 views
Is this possible to export turkish char like "ışğöüç"?
It was converted into ###  characters on pdf file. i can observe them in radeditor, but on pdf file i can not.
Ianko
Telerik team
 answered on 26 Aug 2013
9 answers
207 views
Hello,

Do you have a roadmap for the RadEditor ExportToPdf feature?
1. Does it support fonts other than TimesNewRoman?
2. Does it support loacalized fonts (polish)?
3. Is it possible to save pdf on the server instead of outputting it to the client?

Kind regards,
Bart
Ianko
Telerik team
 answered on 26 Aug 2013
1 answer
71 views
See here, demo page for the ProgressArea:
http://demos.telerik.com/aspnet-ajax/progressarea/examples/customprogress/defaultvb.aspx

The sample code with tabs for C#, VB is missing.  After you click the "Start Processing" button, they show up?  Problem exists in IE10 and Chrome
Just FYI ;)
Hristo Valyavicharski
Telerik team
 answered on 26 Aug 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?