Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

C# Datagrid

  • 27-10-2004 1:40pm
    #1
    Posts: 0


    Hey all,

    Can anyone point me to any good tutorials on C# components, in particular Datagrid, I'm trying to implement an interface similiar to outlook's calender, am going quite mad trying to find how to manipulate the grid.

    ANy help/pointers in the right direction would be great thanks

    (Google doesn't really help on this matter, i've been looking for a while now)


Comments

  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    I'm assuming this is for Windows forms; myself I've found the online tutorials only come up to intermediate level at best and are usually aimed at people beginning C#, although I stand to be corrected. Your solution sounds a bit more specific than tutorial level stuff. Personally I go for the trial and error approach and if I get really stuck then I discuss it with people around me or online.

    What exactly are you trying to replicate, the taskpad or the diary? It may be worth your while buying in a 3rd party control.


  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    If you mean manipulating data then it's the datasource you apply to the datagrid that you should be trying to manipulate. Instead of trying to change the contents of your datagrid with your code you need to have some datasource, such as a datatable which you can enter all your stuff into, you then set your datagrids datasource equal to this. Then when you change the contents of your datasource your datagrid will update to reflect this.


  • Registered Users, Registered Users 2 Posts: 2,800 ✭✭✭voxpop


    If you want to change the data, then modify your datagrids datasource property, usually a datatable or dataview. If you want to make the bound data look different in the grid then you need the datagridtablestyle.
    if you want a particular column to act differently than a plain textbox then create your own column class, eg you could extent the textboxcolumn and overrid the edit method to only allow numbers or something.


Advertisement