Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
'Refreshing' GridView's dataset with new data
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
'Refreshing' GridView's dataset with new data
Environment versions
Environment:
C# 3.0
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01343384
Message ID:
01343384
Views:
67
Hi everybody,

I tried to post the message bellow several times on ASP.NET forum today, but always got an error :( I think I posted already today, but this one describes my idea a bit better:
--------------------------------------------------------------------------------
Hi everybody,

I have a GridView that is bound to a SQLDataSource. Somewhere in my code I use (commented this code for now for my tests).
//if (Session.Count > 0)

//{

// this.ProfilesGrid.DataSourceID = string.Empty;

// this.dts = (DataSet)Session["dts"];

// this.ProfilesGrid.DataSource = dts;

//}
However, by doing this I remove the DeleteCommand. I want to be able to preserve my GridView SQLDataSourceID, but be able to update dataset with the new datatable. Do you know how can I do this if this is possible?

In other words, if I create a new datasource for my GridView, I want to update GridView's SQLDataSource with table (new data) from it.

Do you know if this is doable or how can I solve my current "lost" DeleteCommand problem?

Thanks a lot in advance.
If it's not broken, fix it until it is.


My Blog
Reply
Map
View

Click here to load this message in the networking platform