Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
In my page, I have two gridviews. I have written two separate methods for Fetching Datas to those Gridviews.. But if I try to run the project, the 2nd one is only persisting the data.. First One looses the Data, may be due to postback... So, guide me how to solve the problem


C#
try
{
    FillBMSGrid();

    if (txtSanctionOrderDate.Text.Trim() != "")
    {
        FillTreasuryGrid();
    }
}
catch (Exception ex)
{
    MessageBox(ex.Message);
}
Posted
Comments
ChintanShukla 4-Sep-14 8:39am    
Can you share Code in those two methods.
jacobjohn196 4-Sep-14 8:44am    
Post your FillBMSGrid(); and FillTreasuryGrid(); code here. Use "improve question" link.

1 solution

check this line of code.

C#
if (txtSanctionOrderDate.Text.Trim() != "")
 
Share this answer
 
Comments
Manikandan K 5-Sep-14 0:31am    
my FillTreasureGrid() is showing the data..

so
if (txtSanctionOrderDate.Text.Trim() != "")

is executing fine..
Vindhyachal_Kumar 5-Sep-14 2:45am    
@Manikandan, please do the debugging and check is this condition is true or false because 2nd grid binding depends on this condition.
Manikandan K 5-Sep-14 3:52am    
that condition is working fine.. i checked it with breakpoint

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900