Results 1 to 5 of 5

Thread: any ideas for an alternative to the datagrid?

  1. #1

    Thread Starter
    Lively Member tom_hotspur's Avatar
    Join Date
    Aug 2002
    Location
    Stafford
    Posts
    96

    any ideas for an alternative to the datagrid?

    Hiya

    Basically what i'm after is the ability to select a row and column and then insert a value (as far as i can tell the datagrid in .net doesn't let you do this) and also present all this in a grid like format.

    My inital thoughts were to use a listview and add the necessary rows and columns (listitems and subitems) first and then add the data values.

    Alternatively i could attempt to write my own control!!
    But me thinks i'd be nicely out of my depth...right up to my eyeballs!

    Any other ideas folks? or what do you think about my listview idea, have any of you used it in the same manner?

    cheers
    tom

  2. #2
    Hyperactive Member
    Join Date
    May 2002
    Location
    Wisconsin, USA
    Posts
    279
    You can allow edits in the datagrid control, if that is what you are asking. You can also create a new record in the table directly from within the datagrid.

  3. #3
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Yes, the datagrid provides this functionality. If you need more than the included datagrid provides, then you might want to consider buying a third party datagrid. At work we use the Xceedsoft's grid (xceedsoft.com). I don't like it though....but it is more powerful out of the box than the included datagrid in .Net.

  4. #4

    Thread Starter
    Lively Member tom_hotspur's Avatar
    Join Date
    Aug 2002
    Location
    Stafford
    Posts
    96
    Originally posted by crpietschmann
    You can allow edits in the datagrid control, if that is what you are asking. You can also create a new record in the table directly from within the datagrid.
    This is not quite what i am asking. My problem is as follows.

    I have a stored procedure that returns data as follows:

    [value], [row], [column]

    Basically the row and col are a reference to where the [value] field would appear in a 'grid'.

    In the past i have used the MSFlexigrid control and simply specified a row and column and inserted the value to it. The datagrid is obviously only meant for use directly with a DB not in the fashion for which i wish to use it (unfortunately).

    Basically i am after a grid representation of my data and being very new to .net i was a bit gutted to find something i've done so simply in the past has now become a pain. But i guess thats life.

    Another option ( i guess!) is once the data is gathered(within stored proc) i could transform it into a temp table/ table datatype in the form

    [Row], [Col1Value], [Col2Value], etc....

    and then use the datagrid with it.

    Thanks for your help anyway. much appreciated.
    tom

  5. #5
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    I guess I am a little confused. YOu would use a dataadapter to fill a dataset with the data returned from the stored procedure. Then you bind the datagrid to the datatable that is returned in the dataset.

    You make your edits in the datagrid, then you take that datatable and use it to update the datasource (Database).

    All that is needed to accomplish all this is a dataadapter, dataset, and datagrid. You set the dataadapters select and update commands and connection. Then you shouldn't have much of a problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width