in
Forums
Blogs
Files
Devexpress.Com
Client Center
Support Center
DevExpress Channel

Change from ASPxGrid to ASPxGridView

Last post 8/1/2007 4:14 AM by Paolo Sghia. 11 replies.
Page 1 of 1 (12 items)
Sort Posts:
Previous Next
  • 7/30/2007 6:40 AM

    Change from ASPxGrid to ASPxGridView

    Do you have a document to help converting projects from Aspxgrid to gridview ? I searched the help but found nothing

    For example doesn't the processingmode property exist anymore ?

    Is the aspxdatacontroller still usable or not ?

    Thanks 

  • 7/30/2007 7:41 AM In reply to

    Re: Change from ASPxGrid to ASPxGridView

    Hi Paolo,
    We will blog about it or create a knowledgebase article.
    It is a brand new product based on ASP.Net v2 and our new ASP.Net shared library. It is a callback based control (the most functionality has been implemented via callbacks) and it is completely different from the old grid. We haven’t used a single line of code from the old grid.

    Thanks, Andrew
    R&D, .Net Team
    Developer Express Inc.

    PS. If you wish to receive direct assistance from our Support Team, use
    Support Center at http://www.devexpress.com/Support/Center
    Filed under: ,
  • 7/31/2007 2:49 AM In reply to

    Re: Change from ASPxGrid to ASPxGridView

     It is unclear to me if the change involves the various aspxtextboxes also.

    I have a page with a grid and several textboxes. I attached all textboxes to an aspxdatacontroller.

    Is this correct ? 

  • 7/31/2007 4:16 AM In reply to

    Re: Change from ASPxGrid to ASPxGridView

    Hi Paolo,
    The ASPxDataController is part of our old asp.net controls. The new controls don’t use it at all. The new asp.net dll’s don’t have any reference to the old asp.net dll’s.
    Please refer to our Focused Row demo (http://demos.devexpress.com/ASPxGridViewDemos/Rows/FocusedRow.aspx) to get the ideas how you can achieve a similar functionality.

    Thanks, Andrew
    R&D, .Net Team
    Developer Express Inc.

    PS. If you wish to receive direct assistance from our Support Team, use
    Support Center at http://www.devexpress.com/Support/Center
    Filed under:
  • 7/31/2007 6:02 AM In reply to

    Re: Change from ASPxGrid to ASPxGridView

     Hi Andrew

     I saw the demo.  In fact I am trying to follow it in a project.

    But in the demo the detail fields are not data aware. Does this mean that we must handle

    set / get of each fields manually ? No more use of AspxTextbox ? Only plain input text ?

     

  • 7/31/2007 6:36 AM In reply to

    Re: Change from ASPxGrid to ASPxGridView

     I saw now the data binding demo. I suppose it can answer my question isn'it ?

    Thanks

    Bye 

  • 7/31/2007 6:52 AM In reply to

    Re: Change from ASPxGrid to ASPxGridView

    In the current version you should get/set values manually for editors located outside the grid.
    We are going to improve this in upcoming major versions.
    You don't need to do anything for in-place editors.

    Thanks, Andrew
    R&D, .Net Team
    Developer Express Inc.

    PS. If you wish to receive direct assistance from our Support Team, use
    Support Center at http://www.devexpress.com/Support/Center
    Filed under:
  • 7/31/2007 7:04 AM In reply to

    Re: Change from ASPxGrid to ASPxGridView

    I have a page with a grid and several editors outside. Browsing the records in the grids should

    synchronize the editors. With aspxgrid I resolved using the grid in server mode and rebinding the editors at the postback on focused row change.

    Are you saying that this would be impossible with gridview in this version ?

    Even using a detailsview with editors inside ?

    It is very important to me since I have to decide which component use.

    GridView seems quicker and thougth for the .net 2.0 version but I must be able to do this

    kind of thing to use it. 

     

  • 7/31/2007 7:44 AM In reply to

    Re: Change from ASPxGrid to ASPxGridView

    Ok, I got you at last.

    Sure, you can do it. Our editors and detailView work fine.

    You have to set the grid EnableCallbacks property to false to do it. The ASPxGridView will work via postbacks.

    If you put the grid and editors inside the MS Ajax Update Panel than you will get the Ajax experience.

    Thanks, Andrew
    R&D, .Net Team
    Developer Express Inc.

    PS. If you wish to receive direct assistance from our Support Team, use
    Support Center at http://www.devexpress.com/Support/Center
    Filed under:
  • 7/31/2007 12:06 PM In reply to

    Re: Change from ASPxGrid to ASPxGridView

     Hi Andrew

    I tried the approach you suggested but the focusedrowchanged event fires only once at startup (and with focusedrowindex = -1).

    I disabled EnableCallbacks and defined an event server side attached to the focusedrowchanged. 

    Here is my markup:

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestDesignTime.aspx.cs" Inherits="TestDesignTime" %>

    <%@ Register Assembly="DevExpress.Web.ASPxGridView.v7.2, Version=7.2.1.0, Culture=neutral, PublicKeyToken=9b171c9fd64da1d1"
      Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dxwgv" %>
    <%@ Register Assembly="DevExpress.Web.ASPxEditors.v7.2, Version=7.2.1.0, Culture=neutral, PublicKeyToken=9b171c9fd64da1d1"
      Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>Untitled Page</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
          <dxwgv:aspxgridview id="GrdMain" runat="server" autogeneratecolumns="False" datasourceid="DtsTabCdc"
            keyfieldname="ID" style="z-index: 100; left: 18px; position: absolute; top: 44px" OnCustomCallback="GrdMain_CustomCallback" EnableCallBacks="False" OnFocusedRowChanged="GrdMain_FocusedRowChanged"><Columns>
              <dxwgv:GridViewCommandColumn VisibleIndex="0">
                <DeleteButton Visible="True">
                </DeleteButton>
                <EditButton Visible="True">
                </EditButton>
                <NewButton Visible="True">
                </NewButton>
              </dxwgv:GridViewCommandColumn>
              <dxwgv:GridViewDataTextColumn Caption="ID" FieldName="ID" VisibleIndex="1">
              </dxwgv:GridViewDataTextColumn>
              <dxwgv:GridViewDataTextColumn Caption="DESCRIZIONE" FieldName="DESCRIZIONE" VisibleIndex="2">
              </dxwgv:GridViewDataTextColumn>
    </Columns>

    <SettingsBehavior ConfirmDelete="True" AllowFocusedRow="True"></SettingsBehavior>

    <ClientSideEvents RowClick="function(s, e) {
        //GrdMain.StartEditRow(e.visibleIndex);
    }" FocusedRowChanged="function(s, e) {
        //GrdMain.PerformCallback(s.GetFocusedRowIndex());
    }"></ClientSideEvents>

    <SettingsEditing Mode="EditForm"></SettingsEditing>
    </dxwgv:aspxgridview>


    Thanks in advance for any tips/suggestion

     

  • 8/1/2007 3:56 AM In reply to

    Re: Change from ASPxGrid to ASPxGridView

    Hi Paolo,
    Before suggesting anything I had to try first.
    The problem is, that we did not take your scenario into account. We assumed that the focused row feature will be used on the client only. That was our fault.
    Anyway, we’ve made the required changes in v7.2.2, which we will hopefully release this week.
    In the new version, you will have to:
     1) Set the EnableCallbacks property to false.
     2) Call the client PerformCallback method on the focused changed event (actually it will call a post back, because the EnableCallbacks property is false)
    <ClientSideEvents FocusedRowChanged="function(s, e) { grid.PerformCallback(); }"/>
     3) On the server FocusRowChanged event rebind your DetailView.
    I tried this with the latest bits, and it works fine.

    Thanks, Andrew
    R&D, .Net Team
    Developer Express Inc.

    PS. If you wish to receive direct assistance from our Support Team, use
    Support Center at http://www.devexpress.com/Support/Center
    Filed under:
  • 8/1/2007 4:14 AM In reply to

    Re: Change from ASPxGrid to ASPxGridView

     Hi Andrew,

     Thank you very much for your reply.

    The postback on focusedrowchange is not a "requirement" for me. In fact I followed

    this way because it seemed too difficult to me to rebind all the detail fields client side.

    From your answer I guess it is possible. May you have an example ? I am interested specifically in see the js code for re-bindind data control editors to the datasource filtered on a (new) primary key.
    Thanks 

     

Page 1 of 1 (12 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED