possible sqldatasource bug
i am attempting to set the selectcommand in the SqlDataSource.Selecting
event. so far it has not worked. here is my code:
<%@ Page %>
void SqlDataSource1_Selecting(Object Sender,
E.Command.CommandText = "SELECT * FROM INVENTORY"
<asp:gridview id="GridView1" runat="server"
<asp:sqldatasource id="SqlDataSource1" runat="server"
if i set the selectcommand on the asp tag, then the data will be bound.
according to the documentation, the selecting event is fired before the data
is selected, allowing to manipulate the statement. i did some testing and i
thing that the selecting event is not fired unless the page is posted back.
please help me in figuring out how and when to set the selectcommand. i need
to some advanced filtering and i dont think that the selectparamters will
let me do "SELECT * FROM INVENTORY WHERE DATECREATED BETWEEN '' AND ''".
thank you for your help.
|All times are GMT. The time now is 07:49 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.