Click here to Skip to main content
15,909,939 members
Home / Discussions / Database
   

Database

 
GeneralRe: display stored procedure format..........., Pin
Member 38798819-Jul-07 0:05
Member 38798819-Jul-07 0:05 
GeneralRe: display stored procedure format..........., Pin
Pete O'Hanlon9-Jul-07 0:28
mvePete O'Hanlon9-Jul-07 0:28 
QuestionExporting and Importing Pin
M. J. Jaya Chitra8-Jul-07 21:04
M. J. Jaya Chitra8-Jul-07 21:04 
AnswerRe: Exporting and Importing Pin
Harini N K9-Jul-07 19:21
Harini N K9-Jul-07 19:21 
QuestionProblem Insert data into MySQL using ASP.NET Pin
drexler_kk8-Jul-07 17:24
drexler_kk8-Jul-07 17:24 
AnswerRe: Problem Insert data into MySQL using ASP.NET Pin
N a v a n e e t h8-Jul-07 21:33
N a v a n e e t h8-Jul-07 21:33 
GeneralRe: Problem Insert data into MySQL using ASP.NET Pin
drexler_kk8-Jul-07 22:21
drexler_kk8-Jul-07 22:21 
QuestionBinding a datagridview to a binding source Pin
steve_rm8-Jul-07 12:13
steve_rm8-Jul-07 12:13 
Hello,

I am using a datagridview and have bound it to a bindingsource.

In the datagridview i have a combo box column which gives the user a choice of either, ordered, pending, delivered.

However, In this specific grid I just want to display the pending orders. But if I click on the status and select delivered, I want the grid to display "delivered", Until I click save. However, what is happening then I click on the combo box and select delivered it will automatically refresh and not display delivered, only the pending orders. The customer would like to see all the orders that have had their status changed before saving and then displaying all the pending orders again.

The binding source is filtered to display only the orders pending when I select an order from the combo box.

My idea is to select an order from the combox box and display all the pending orders for that order number. The user can then select the status to delivered, if they want to. Then click save to save the changes. The save works fine. But the delivered row will disappear when the combo box loses focus.

 Private Sub cboOrdersPending_SelectionChangeCommitted(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboOrdersPending.SelectionChangeCommitted<br />
        Try<br />
            Me.bsOrderDetails.Filter = String.Format("OrderID = '{0}' AND Status = '{1}'", Me.cboOrdersPending.SelectedValue, "Pending")<br />
            Me.dgvPendingOrders.DataSource = Me.bsPendingOrders<br />
<br />
        Catch ex As Exception<br />
            MsgBox(ex.Message)<br />
        End Try<br />
    End Sub


The code for filling the binding source is as follows:
'Fill all pending orders - these are orders that have been ordered but have not bee delivered<br />
    Private Sub FillPendingOrders()<br />
        Try<br />
            Me.TA_OrderDetails_dsCodeRed1.Fill(Me.DsAddComponetAndEquipment.OrderDetails)<br />
            Me.bsPendingOrders.Filter = String.Format("Status = '{0}'", "Pending")<br />
<br />
            Me.dgvPendingOrders.AutoGenerateColumns = False<br />
            Me.dgvPendingOrders.DataSource = Me.bsPendingOrders<br />
<br />
            'Me.HidePendingOrdersColumn()<br />
        Catch ex As Exception<br />
            MsgBox(ex.Message)<br />
        End Try<br />
    End Sub


Can someone please tell me if i have done something wrong with my code and explanation.

Many thanks for any help,

Steve
QuestionSelect by date Pin
Sam Heller8-Jul-07 5:39
Sam Heller8-Jul-07 5:39 
AnswerRe: Select by date Pin
Mike Dimmick8-Jul-07 11:49
Mike Dimmick8-Jul-07 11:49 
GeneralRe: Select by date Pin
Sam Heller8-Jul-07 11:51
Sam Heller8-Jul-07 11:51 
AnswerRe: Select by date Pin
Thomas Chester9-Jul-07 7:53
Thomas Chester9-Jul-07 7:53 
QuestionUse ' one quotation make error with sql statmetn .. Pin
kindman_nb8-Jul-07 3:47
kindman_nb8-Jul-07 3:47 
AnswerRe: Use ' one quotation make error with sql statmetn .. Pin
Sam Heller8-Jul-07 5:51
Sam Heller8-Jul-07 5:51 
GeneralRe: Use ' one quotation make error with sql statmetn .. Pin
kindman_nb8-Jul-07 10:58
kindman_nb8-Jul-07 10:58 
GeneralRe: Use ' one quotation make error with sql statmetn .. Pin
Sam Heller8-Jul-07 11:05
Sam Heller8-Jul-07 11:05 
GeneralRe: Use ' one quotation make error with sql statmetn .. Pin
kindman_nb8-Jul-07 11:52
kindman_nb8-Jul-07 11:52 
GeneralRe: Use ' one quotation make error with sql statmetn .. Pin
Sam Heller8-Jul-07 11:53
Sam Heller8-Jul-07 11:53 
GeneralRe: Use ' one quotation make error with sql statmetn .. Pin
N a v a n e e t h8-Jul-07 23:03
N a v a n e e t h8-Jul-07 23:03 
Questiongetting error "“Invalid object name 'SizeMst'. “ " while exec sp Pin
mohd imran abdul aziz6-Jul-07 20:08
mohd imran abdul aziz6-Jul-07 20:08 
Questiona month all dates want to display..., Pin
Member 38798816-Jul-07 18:14
Member 38798816-Jul-07 18:14 
AnswerRe: a month all dates want to display..., Pin
Mike Dimmick7-Jul-07 2:32
Mike Dimmick7-Jul-07 2:32 
GeneralRe: a month all dates want to display..., Pin
Member 38798818-Jul-07 19:10
Member 38798818-Jul-07 19:10 
GeneralRe: a month all dates want to display..., Pin
Pete O'Hanlon8-Jul-07 23:05
mvePete O'Hanlon8-Jul-07 23:05 
Questionms access +c#.net (date comparison) Pin
hk779216-Jul-07 8:48
hk779216-Jul-07 8:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.