GridPanel, Store, DataSource - passing Keys

  1. #1

    GridPanel, Store, DataSource - passing Keys

    Hello,

    In your samples, you use local variable "insertedValue" to pass inserted key from DataSource to Store.

    private string insertedValue;
    
     protected void Store1_AfterRecordInserted(object sender, AfterRecordInsertedEventArgs e)
        {
            if (!string.IsNullOrEmpty(insertedValue))
            {
                e.Keys.Add("SupplierID", insertedValue);
                insertedValue = "";
            }
        }
    
        protected void SqlDataSource1_Inserted(object sender, SqlDataSourceStatusEventArgs e)
        {
            //use e.AffectedRows for ensure success action. The store read this value and set predefined Confirm depend on e.AffectedRows
            //The Confirm can be granted or denied in OnRecord....ed event
            insertedValue = e.Command.Parameters["@newId"].Value != null
                                ? e.Command.Parameters["@newId"].Value.ToString()
                                : "";
        }


    Is there other way to let Store to know about inserted key value?

    Thank you very much for your help.
    Last edited by Daniil; Jul 17, 2012 at 6:54 PM. Reason: Please use [CODE] tags

Similar Threads

  1. Replies: 1
    Last Post: Jun 12, 2012, 10:34 AM
  2. [CLOSED] Change Store Datasource in Combo Editor Column inside GridPanel
    By tlfdesarrollo in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Apr 13, 2012, 7:32 PM
  3. Replies: 5
    Last Post: Feb 01, 2012, 11:54 AM
  4. [CLOSED] ComboBox / Store / DataSource : Store.DataSource is NULL
    By wagger in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Apr 24, 2011, 10:09 AM
  5. Replies: 1
    Last Post: Jul 23, 2010, 10:02 PM

Posting Permissions