Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Where am I

Author  Topic 

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2005-08-16 : 11:44:52
I have a page that shows a datagrid populated by a sproc. I also have a (VB.NET) function that calculates some data on the fly that I want to put into another column in the grid (so that I can sort and filter on this column). This function could be interpreted into SQL but would be quite complex and would probably have some impact on performance which is why I wrote it in VB.NET.

If I've understood correctly I should be able to do this by putting the data into a datatable in a dataset. i.e. in SQL I would add an extra column and then use an update to populate it.

Can this be done in ASP.NET? Is there a better way to do this sort of thing?

thanks

steve


Alright Brain, you don't like me, and I don't like you. But lets just do this, and I can get back to killing you with beer.

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-08-16 : 11:55:42
you can put a new datacolumn into the datatable
and put your calculation in the default value for the column.

Go with the flow & have fun! Else fight the flow
Go to Top of Page

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2005-08-17 : 03:19:53
Thanks Spirit, thats what I hoped, presumably I can then sort/filter on my calculated column


steve

Alright Brain, you don't like me, and I don't like you. But lets just do this, and I can get back to killing you with beer.
Go to Top of Page
   

- Advertisement -