Click here to Skip to main content
15,904,153 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My prob is that I am binding a grid that gridview there is a logic that two link button are that and only that link button is enabled which user wants. Thats smething we have done back in the query selection. Now that is achieved by using Row DataBound event. But issue arises when a user clicks on link button... it again goes to the row data bound event usually and gives the error that

GridView - A field or property was not found on the selected data source.
I am using two events of grid view:- selected Index changed and row databound.
It generally says that WorkOrder_Name is not found on selected source.
Pls help me asap.

THanx in anticipation.
Updated 22-Apr-12 19:00pm
amolpatil2243 23-Apr-12 1:07am    
can you share your code?
Sandeep Mewara 23-Apr-12 1:22am    
Did you try to DEBUG and see what all are there in your datasource and if some property you are trying to bind is actually missing?
amolpatil2243 23-Apr-12 1:38am    
I am also thinking that he is missing to bind property to grid view that's why the error is raising.

1 solution

write gridview bind code inside a not ispostback
at pageload

   //Bind Gridview

hope it will help u

Best Luck
Happy Coding :)
Share this answer
Taresh Uppal 23-Apr-12 1:11am    
I am not binding my grid view at page load... it gets binded on item command event of a i guess it will generate errors !
Nilesh Patil Kolhapur 23-Apr-12 1:22am    
give your code
Vasim889 23-Apr-12 1:50am    
give your code andthen solve your problems

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