Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Just to add...

 

Datasource of a grid can either be a collection...

You can create a class, put some properties in it (note that only properties will appear as columns), and then instanciate a collection os that class and there you go...

 

Alex :p

Software bugs are impossible to detect by anybody except the end user.
Posted

Thanks but it is a little late, i worked out a similar way to what AlexCode said. I created a class and is an IList (ArrayList). Then i set the datasource to the ArrayList.

 

I still have a problem though. When you have a class the columns are in order from A-Z because they are properties. I haven't been able to find information on using DataGridTableStyle which i think your are meant to use.

 

I am also trying to delete an item from the list. I have tried

DatGrid1.DataBindings.RemoveAt(index)

but it doesn't have any items. Currently i am unbinding the DataGrid, removing the item and rebinding.

 

Please help

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...