Binding a datagrid to a stored procedure...


Author
Message
StarkMike
StarkMike
Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)
Group: Forum Members
Posts: 436, Visits: 944
How do I bind a grid to a stored procedure in Visual Studio 2005? The twist is that I would like to setup the grid at design time. Column headings, sizes, any additional formatting that I would otherwise have to do in code. Do I somehow create a dataset to bind the grid to initially?



P.S. I really appreciate the general .NET forum... its nice to be able to pull on your knowledge of .NET also.



Thanks
Reply
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
The business object's strong-typed properties do not have to reflect the data inside of the business object.  You can retrieve any data you like and access it one of two ways.  All business objects have an "Item" property that will retrieve a column specified:

myBo.Item("MyField") Or MyBo("MyField")

You can also access the data table within the BO and access the rows:

MyBO.CurrentDataTable.Rows(0).Item("MyField")

Ben's post is a more "pure" approach - but both options will work depending upon your circumstances.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search