473,320 Members | 1,951 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Confused about Gridview and DataSourceID

dgk
I have a gridview for which the datasource at design time is a method
that returns a collections.generic.List (of MyClass). That created an
ObjectDataSource1 which is the DataSourceID for the gridview. At run
time I figured that I would just set the datasource to another List
(of MyClass) which I'm actually generating on the fly.

That works, but the GV can't be sorted because that relies on the
DataSourceID which has to be wiped when I set the DataSource of the GV
directly.

So, I tried to use the method that returns the list to really do the
work, but I can't figure out how to pass in the parameters that will
be required. I tried setting the ObjectDataSource1.SelectParameters to
what needs to be passed to the method but I can't get the syntax
right.

Any help greatly appreciated.
Jun 29 '06 #1
0 989

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: P. Yanzick | last post by:
Hello, I've been playing with master/detail views as well as editing in the gridview, and I ran across a strange problem that I am not exactly sure where to go to try to solve. I have 2...
4
by: Marcos Beccar Varela | GamaCom Argentina | last post by:
Hello Everyone. I need to use a gridview, that when I use the Update command one of the colums, instead of showing a textbox where the user can write, I need a combobox (listobx), where there are...
0
by: Mike P | last post by:
Where exactly are the updateparameters of a gridview picked up from? I have created 2 very similar gridviews and given the updateparameters the same names as in my edititemtemplates. Yet this...
0
by: Mike P | last post by:
I am trying to edit a gridview while using paging, but whenever I try to edit a row on a page other than page 1, I get an error. Here is my gridview and my code : <asp:GridView ID="GridView1"...
0
by: DC | last post by:
The problem I'm using the .NET GridView and FormView objects for the first time and im getting the error "An OleDbParameter with ParameterName '@ID' is not contained by this...
3
by: Jeff | last post by:
Hey asp.net 2.0 In the source I posted below, there is a GridView (look at the bottom of the script): <asp:GridView ID="gvwOnline" runat="server"> </asp:GridView> I'm trying to assign a...
4
by: GaryDean | last post by:
I have an objectdatasource reading a dataset and I have a gridview using that objectdatasource (at design time). It binds fine but I need to clear it. myGridView.DataSource = null:...
4
by: Tomasz | last post by:
Hello Developers, Here is interesting problem I just came across: how do I wire a GridView control programmatically? Here is my sample code using Object Data Source: protected void...
4
by: =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?= | last post by:
I setup a simple gridview as a utility just to do some updates, nothing fancy just wanted easy UI to make updates. When I select ‘Edit’, I get the fields I want to edit. I edit them and click...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.