asp.net - Telerik radGrid - possible to do use AllowAutomaticUpdates when Datasource = a dataset? -


I am setting the dataset of my ride grid on a dataset (which I have stored in the session). I have EnableAutomaticUpdates enabled and enabledViewState, the implemented NeedDataSource, DatakeyNames, etc. (see the code given below)

However, when I press the Edit button and after the changes press the Update link, And does not leave editing mode ... it just stays in editing mode, and there is no error of any kind. So, the question is .... Does anybody know that radGrid also supports AutomaticUpdates with EnableViewstate, so the changes in the grid will be pushed into the dataset automatically, on which it Is it bound?

One you think you can read the documentation, but I can not find a definite answer.

thanks


<> pre & lt; Telerik: Radgrid id = "grid" runat = "server" AllowPaging = "right" AllowSorting = "right" AllowAutomaticUpdates = "true" AutoGenerateEditColumn = "true" gridlines = "none" & gt; Protected Sub Page_Load (ByVal as this object, ByVal e As System.EventArgs) IsPostBack not Me.Load handle the data New DataGateway Dim ds dataset = data.GetEmployeesByProgram (to dim as the year = 2009, ProgramName: = "long Term incentive Share program") DataTable = ds.Tables as dim DT (0) ds.Tables (0) .PrimaryKey = new DataColumn () {dt.Columns ( "EmployeeNum"), dt .Columns ( "ProgramName"), dt.Columns ( "old")} session ( "data source") = with Me.grid .AllowAutomaticUpdates DS = true .AutoGenerateColumns = true .AllowSorting = true .AutoGenerateEditColumn = true .EnableViewState = True 'requirement The Yk !!! Me.grid.MasterTableView.AllowAutomaticUpdates = True Me.grid.MasterTableView.EditMode = End Sub Sub Sub Sub grid_NeedDataSource (ByVal source As Object, ByVal Telerik.Web E with end termination with GridEditMode.Inplace end. UI.GridNeedDataSourceEventArgs) Grid Handle. NeedDataSource Debug.WriteLine ( "NeedDataSource:" & amp; e.RebindReason.ToString) as Dim ds dataset = CTYPE (session ( "Data Source"), datasets) Me.grid.MasterTableView.DataKeyNames = new String () {"EmployeeNum" "Program Name", "Year"} Me Grid Data source = DS ending sub

In short, playing here is an important issue :

The "auto" operations are only supported when you are using data source control to bind the grid. Object data is included on the , so that you can use your DAL with ODS and then support auto-upset / update / delete.

When a data is directly bound in the table, then update it manually so that's because it is the data source control - not the radheid - which are providing the "auto" argument for the CRUD functions . Fortunately, it is not difficult to handle updates manually if that way is the way for you. For example, see some demos on Telrek Dots:

If you want, you can disable the viewtest on Wright Gide. The best way to do this is to use the support of the grid for client-side databasing (though this requires you to expose your DAL through the service provider) For a demonstration of this approach see the demo:

< P>

Hope that helps! -tode


Comments