Tuesday, May 29, 2012

How to get WPF datagrid cell value

We can easily get the value of a WPF datagrid cell value using cast with the class. in which class the data grid is   bind. consider the code




 private void GetTotalGBP()  
     {  
       decimal dr = 0, cr = 0;  
      for (int i = 0; i < receiveInvoiceDataGrid.Items.Count; i++)  
        {  
          ReceiveInvoice obj = receiveInvoiceDataGrid.Items[i] as ReceiveInvoice;  
          TGBP += Convert.ToDecimal(obj.NetValue); // getting cell value  
          TQTY += Convert.ToDecimal(obj.ConfirmOrderQty); // getting cell value  
        }  
       totalGBPTextbox.Text = TGBP .ToString("F");  
       totalQtyTextBox.Text = TQTY .ToString("F");  
     }  



vfpoledeb.1 provider is not registered on the local machine

Have u Install VFP Ole DB Provider in your System ? If No then Please Install it from following link. http://www.microsoft.com/download...