Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
63 views


Hello,

I'm using Radgrid version 2010.1.519.35. I have 10 columns in my radgrid which includes ID(PK), FirstName & LastName columns.
When i Select first time ID column it sorts the all the data in grid. I have Paging enabled grid. so when i sorts ID column it sorts for all pages. but if first time i sort FirstName or LastName then it sorts data only for current page. Please advise what i can do to resolve the issue.

Thanks
Sweta
sweta
Top achievements
Rank 1
 asked on 08 Sep 2011
4 answers
152 views
How can I setting the visibility of the RadAsyncUpload UI elements? 
Datatrek
Top achievements
Rank 1
 answered on 08 Sep 2011
2 answers
216 views
Hi,

In my project, I have a number of known columns, which are in the .aspx page:

<telerik:RadGrid ID="RadGrid1" GridLines="None" runat="server" AllowAutomaticDeletes="True"
            AllowAutomaticInserts="True" PageSize="5" AllowAutomaticUpdates="True" AllowPaging="True"
            AutoGenerateColumns="False" OnNeedDataSource="RadGrid1_OnNeedRoleDataSource" OnItemUpdated="RadGrid1_ItemUpdated"
            OnItemDeleted="RadGrid1_ItemDeleted" OnItemInserted="RadGrid1_ItemInserted" OnDataBound="RadGrid1_DataBound" OnItemDataBound="RadGrid1_OnRoleItemDataBound">
            <PagerStyle Mode="NextPrevAndNumeric" />
            <MasterTableView Width="100%" CommandItemDisplay="TopAndBottom" DataKeyNames="RoleID" EditMode="InPlace" HorizontalAlign="NotSet" AutoGenerateColumns="False">
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                        <ItemStyle CssClass="MyImageButton" />
                    </telerik:GridEditCommandColumn>
                                         
                    <telerik:GridTemplateColumn HeaderText="RoleTitle" SortExpression="Role" UniqueName="Role" EditFormColumnIndex="1">
                        <ItemTemplate>
                            <asp:Label ID="lblRoleTitle" runat="server" Text='<%# Eval("RoleTitle") %>'></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>                        
                            <asp:DropDownList ID="cbRoleTitle" runat="server" />                           
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>
                     
                    <telerik:GridTemplateColumn HeaderText="Type" SortExpression="EmpType" UniqueName="EmpType" EditFormColumnIndex="2">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="lblEmployeeType" Text='Staff'></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>                           
                            <asp:DropDownList ID="cbEmploymentType" runat="server" />                                                           
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>
                                         
                    <telerik:GridTemplateColumn HeaderText="Notes" SortExpression="Notes" UniqueName="Notes" EditFormColumnIndex="3">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="lblNotes" Text='Notes'></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <span>
                                <asp:TextBox ID="tbNotes" runat="server" Rows="5" Wrap="true" />                               
                            </span>
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>
                     
                    <telerik:GridTemplateColumn HeaderText="Discipline" SortExpression="Discipline" UniqueName="Discipline" EditFormColumnIndex="4">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="lblDiscipline" Text='Senior'></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <span>
                                <asp:DropDownList ID="cbDiscipline" runat="server"/>                               
                            </span>
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>                 
 
                </Columns>               
            </MasterTableView>
            <ClientSettings>
                <ClientEvents OnRowDblClick="RowDblClick" />
            </ClientSettings>
        </telerik:RadGrid>

 

 

And also a set of dynamic columns, that the GridTemplate is used for, and is created in the page_init.

The problem is that I now get multiples of these dynamic columns whenever the page refreshes.

If I check for Page.IsPostBack, then the edit columns just don't work when I add a new row.

Any idea how I can stop seeing duplicate columns?

Thanks

protected void Page_Init(object sender, EventArgs e)
        {
            //And the weekly columns
            if (RadGrid1.Columns.Count < 6)
            {
                SPWeb web = SPContext.Current.Web;
 
                //Need a value cell per week - this code builds up a set of columns from the FR.ValueColumn
                if (FR!= null)
                {
                    List<ValueColumn> valueCols = GetValueColumnsByID(web, FR.ID);
 
                    if (valueCols != null && valueCols.Count > 0)
                    {
                        foreach (ValueColumn value in valueCols)
                        {
                            //The grid needs to be added BEFORE the values are assigned, otherwise headings are lost when in Edit mode
                           GridTemplateColumn tc1 = new GridTemplateColumn();
                            RadGrid1.MasterTableView.Columns.Add(tc1);
 
                            tc1.ItemTemplate = new DataGridTemplate(ListItemType.Item, "VC:" + value.ID.ToString());
                            tc1.EditItemTemplate = new DataGridTemplate(ListItemType.EditItem, "VC:" + value.ID.ToString());
                            tc1.HeaderText = value.Title;
                            tc1.UniqueName = "ValueColumn-" + value.ID.ToString();
                            tc1.DataField = "x";
 
                        }
                    }
                }
            }
        }

 

 

 

 

 

 

 

 

Weeble
Top achievements
Rank 1
 answered on 08 Sep 2011
1 answer
107 views
Hi,

I have this issue.  First we created an asp.net website using telerik controls and everything works like a charm.  Now we need to get this asp.net pages converted to visual web part in sharepoint 2010.  Everything works as expected except for the loading panel.  So what we did is to remove all loading panel at first and just trigger a postback everytime we need to.
 
Now we want to use this loading panel and we were able to make this work by using a single radajax panel for the whole user control but the issue is if you have a combo box inside the ajax panel, the combo box becomes somewhat disabled.  You cannot change the content of the radcombo box after the postback.

Any suggestions?

Thanks!
Cat Cheshire
Top achievements
Rank 1
 answered on 08 Sep 2011
3 answers
102 views

 

 Hi,
    I have an issue with Teleric Grid Column Hiding.

 

    The Grid(with Item templates) Looks perfect when it populated with data.

    Once we are trying to hide few columns ( on Right click column Head + uncheck column names to hide) - The grid is not fitting to previous width ( or we can say 100% if assigned width ) - Its jst leaning towards left side with around 50% of the actual width.
I  want the the grid to stretch (though some of the columns are hidden),so that it maintains the previous width.

Please note that the grid has  Item templates.The reason for specifying this is,this issue is not seen in the grid without item template.

Please find my sample code below:

<telerik:RadGrid runat="server" ID="rg1" AllowCustomPaging="true"

                AllowMultiRowEdit="false" AllowPaging="true" AllowSorting="true" GridLines="Vertical"

                OnSortCommand="rg1_SortCommand" OnNeedDataSource="rg1_NeedDataSource"

                OnPageIndexChanged="rg1_PageIndexChanged" OnPageSizeChanged="rg1_PageSizeChanged"

                OnItemCreated="rg1_ItemCreated" RegisterWithScriptManager="true"

                EnableHeaderContextMenu="true" Skin="Vista" OnGroupsChanging="rg1_GroupChanging" >

                <ExportSettings HideStructureColumns="true">

                    <Csv ColumnDelimiter="Comma" RowDelimiter="NewLine" />

                </ExportSettings>

                <SortingSettings EnableSkinSortStyles="false" />

                <MasterTableView DataKeyNames="Id" ClientDataKeyNames="Id" AutoGenerateColumns="false"

                    EnableHeaderContextMenu="true" TableLayout="Fixed" AllowCustomSorting="true" >

                    <Columns>

                        <telerik:GridBoundColumn DataField="StudID" HeaderText="student ID" SortExpression=" StudID "

                            EmptyDataText="  "  HeaderStyle-Width="9%" />

                       <telerik:GridTemplateColumn UniqueName="Score" HeaderText=" Score " DataField="Score"

                            SortExpression="Score"  HeaderStyle-Width="3%" >

                            <ItemTemplate>

                                <asp:Label ID="lbl Score " runat="server" Text=""></asp:Label>

                            </ItemTemplate>

                        </telerik:GridTemplateColumn>

                                                  

                        <telerik:GridTemplateColumn UniqueName="Fav " HeaderText="Fav " DataField="Fav "

                            SortExpression="Fav "  HeaderStyle-Width="6%" >

                            <ItemTemplate>

                                <asp:CheckBox ID="chkFav " Checked="<%#Bind('Favorite') %>"                AutoPostBack="true" runat="server"

                                    OnCheckedChanged="chkFav _CheckChanged" />

                                <asp:Label ID="lblFav " runat="server" Text=""></asp:Label>

                            </ItemTemplate>

                        </telerik:GridTemplateColumn>

                    </Columns>

                    <PagerStyle Mode="NextPrevNumericAndAdvanced" AlwaysVisible="true"></PagerStyle>

                </MasterTableView>

                <ClientSettings AllowColumnsReorder="true" ReorderColumnsOnClient="true" EnableRowHoverStyle="true">

                    <Scrolling AllowScroll="false" SaveScrollPosition="true" UseStaticHeaders="true" />

                    <Resizing AllowColumnResize="true" EnableRealTimeResize="true" ResizeGridOnColumnResize="true"

                        ClipCellContentOnResize="true" AllowResizeToFit="true" />

                    <Selecting AllowRowSelect="true" />

                    <ClientEvents OnGridCreated="gridCreated" OnRowDblClick="RowDblClick" />

                </ClientSettings>

                <HeaderContextMenu EnableScreenBoundaryDetection="true" EnableAutoScroll="true"  />

                <HeaderStyle Width="100px" />

            </telerik:RadGrid>

 

   


Can you please help us solving this issue.

 

Thanks in Advance.

 

Dilip.

 

 

Iana Tsolova
Telerik team
 answered on 08 Sep 2011
7 answers
247 views
I get this error when I click on a menu item in my contectmenu the is located in a radgrid

any idea?

here is the error I get in chrome:

  1. Uncaught TypeError: Cannot set property 'control' of undefined
here is what I get from IE8 and vs2010:

VS210:

    - Microsoft JScript runtime error: Object doesn't support this property or method

}var H=G._getScrollWrapElement();
if(!H){return;
}var z=G._scroller;
if(!z){return;
}var N=G._flow||G.get_groupSettings().get_flow();   - on this line
var L=N==b.ItemFlow.Vertical;
H[L?"scrollTop":"scrollLeft"]=0;
var E=G.get_childListElement();

IE8:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB6; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 1.1.4322; .NET CLR 3.5.21022; .NET4.0C; .NET4.0E; SLCC1; InfoPath.3)
Timestamp: Thu, 17 Feb 2011 17:19:52 UTC

Message: Object doesn't support this property or method
Line: 8663
Char: 2
Code: 0
URI: http://biz-devapps.ivey.ca/eZone/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bAjaxControlToolkit%2c+Version%3d4.1.40412.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen-US%3aacfc7575-cdee-46af-964f-5d85d9cdcf92%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2010.3.1317.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a9506cff2-3a86-46c5-b869-6ba1478f3c27%3a16e4e7cd%3a58366029%3af7645509%3a24ee1bba%3ae330518b%3a1e771326%3ac8618e41%3ae4f8f289%3a19620875%3a874f8ea2%3af46195d3%3a490a9d4e

 


Peter
Telerik team
 answered on 08 Sep 2011
3 answers
207 views
hi. i have a problem.
when i call the .show() method from cliend-side and redirect the page, Radwindow looks like broken.
i'm attaching screen capture image about this issue.

My sample code is
<%@ Page Language="VB" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="RadwindowTest._Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
     
</head>
<body>
    <form id="form1" runat="server">
    <script type="text/javascript">
        function showloading() {
            var pageLoadWindow = $find("<%=RadWindowPageLoad.ClientID %>");
            pageLoadWindow.show();
             
            document.location.href="http://google.com";
        }
    </script>
 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
            <telerik:RadWindow ID="RadWindowPageLoad" AutoSize="false" Modal="true" Overlay="true"
            VisibleTitlebar="true" Title="Processing..." Behaviors="None" VisibleStatusbar="false"
            Width="400" Height="200" runat="server" Style="position: absolute; z-index: 9000;">
            <ContentTemplate>
                <div style="margin-top: 55px; text-align: center; vertical-align: middle;">
                    <asp:Image ID="ImagePageLoading" runat="server" />
                </div>
            </ContentTemplate>
        </telerik:RadWindow>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>
        <div onclick="return showloading();">click</div>
    </div>
    </form>
</body>
</html>


shunman
Top achievements
Rank 1
 answered on 08 Sep 2011
1 answer
115 views
Hi...
Im having problem with RadFileUplod control.
I have text box, button ,File Upload, RadJax manager,and loading panel in my page... Iwant to enable ajax and show loading panel on button click. in same button click event i get file in the file upload control. but the problem is every time fileUploader file count give 0.
I use Radjax manager to enable ajax and show the loading panel.....
but if i disable ajax in radJax manager its work....
Can any one help to solve this problem

Thanks
Shinu
Top achievements
Rank 2
 answered on 08 Sep 2011
4 answers
188 views
Hi,

I have a window from which I am trying to open another window which is bigger in size than the parent window..with fixed height and width. Even when the modal property is set to true the new window doesnt get visible completely. Scroll bars gets added to the parent window.
I would like to see the new window on top of the parent window instead of inside the parent window.
Can you suggest any solutions??
Marin Bratanov
Telerik team
 answered on 08 Sep 2011
3 answers
164 views
Hello,

I would like to open a Pop up window when clicked on chart title.. I have used Javascript function to open the pop-up.

 

function ShowPopUpDialog() {
            window.open('Details.aspx', 'ChartDetails', 'height = 300px, width = 300px', true);
        }

  

 Here is the call to Javascript function from chart click event

  

 

Protected Sub RadChart2_Click(ByVal sender As Object, ByVal args As Telerik.Charting.ChartClickEventArgs) Handles RadChart2.Click
      Session("ChartReference") = "AccountSize"
      RadChart2.ChartTitle.ActiveRegion.Url = "javascript:ShowPopUpDialog();"
  End Sub

When I clicked on the chart Title the first time, I see that it is triggering a javascript:_doPostback event instead of my function... It works fine as expected from second click onwards..(after the postback)
Any help to resolve this behavior is appreciated

Thanks.

Missing User
 answered on 08 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
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?