Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
90
Get ValueField value from DropDownProvider server side
posted

I am trying to get the ValueField (ID) from a DropDownProvider embedded in a column in a webdatagrid when its updated.  So basically after the grid loads the user would update a column that has the drop down and hit a save button.  When they hit save the RowUpdating event will fire and this is where I would like to update the DB.  In the RowUpdating function i can get the TextField value with the following code: Var StatusDesc = e.Values["PI_WORKFLOW_STATUS_LOOKUP_DESC"];.  But I cannot figure out how to get the updated ValueField which contains the primary key i need to use in my save.  Here is my code.

Front END:

 <ig:WebDataGrid ID="grdQueryMainDisplay" runat="server" Width="1200px" AutoGenerateColumns="False" DataKeyFields="PI_LOAD_MASTER_ID" OnRowUpdating="grdQueryMainDisplay_RowUpdating1"          OnRowUpdated="grdQueryMainDisplay_RowUpdated"  EnableAjax="True" EnableAjaxViewState="True">     

  <EditorProviders> 

<ig:DropDownProvider ID="Statuses" EditorControl-DropDownContainerWidth="100px" EditorControl-DropDownContainerHeight="100px">

                 <EditorControl ID="EditorControl2" runat="server" DisplayMode="DropDownList" DataSourceID="dsGetStatusTypes"                     TextField="PI_WORKFLOW_STATUS_LOOKUP_DESC" ValueField="PI_WORKFLOW_STATUS_LOOKUP_ID" AutoPostBack="False" >           

          <DropDownItemBinding TextField="PI_WORKFLOW_STATUS_LOOKUP_DESC" ValueField="PI_WORKFLOW_STATUS_LOOKUP_ID"></DropDownItemBinding>                  </EditorControl>            

 </ig:DropDownProvider>      

   </EditorProviders>

        <Columns>            

 <ig:BoundDataField DataFieldName="PI_SUB_CLIENT_NAME" Key="PI_SUB_CLIENT_NAME">                 <Header Text="Client">                 </Header>             </ig:BoundDataField>           

  <ig:BoundDataField DataFieldName="PI_QUERY_NAME" Key="PI_QUERY_NAME">                 <Header Text="Query">                 </Header>             </ig:BoundDataField>            

<ig:BoundDataField DataFieldName="LOAD_END_DT" Key="LOAD_END_DT">                 <Header Text="Query End Date">                 </Header>             </ig:BoundDataField>             <ig:BoundDataField DataFieldName="PI_WORKFLOW_STATUS_LOOKUP_DESC" Key="PI_WORKFLOW_STATUS_LOOKUP_ID">                 <Header Text="Status">                 </Header>           

  </ig:BoundDataField>

 

Back END:

        protected void grdQueryMainDisplay_RowUpdating1(object sender, Infragistics.Web.UI.GridControls.RowUpdatingEventArgs e)         {  

           if (Request.Cookies["PageChanging"] != null)             {

            }

            //This Line gives me the updated TextField       

           var StatusDesc = e.Values["PI_WORKFLOW_STATUS_LOOKUP_DESC"];

            //need to get the updated key value here.  The ValueField from the DropDownProvider

                }

 

Parents Reply Children
No Data