Click here to Skip to main content
15,918,471 members
Home / Discussions / C#
   

C#

 
AnswerRe: MP3 Player in C# ??? Pin
Kant17-Oct-03 17:56
Kant17-Oct-03 17:56 
GeneralRe: MP3 Player in C# ??? Pin
leppie17-Oct-03 19:56
leppie17-Oct-03 19:56 
GeneralRe: MP3 Player in C# ??? Pin
Dato19-Oct-03 1:27
Dato19-Oct-03 1:27 
GeneralRe: Possible Speed Enhancements Pin
Daniel M. Edwards17-Oct-03 17:14
Daniel M. Edwards17-Oct-03 17:14 
GeneralRe: Possible Speed Enhancements Pin
eggie517-Oct-03 18:26
eggie517-Oct-03 18:26 
GeneralCOM+ Service Installation Pin
Pietro217-Oct-03 12:21
Pietro217-Oct-03 12:21 
GeneralRe: COM+ Service Installation Pin
Heath Stewart18-Oct-03 10:41
protectorHeath Stewart18-Oct-03 10:41 
GeneralRe: COM+ Service Installation Pin
Pietro219-Oct-03 3:18
Pietro219-Oct-03 3:18 
Generalremoting channel woes Pin
qek17-Oct-03 11:37
qek17-Oct-03 11:37 
GeneralRe: remoting channel woes Pin
Heath Stewart18-Oct-03 10:42
protectorHeath Stewart18-Oct-03 10:42 
GeneralRe: remoting channel woes Pin
qek20-Oct-03 5:04
qek20-Oct-03 5:04 
GeneralRe: remoting channel woes Pin
Heath Stewart20-Oct-03 6:00
protectorHeath Stewart20-Oct-03 6:00 
GeneralRe: remoting channel woes Pin
qek20-Oct-03 11:02
qek20-Oct-03 11:02 
GeneralRe: remoting channel woes Pin
Heath Stewart20-Oct-03 11:38
protectorHeath Stewart20-Oct-03 11:38 
GeneralRe: remoting channel woes Pin
qek27-Oct-03 10:14
qek27-Oct-03 10:14 
GeneralRe: remoting channel woes Pin
Heath Stewart27-Oct-03 10:23
protectorHeath Stewart27-Oct-03 10:23 
GeneralRe: remoting channel woes Pin
qek27-Oct-03 10:50
qek27-Oct-03 10:50 
GeneralRe: remoting channel woes Pin
Heath Stewart27-Oct-03 10:53
protectorHeath Stewart27-Oct-03 10:53 
GeneralRe: remoting channel woes Pin
qek27-Oct-03 11:46
qek27-Oct-03 11:46 
Generalcustom attribute question Pin
sharkfish17-Oct-03 9:32
sharkfish17-Oct-03 9:32 
GeneralRe: custom attribute question Pin
Alex Korchemniy17-Oct-03 10:49
Alex Korchemniy17-Oct-03 10:49 
GeneralRe: custom attribute question Pin
sharkfish17-Oct-03 11:31
sharkfish17-Oct-03 11:31 
GeneralDataGrid and ArrayList Pin
Wjousts17-Oct-03 8:26
Wjousts17-Oct-03 8:26 
I have a form which has a DataGrid which I bind to an ArrayList. The grid
displays fine and I can edit the values on the grid and they get passed on
to the objects in the ArrayList itself. The problem, however, is with
handling adding and remove objects from the ArrayList. It doesn't
automatically update the DataGrid to reflect the changes to the ArrayList.
So I tried this, which kind of works Confused | :confused: :
private void btnNew_Click(object sender, System.EventArgs e)
{
    myAL.Add(new myClass());
    MyGrid.DataSource = null;
    MyGrid.DataSource = myAL;
}

private void btnDel_Click(object sender, System.EventArgs e)
{
    myAL.Remove(myAL[MyGrid.CurrentRowIndex]);
    MyGrid.CurrentRowIndex = 0;
    MyGrid.DataSource = null;
    MyGrid.DataSource = myAL;
}

This works until you try to either: remove the bottom item on the grid
(System.ArgumentOutOfRangeException) or add an item to an empty grid
(System.IndexOutOfRangeException). Plus it just doesn't seem like the right
way to do this. Can anybody help me out here and point me in the right
direction? Everything I've found online so far covers binding a grid to a
datatable or dataview only.
GeneralRe: DataGrid and ArrayList Pin
Daniel M. Edwards17-Oct-03 16:59
Daniel M. Edwards17-Oct-03 16:59 
GeneralRe: DataGrid and ArrayList Pin
Heath Stewart18-Oct-03 10:49
protectorHeath Stewart18-Oct-03 10:49 

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.