Hi
I have a store procedure..that store procedure i called in a gridview ..now my grid view look like this.
id name key condition operator supplement
1 jana officialwork J = OR
1 jana officialwork Home = OR
1 jana personalwork J = OR
1 jana personalwork Home = OR
2 jana personainsure chemi = OR
2 jana officialainsure chemi = OR
Now i want to display like this
1 If officaialwork = J oR Home or officeVisit = J OR Home then Dr.jain
I want to display my grid view look like the above..that is in id 4 i have four rows that i want to club it as one sentence same like all id.. how to this..i didnt have a idea..plz share ur ideas
Loading
Ashish DoshiPosted Jul 18, 2011, 2:41 AM
I dont think there is any way in .NET that you can directly get the output in the format as shown in your post.
You will have to change the Stored Procedure and write a cursor in that which loops through the records and creats a single record for each ID (even if there are "n" number of rows for an ID) and returns the same result set.
The other work around is..
In the .NET Application, do not data bound the grid. Create a Data Set, Loop through the same and for each ID build the String (as per the format required) and add the same to the data grid manually.