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: 7K
Mike,

You do not attach a grid to a stored procedure, but rather an object that has been populated using a stored procedure.  If you use an SF business object then you will populate using the FillByStoredProcedure method and attach to the grid using the BO itself or the internal data table.  If you are using your SqlHelper methods, then you will need to populate a dataset or a datatable with the results of the query.  You will then bind the ADO.Net results to the grid through the DataSource property...or whatever 3rd party control you are using.

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