This is a migrated thread and some comments may be shown as answers.

ExtractValues method returns null values

1 Answer 73 Views
Grid
This is a migrated thread and some comments may be shown as answers.
EmpowerIT
Top achievements
Rank 2
EmpowerIT asked on 09 Dec 2008, 11:56 PM
Hi,
I am trying to retrieve the user input from a rad grid input form. For some reasons that I do not want to get into right now, I am using an external button to the grid to trigger the 'save' command. i.e. I am not using a command item.

In the external button event i have the following:

void SaveButton_Click(object sender, EventArgs e) 
    { 
        foreach (GridEditableItem itm in MasterJobSchedulesGrid.EditItems) 
        { 
            Hashtable values = new Hashtable(); 
 
            itm.ExtractValues(values); 
            foreach (Parameter updateParam in MasterJobSchedulesDataSource.UpdateParameters) 
            { 
                updateParam.DefaultValue = Convert.ToString(values[updateParam.Name]); 
            } 
            MasterJobSchedulesDataSource.Update(); 
            itm.Edit = false
        } 
        MasterJobSchedulesGrid.Rebind(); 
    } 

The values returned are always null. I have also tried using the itm.OwnerTableView.ExtractValuesFromItem method, but it also gives me nulls.

Any help would be appreciated.

1 Answer, 1 is accepted

Sort by
0
EmpowerIT
Top achievements
Rank 2
answered on 10 Dec 2008, 12:23 AM
I solved my own problem.

I was using EditForms instead of InPlace forms, so i needed to pass in the EditFormItem to the ExtractValuesFromItem method
Tags
Grid
Asked by
EmpowerIT
Top achievements
Rank 2
Answers by
EmpowerIT
Top achievements
Rank 2
Share this question
or