Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
99 views
I have a rad-grid in which there are n no of column ,so when i change the size of column and navigate to other page and again go to the same page,my column width should not change or when i perform any other operation related to that page,the width should not change.



Please Suggest.
Princy
Top achievements
Rank 2
 answered on 27 May 2014
1 answer
103 views
I have a rad-grid in which i have columns,so my problem is when I adjust the column width. However, the column width of a column other than the attempt to adjust is changed.My requirement is that only column width tried to adjust the column width is changed.


Please Suggest
Princy
Top achievements
Rank 2
 answered on 27 May 2014
2 answers
91 views
Hi All 
           I am using a rad grid and java script code inside it to push the client id of each  checkbox against each record in an array  but it is not working  after post back . on load  it  push the control id and then keeps  them till the end  until it is loaded again.
 Here is  my code 


<%@ Page Language="C#" MasterPageFile="~/MasterPages/Page.master" AutoEventWireup="true"
CodeFile="Default.aspx.cs" 
 EnableEventValidation="false" %>


<asp:Content ID="PartTransferOutContent" ContentPlaceHolderID="ContentPlaceHolder_Content"
             runat="Server">
    <telerik:RadCodeBlock ID="radCodeBlock" runat="server">
        <script type="text/javascript">
            var selectDeselectAllFlag = true;
            var headerCheckBoxID;
            var registeredElements = [];
            var temp = 0;

            
            function SelectDeselectCheckBox() {
                try {
                    
                    var clientid = "";
                    alert(registeredelements.length);
                    for (var i = 0; i < registeredelements.length; i++) {
                      clientid = registeredelements[i];
                        var checkbox = document.getelementbyid(clientid);
                       if (checkbox) {
                           if (headercheckbox.checked)
                                checkbox.checked = false;
                            else
                               checkbox.checked = true;
                       }
                    }
                   if (headercheckbox.checked)
                        headercheckbox.checked = false;
                    else
                       headercheckbox.checked = true;
                }
                catch (er) {
                }
                return true;
            }

        </script>
    </telerik:RadCodeBlock>
    <telerik:RadAjaxManagerProxy ID="radAjaxManagerProxy" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="ItemRadGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ItemRadGrid" LoadingPanelID="RadAjaxLoadingPanelGrid" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
    <telerik:RadSplitter ID="SplitterMain" runat="server">
        
        <telerik:RadSplitBar ID="RadSplitBar1" runat="server">
        </telerik:RadSplitBar>
        <telerik:RadPane ID="panebottom" runat="server" SkinID="BottomRadPane">
            <table width="98%" style="table-layout: fixed">
                <tr>
                    <td>
                        <asp:Label ID="MessageLabel" runat="server" SkinID="MessageLabel"></asp:Label>
                    </td>
                </tr>
             
            </table>
            <telerik:RadDockLayout ID="RadDockLayoutSearch" runat="server" OnLoadDockLayout="RadDockLayoutSearch_LoadDockLayout">
               
                    <telerik:RadDock ID="RadDockSearchResults" runat="server" OnCommand="RadDock_Command">
                        <TitlebarTemplate>
                            <table class="RadDockTitlebarTemplateTableClass">
                                <tr>
                                    <td>
                                        <asp:Label ID="SearchLabel" runat="server" Text="Search Results" SkinID="RadDockTitleLabel" />
                                    </td>
                                </tr>
                            </table>
                        </TitlebarTemplate>
                        <ContentTemplate>
                            <div class="RadGridHorizontalScroll">
                                <telerik:RadGrid ID="ItemRadGrid" runat="server" DatasourcePersistenceMode="ViewState"
                                                 OnItemCreated="ItemRadGrid_ItemCreated" OnNeedDataSource="ItemRadGrid_OnNeedDataSource"
                                                 OnDetailTableDataBind="ItemRadGrid_DetailTableDataBind" OnItemDataBound="ItemRadGrid_ItemDataBound"
                                                 GridLines="None" Width="99.4%">
                                    <ClientSettings>
                                        <Resizing AllowColumnResize="true" EnableRealTimeResize="true" ResizeGridOnColumnResize="true"
                                                  ClipCellContentOnResize="true" />
                                        <Selecting AllowRowSelect="true" />
                                    </ClientSettings>
                                    <HeaderContextMenu>
                                        <CollapseAnimation Duration="200" Type="OutQuint" />
                                    </HeaderContextMenu>
                                    <MasterTableView Width="100%" 
                                                     ShowHeader="false" CommandItemDisplay="Top"
                                                     EnableViewState="true" HierarchyDefaultExpanded="True" HierarchyLoadMode="Client"
                                                     AllowMultiColumnSorting="true" AllowNaturalSort="true" ShowFooter="true" TableLayout="Fixed">
                                        <PagerStyle Position="TopAndBottom" />
                                        <CommandItemTemplate>
                                            <table width="100%">
                                                <tr>
                                                    <td class="ButtonSeparator">
                                                        <asp:LinkButton ID="SelectDeselectLinkButton" OnClientClick="return SelectDeselectCheckBox();"
                                                                        runat="server" Text="Select/Deselect All" SkinID="SmallLinkButton"></asp:LinkButton>
                                                    </td>
                                                   
                                                </tr>
                                            </table>
                                        </CommandItemTemplate>
                                        <DetailTables>
                                            <telerik:GridTableView runat="server" 
                                                                   DatasourcePersistenceMode="ViewState" EnableViewState="true" Width="100%"
                                                                   HierarchyLoadMode="Client" TableLayout="Fixed">
                                                <ExpandCollapseColumn Visible="True">
                                                </ExpandCollapseColumn>
                                                <DetailTables>
                                                    <telerik:GridTableView runat="server"
                                                                           DatasourcePersistenceMode="ViewState" EnableViewState="true">
                                                        <PagerStyle Visible="false" />
                                                        <Columns>
                                                           some column here
                                                        </Columns>
                                                    </telerik:GridTableView>
                                                </DetailTables>
                                                <Columns>
                                                    <telerik:GridTemplateColumn UniqueName="SelectItemCheckBoxColumn" Resizable="false" Reorderable="false">
                                                        <ItemTemplate>
                                                            <asp:CheckBox ID="SelectItemCheckBox"  runat="server" onclick="return SetHeaderCheckBox(this);"/>
                                                            <script type="text/javascript">
                                                                //alert('create');
                                                                registeredElements.push('<%# Container.FindControl("SelectItemCheckBox").ClientID %>');    
                                                            </script>
                                                        </ItemTemplate>
                                                        <HeaderTemplate>
                                                            <%--Updated for Defect #18369--%>
                                                            <div style="cursor:auto">
                                                            <asp:CheckBox ID="SelectHeaderCheckBox" runat="server" onclick="return SelectAllCheckBox(this);"/>
                                                            </div>
                                                            <script type="text/javascript">
                                                                headerCheckBoxID = '<%# Container.FindControl("SelectHeaderCheckBox").ClientID %>';
                                                            </script>
                                                        </HeaderTemplate>
                                                    </telerik:GridTemplateColumn>
                                                    some more columns are here
                                                </Columns>
                                            </telerik:GridTableView>
                                        </DetailTables>
                                        <Columns>
                                            <telerik:GridTemplateColumn  FooterStyle-Width="80%">
                                                
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridBoundColumn DataField="Total" UniqueName="Total" FooterStyle-HorizontalAlign="Right"
                                                                     Display="true">
                                            </telerik:GridBoundColumn>
                                        </Columns>
                                        <ExpandCollapseColumn Visible="False">
                                            <HeaderStyle Width="19px"></HeaderStyle>
                                        </ExpandCollapseColumn>
                                        <RowIndicatorColumn Visible="False">
                                            <HeaderStyle Width="20px"></HeaderStyle>
                                        </RowIndicatorColumn>
                                    </MasterTableView>
                                    <FilterMenu>
                                        <CollapseAnimation Duration="200" Type="OutQuint" />
                                    </FilterMenu>
                                </telerik:RadGrid>
                            </div>
                        </ContentTemplate>
                        <Commands>
                            <telerik:DockExpandCollapseCommand />
                            <telerik:DockCommand AutoPostBack="true" Text="Save Position" />
                        </Commands>
                    </telerik:RadDock>
                </telerik:RadDockZone>
            </telerik:RadDockLayout>
        </telerik:RadPane>
    </telerik:RadSplitter>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
    </telerik:RadWindowManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanelGrid" runat="server">
    </telerik:RadAjaxLoadingPanel>
</asp:Content>


and  at Cs  page I am refreshing it by ajax  as

 protected void Page_Load(object sender, EventArgs e)
    {
       
        _radAjaxManager = Master.FindControl("RadAjaxManagerPart") as RadAjaxManager;
       
            
        if (_radAjaxManager != null)
        {
            _radAjaxManager.AjaxSettings.AddAjaxSetting(_radAjaxManager, ItemRadGrid);
            _radAjaxManager.AjaxSettings.AddAjaxSetting(ItemRadGrid, MessageLabel);
        }
        
    }  

Please help me out Thanks



Shubham
Top achievements
Rank 1
 answered on 26 May 2014
1 answer
113 views
I have hyperlink column in a radgrid which is placed inside a user control. 
Each row for this column is populated with anchor tag like <a title="title" href="../Activity/somepage.aspx?id=223&t=2">title</a>
For chrome/firefox on click of hyperlink goes to page mentioned in href as expected but with IE 11, it reposted to same page(where user control is placed) with IsPostback = false. Though this repost request gets aborted and then it goes to expected page. Same behavior exhibited by IE 9, IE 10 but IsPostback= true in case of IE9,10.
Can any one explain why such a behavior
Galin
Telerik team
 answered on 26 May 2014
1 answer
82 views
Can i add 2 custom fields which will pull record from database and other 2 fields are from fileSystem.
Fields are : {FileName} {Size} {UserName} {Action}
In this, first 2 fields are from file system we are currently populating. requirement is to have history of file operations(insert, delete etc..) so we thought to maintain those records in db. Is that possible to pull data from different locations and populate in FileExplorer ?
Vessy
Telerik team
 answered on 26 May 2014
1 answer
821 views
My colleagues has made a radgrid with two gridtemplate columns.The second gridtemplatecolumn consist of radcombobox. As you see this radcombobox has itemtemplate with link; So MY QUESTION IS _ CAN I SET DYNAMIICALLY THIS HREF ATTRIBUTE OF MY LINK


<te
lerik:RadGrid ID="RadGridLang" runat="server" AutoGenerateColumns="False"  EnableEmbeddedSkins="False"  RegisterWithScriptManager=false <br>                     DataTextField="Descr" DataValueField="LanImg"<br>                    Height="100%" Width="120px" AppendDataBoundItems="true" CellSpacing="0" GridLines="None" OnLoad="RadGridLang_Load"><br>                    <MasterTableView><br>                        <Columns><br>                            <telerik:GridTemplateColumn DataField="LanCd"><br>                                <ItemTemplate><br>                                    <img src="<%#DataBinder.Eval(Container.DataItem, "LanImg")%>" alt="ASP.NET hosting" /><br>                                </ItemTemplate><br>                            </telerik:GridTemplateColumn><br>                            <telerik:GridTemplateColumn DataField="LanCd"><br>                                <ItemTemplate><br>                                    <telerik:RadComboBox ID="RadComboBoxLang" runat="server" EmptyMessage="Select a language" DataTextField="Descr" DataValueField="LanCd" EnableEventValidation="true"  RegisterWithScriptManager=false <br>                                        EnableLoadOnDemand="true" DataSourceID="ObjectDataSourceDrob" CausesValidation="false" AllowCustomText="true" AppendDataBoundItems="true" OnLoad="RadComboBoxLang_Load"><br>                                         <ItemTemplate><br>                                            <div class="imageWrap"><br>                                                <a href='gfgf'><br>                                                <img src="<%#DataBinder.Eval(Container.DataItem, "LanImg")%>" alt='<%# Eval("Descr")%>'/>&nbsp&nbsp&nbsp&nbsp&nbsp<%#DataBinder.Eval(Container.DataItem, "Descr")%></a><br>                                            </div><br><br>                                        </ItemTemplate><br>                                    </telerik:RadComboBox><br>                                </ItemTemplate><br>                            </telerik:GridTemplateColumn><br>                        </Columns><br>                    </MasterTableView><br>                </telerik:RadGrid>

And here is my code 


p
rotected void RadComboBoxLang_Load(object sender, EventArgs e)<br>        {<br>            String pRequest = pGetLang; <br>            if (HttpContext.Current.Request.RequestContext.RouteData.Values["id"] != null)<br>            {<br>                pRequest = HttpContext.Current.Request.RequestContext.RouteData.Values["id"].ToString();<br>            }<br>            RadComboBox radComboBoxLang = sender as RadComboBox;<br>            radComboBoxLang.Items[0].Attributes["href"] = "lalala";<br>            radComboBoxLang.SelectedValue = pRequest.ToUpper();<br>            bool p_test = MvcBeaDAL.CookiesManager.SetGetCookie(radComboBoxLang.SelectedValue);<br>        }<br>        protected void RadGridLang_Load(object sender, EventArgs e)<br>        {<br>            String pRequest = GetLang();<br>RadGrid pRadGridLang = this.FindControl("RadGridLang") as RadGrid;<br>            List<LanguageHost> radLang = new List<LanguageHost>();<br>            radLang.Add( MvcBeaDAL.WebServiceBea.GetWebLanguageID(pRequest));<br>           string col = pRadGridLang.Columns[0].ColumnType;<br>            pRadGridLang.DataSource = radLang.ToList();<br>            pRadGridLang.DataBind();<br>        }
Princy
Top achievements
Rank 2
 answered on 26 May 2014
2 answers
89 views
Hi,
is it possible to show image buttons in the edit form of a grid with auto generated columns?
Thanks,
Felice
Felice
Top achievements
Rank 1
 answered on 26 May 2014
1 answer
124 views
I am working on upgrading to 2014.1.403. I use setSize() a lot, and I think there is a problem with it in the new version. After calling setSize, the editor resizes properly, but one of the tables within the editor layout (class reLayoutWrapper) is still set to its default height of 400px. This only occurs if the new height is less than 400px - if it is more, the reLayoutWrapper table is resized to match.

I resolved the problem for now with: $("table.reLayoutWrapper").height(myNewHeight);
Marin Bratanov
Telerik team
 answered on 26 May 2014
2 answers
676 views
Dear Sirs,

I would like to open a radwindow using dynamic content using javascript, so no url need to specify.  For example, in javascript I can do something like:

var win = window.open('');
win.document.write('Test'); // so the window will contain the text "Test"

How can I have similar result for using radwindow without creating a temp webpage?  I would like something like:
var win = window.radopen(null, null);
win.document.write('Test'); // <-- This doesn't work

Thanks.
Marin Bratanov
Telerik team
 answered on 26 May 2014
1 answer
113 views
Our users with "read" access to a radGrid need the ability to be able to click through any hyperlink in a grid. Is there a way to accomplish this (Server side) without disabling everything except the one column with the hyperlink? And if not, how would I go about disabling everything on the grid except the hyperlink?

Thanks!
Kostadin
Telerik team
 answered on 26 May 2014
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?