call two different storedprocedure for single gridview??

Posted by Oswaldlily under ASP.NET on 5/23/2012 | Points: 10 | Views : 1502 | Status : [Member] | Replies : 2
Is it possible to call two different storedprocedure for single gridview??
LIke following????????????
gv1.DataSource = _Mapper.STIFetchGridSP(_No);

gv1.DataSource = _Mapper.SupplierTaxInvoiceSearch(Convert.ToDateTime(txtdate.Text), Convert.ToChar(chkFlag));
gv1.DataBind();




Responses

Posted by: Fool2code on: 5/23/2012 [Member] Starter | Points: 25

Up
0
Down
the question why can't you bind all the data in single call.

can you post your sql query by which you are getting data , so that we can make it a single query that serve your purpose.

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Oswaldlily on: 5/24/2012 [Member] Starter | Points: 25

Up
0
Down
In design page i m binding gridview in following way
<asp:TemplateField HeaderText="Supplier Name">
<ItemTemplate>
<asp:Label ID="lblSuppName" runat="server" Text='<%#Eval("AD_Supplier_Name") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>

This <%#Eval("AD_Supplier_Name") %>' comes from one of storeedprocedure..similarly i has column names from other stored procedure too..so i requested to call 2 storedprocedure....So how to bind it

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response