Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
95 views
I'm using GroupByExpressions and my situation calls for the Groups to not collapse and I set the AllowGroupExpandCollapse="false" in my RadGrid's ClientSettings, but doesn't have any affect on the ability to expand/collapse the Groups.

Isn't this supposed to prevent the user from expanding or collapsing a Group section?
Pavlina
Telerik team
 answered on 13 May 2011
1 answer
78 views
I am working for the first time with the radgrid drag and drop feature; I believe I do have it working properly as I can view the row count growing as I drop new items. However, my grid does not reflect this. My code is below. PLEASE HELP!

Imports System.Data
 
Partial Class Sales_SalesPresentationGenerator
    Inherits System.Web.UI.Page
    Dim ds As New DataSet
    Dim TitleName As DataColumn = New DataColumn("Title"Type.GetType("System.String"))
    Dim TitleID As DataColumn = New DataColumn("TitleID"Type.GetType("System.Int32"))
    Dim Territory As DataColumn = New DataColumn("Territory"Type.GetType("System.String"))
    Dim TerritoryID As DataColumn = New DataColumn("TerritoryID"Type.GetType("System.Int32"))
    Dim Medium As DataColumn = New DataColumn("Medium"Type.GetType("System.String"))
    Dim MediumID As DataColumn = New DataColumn("MediumID"Type.GetType("System.Int32"))
    Private Property dt As DataTable
        Get
            Return ViewState("dt")
        End Get
        Set(value As DataTable)
            ViewState("dt") = value
        End Set
    End Property
 
    Protected Sub Page_Load(sender As Object, e As System.EventArgsHandles Me.Load
        If Not IsPostBack Then
            dt = New DataTable()
            dt.Columns.Add(TitleID)
            dt.Columns.Add(TitleName)
            dt.Columns.Add(TerritoryID)
            dt.Columns.Add(Territory)
            dt.Columns.Add(MediumID)
            dt.Columns.Add(Medium)
 
            SelectedGrid.DataSource = dt
            SelectedGrid.DataBind()
        End If
    End Sub
 
    'Add to selected
    Protected Sub TitlesGrid_RowDrop(sender As Object, e As Telerik.Web.UI.GridDragDropEventArgsHandles TitlesGrid.RowDrop
        'e.DraggedItems.Count
        For Each r In e.DraggedItems
 
            Dim temp As DataRow
            temp = dt.NewRow()
 
            temp.Item("TitleID") = CType(CType(r.Item("TitleID"), TableCell).Text, Integer)
            temp.Item("Title") = CType(r.Item("Title"), TableCell).Text
            temp.Item("Medium") = CType(r.Item("Medium"), TableCell).Text
            temp.Item("MediumID") = CType(CType(r.Item("MediumID"), TableCell).Text, Integer)
            temp.Item("Territory") = CType(r.Item("Territory"), TableCell).Text
            temp.Item("TerritoryID") = CType(CType(r.Item("TerritoryID"), TableCell).Text, Integer)
            dt.Rows.Add(temp)
            ' MsgBox(dt.Rows.Count)
        Next
        SelectedGrid.Rebind()
    End Sub
 
    'Remove from Selected
    Protected Sub SelectedRowDrop(sender As Object, e As Telerik.Web.UI.GridDragDropEventArgsHandles SelectedGrid.RowDrop
 
    End Sub
End Class




<%@ Page Title="" Language="VB" MasterPageFile="~/All/Site.master" AutoEventWireup="false" CodeFile="SalesPresentationGenerator.aspx.vb" Inherits="Sales_SalesPresentationGenerator" %>
 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadFilter ID="RadFilter1" runat="server" 
        CssClass="RadFilter RadFilter_Default RadFilter RadFilter_Default RadFilter RadFilter_Default " 
        FilterContainerID="TitlesGrid" Skin="Vista">
    </telerik:RadFilter>
<div style="width:48%float:left">
    
    <telerik:RadGrid ID="TitlesGrid" runat="server" AllowPaging="True" 
        AllowSorting="True" DataSourceID="TitlesDataSource" GridLines="None" 
        ShowGroupPanel="True" Skin="Vista" AllowMultiRowSelection="True">
        <ClientSettings AllowDragToGroup="True" AllowRowsDragDrop="True">
            <Selecting AllowRowSelect="True" />
        </ClientSettings>
<MasterTableView AutoGenerateColumns="False" DataSourceID="TitlesDataSource">
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
 
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
 
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
    <Columns>
        <telerik:GridBoundColumn DataField="Title" HeaderText="Title" 
            SortExpression="Title" UniqueName="Title">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="TitleID" HeaderText="TitleID" 
            SortExpression="TitleID" UniqueName="TitleID" Visible="False" 
            DataType="System.Int32">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Synopsis" HeaderText="Synopsis" 
            SortExpression="Synopsis" UniqueName="Synopsis" Visible="False">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Genre" HeaderText="Genre" 
            SortExpression="Genre" UniqueName="Genre">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Territory" HeaderText="Territory" 
            SortExpression="Territory" UniqueName="Territory">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="TerritoryID" DataType="System.Int32" 
            HeaderText="TerritoryID" SortExpression="TerritoryID" 
            UniqueName="TerritoryID" Visible="False">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Medium" HeaderText="Medium" 
            SortExpression="Medium" UniqueName="Medium">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="MediumID" DataType="System.Int32" 
            HeaderText="MediumID" SortExpression="MediumID" UniqueName="MediumID" 
            Visible="False">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="AvailDate" DataType="System.DateTime" 
            HeaderText="AvailDate" SortExpression="AvailDate" UniqueName="AvailDate">
        </telerik:GridBoundColumn>
    </Columns>
</MasterTableView>
 
<HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
    </telerik:RadGrid>
    <asp:AccessDataSource ID="TitlesDataSource" runat="server" 
        DataFile="~/App_Data/PDF GENERATOR DATA.accdb" 
        SelectCommand="SELECT * FROM [Avails]"></asp:AccessDataSource>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server" 
        InitialDelayTime="5" MinDisplayTime="5" Skin="Default" Transparency="20">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" 
        DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="SelectedGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="SelectedGrid" />
                    <telerik:AjaxUpdatedControl ControlID="TitlesGrid" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="TitlesGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="SelectedGrid" />
                    <telerik:AjaxUpdatedControl ControlID="TitlesGrid" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
</div>
<div style="width:48%float:left">
    <telerik:RadGrid ID="SelectedGrid" runat="server" Skin="Vista" 
        AllowMultiRowSelection="True">
        <ClientSettings AllowRowsDragDrop="True">
            <Selecting AllowRowSelect="True" />
        </ClientSettings>
<MasterTableView>
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
 
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
 
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
</MasterTableView>
 
<HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Vista"></HeaderContextMenu>
    </telerik:RadGrid>
</div>
    </asp:Content>
 
Tsvetina
Telerik team
 answered on 13 May 2011
2 answers
447 views
Hi....

I have Created on dyanamically Radtrabstrip with multipage option....

If my Radtabstrip has two tab tab1 and tab2.

if i select tab2 ...and my page gets post back...then i want to select tab1 and multipage1 of tab1...

for this i have written code tabstrip.selectindex=0; mutipage.selectedindex=0...

but is not woking... tab2 is remain select as it is....
Cori
Top achievements
Rank 2
 answered on 13 May 2011
1 answer
80 views
complince  report
100   100% CPOE 01
100    100% CPOE 02
75     75% CPOE 03
78    78% CPOE 04
70    70% CPOE 05
0     0% CPOE 05a

rdChart2.Series(0).Clear()

rdChart2.Series(0).DataXColumn =

"Compliance"

 

rdChart2.Series(0).DataYColumn =

"Report"

 

rdChart2.DataSource = dailDataSet

rdChart2.DataBind()

rdChart2.PlotArea.XAxis.AutoScale =

False

 


In this data not binded to rad chart ----------------in these  i want to display reports column  in pie daigaram -----------------
Plz any tell me
Vladimir Milev
Telerik team
 answered on 13 May 2011
1 answer
47 views
Hi,

I'd like to use the Grid control to allow for inserting, updating and deleting items. The tricky part is the support of lookup to already existing records on insert/update.

In insert/edit mode, the first textbox will be a lookup, in which the other fields in the row will be filled in if found in DB. If not found, it will be inserted to DB as a new record.

Example:
I enter the ISBN number of a book and make a lookup in the DB to see if it's found, populate the other fields and save it as a row. If ISBN number is not found, then fill out all fields and save it as a new record to the DB.

Any tips about useful articles or code examples are appreciated.
Shinu
Top achievements
Rank 2
 answered on 13 May 2011
5 answers
302 views
Is it possible to put controls (ie. buttons) next to the caption of a radPanelBarItem?

Thanks.
Helen
Telerik team
 answered on 13 May 2011
1 answer
105 views
Hello,

I have a raddock with custom commands. I wish to replace custom command icon with a loading gif image when that icon is clicked till the time dock get refreshed completely. Then get back to original icon.

Can you please suggest how to do that ?
Pero
Telerik team
 answered on 13 May 2011
1 answer
118 views
Hi ,

    I have used rad window in my pjt.  it was working. when i move the rad window manager inside rad ajax panel it stopped working and throwing error like,"Cannot called after dispose"..

Here is the code

       function OpenRadWindowAddRecurrencePopup(isConflict, startDate, endDate, startTime, EndTime, SessionID, recordid, LOCATIONname, roomNo) {
                var Url = "./AddRecurrence.aspx?ISCONFLICT=" + isConflict + "&STARTDATE=" + startDate + "&ENDDATE=" + endDate + "&STARTTIME=" + startTime + "&ENDTIME=" + EndTime + "&SESSIONID=" + SessionID + "&CODE=" + recordid + "&LOCATIONID=" + LOCATIONname + "&roomNo=" + roomNo;
                var oWnd = radopen(Url, "radWindowAddRecurrencePopup");
                //oWnd.SetUrl(oWnd.GetUrl());
                return false;
            }
  
    <telerik:RadAjaxPanel>
// some controls here
 <telerik:RadWindowManager ID="RadWindowManager2" runat="server" MinWidth="500" ReloadOnShow="false">
            <Windows>
                <telerik:RadWindow ID="radWindowAccountCodePopup" OnClientClose="CallBackFunctionAccountCode"
                    Behavior="Close" VisibleTitlebar="false" Modal="true" Width="650px" runat="server"
                    Height="530px" NavigateUrl="~\Admin\AccountCodePopup.aspx" VisibleStatusbar="false">
                </telerik:RadWindow>
                <telerik:RadWindow ID="radWindowAddRecurrencePopup" Modal="true" Width="750px" runat="server"
                    Height="650px" OnClientClose="CallBackFunctionRecurrence" InitialBehaviors="None">
                    <%--OnClientClose="CallBackFunctionRecurrence"--%>
                </telerik:RadWindow>
                <telerik:RadWindow ID="radWindowViewEditRecurremcePopup" OnClientClose="CallBackFunctionRecurrence"
                    Behaviors="None" VisibleTitlebar="false" Modal="true" Width="700px" runat="server"
                    Height="450px" VisibleStatusbar="false">
                </telerik:RadWindow>
                <telerik:RadWindow ID="radWindowLocationPopup" OnClientClose="CallBackFunctionService"
                    OpenerElementID="" OffsetElementID="" Behavior="Close" VisibleTitlebar="false"
                    Modal="true" Width="578px" runat="server" Height="450px" NavigateUrl="~\Admin\LocationPopup.aspx"
                    VisibleStatusbar="false">
                </telerik:RadWindow>
            </Windows>
        </telerik:RadWindowManager>
    </telerik:RadAjaxPanel>


thx
esther
Georgi Tunev
Telerik team
 answered on 13 May 2011
3 answers
193 views
Hi,

Im using Radgrid with AutoGenerateColumns="True" and the column header will be like "Firstname, Lastname" (with Comma). While sorting the grid on column (Firstname, Lastname) with sort expression field name it throws error like "Cannot find column Firstname". Im using the following code in RadGrid1_SortCommand.

GridSortExpression sortExpr = new GridSortExpression();
switch (e.OldSortOrder)
        {
            case GridSortOrder.None:
                sortExpr.FieldName = e.SortExpression;
                sortExpr.SortOrder = GridSortOrder.Descending;
                e.Item.OwnerTableView.SortExpressions.AddSortExpression(sortExpr);
                Session["GridSort"] = GridSortOrder.Descending;
                break;
            case GridSortOrder.Descending:
                sortExpr.FieldName = e.SortExpression;
                sortExpr.SortOrder = GridSortOrder.Ascending;
                e.Item.OwnerTableView.SortExpressions.AddSortExpression(sortExpr);
                Session["GridSort"] = GridSortOrder.Ascending;
                break;
            case GridSortOrder.Ascending:
                sortExpr.FieldName = e.SortExpression;
                sortExpr.SortOrder = GridSortOrder.Descending;
                e.Item.OwnerTableView.SortExpressions.AddSortExpression(sortExpr);
                Session["GridSort"] = GridSortOrder.Descending;
                break;
        }
e.Canceled = true;
RadGrid1.Rebind();

Sample Grid: (2nd Column Header contains Comma)

S.No FirstName, LastName DOB City
1 XXX, X 11/11/1111 NJ
2 YYY, Y 11/11/1111 NJ
3 ZZZ, Z 11/11/1111 NJ

Please Reply ASAP.
Thanks in Advance.

Thanks,
Ranjith J
Tsvetoslav
Telerik team
 answered on 13 May 2011
5 answers
180 views
I have the next code, that it's executed after a postback inside a grid(www.tedit.net)

            ExcelFile efE = new ExcelFile(); 
            ExcelWorksheet wsE = efE.Worksheets.Add("email"); 
            Response.Clear(); 
            Response.ContentType = "application/vnd.ms-excel"
            Response.AddHeader("Content-Disposition""attachment; filename=" + e.Row["rowno"] + "_Email.xls"); 
            efE.SaveXls(Response.OutputStream); 
            Response.End(); 
 

I already see this next:
not-on-top-of-call-stack

My problem is when the code reaches Response.End it throws an exception error. In the link I mention, it doesnt say how to resolve the issue.

This is the error message:
Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack

Can you help please?

Daniel
Telerik team
 answered on 13 May 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?