ASP.NET - Gridview bind method no repeat columns?

Asked By chandru m
09-Feb-12 02:18 AM
Hi,

     am using gridview bind method but repeat row in the table.

      am using query:

               SELECT a.sno,a.menuname,b.submenu,b.sno from submenu as b inner join topmenu as a on a.sno=b.menuid INNER JOIN Submenulist as c ON b.sno=c.submenuid group by a.sno,a.menuname,b.submenu,b.sno

output:

1    Websit Manager    Domain Manager         1
2    Table Reservation    Restaurant Manager   1
3    Costomer Manager    Team Manager      1
4    Urbane    News & Events                     1
5    Discover    Careers                                    1
6    Vehicle Maintanance    Customer Feedback  1
7    Sales    Photo Gallery                                  1
8    Reports    Manage Videos                          1
9    Manage Users    Health Tips                       1
10    Websit Manager    Food Menu Manager    1

but i want output:

        this format:
            
                    websitemanager this main menu

                         websitemanager
                                 Domain Manager- this is submenu links
                                 Restaurant Manager
                                 Team Manager
                                 Customer Feedback
                                  Food Menu Manager
                       Table Reservation
                             Add new table reservation

Thanks to all
  Reena Jain replied to chandru m
09-Feb-12 02:25 AM
Hi,

For that i will suggest you to use the menu control with datalist where you can bind the menu with one table and with loop you can bind the submenu with another table.

let me know if you want more information regarding this
  Web Star replied to chandru m
09-Feb-12 02:31 AM
change your query , you need to join on sno of manmenu table with sno of submenu table and one more thing why you are joining third table Submenulist if submenu already column in submenu table so just try this

 SELECT A.menuname,B.submenu from Topmenu A inner join Submenu as B on A.sno=B.sno menuid  group by A.menuname,B.submenu
  chandru m replied to Reena Jain
09-Feb-12 03:06 AM
hi Reena jain,

      i want sample datalist menu control



Advance Thanks
Create New Account
help
Net hi friends Any one send frequently asked Important questions in C# .Net, ADO .Net, Asp .Net and Sql Server. . . . . . . . tx in Advance. . . . . . Hi, Find this. . (B)What is an IL? (B stop a long running thread? (A) How do I debug thread? (A) What is Thread.Join () in threading? (A) What are Daemon threads and how can a thread be created as A) What is scavenging? (B) What are different types of caching using cache object of ASP.NET? (B) How can you cache different version of same page using ASP.NET cache object? (A) How will implement Page Fragment Caching? (B) Can you compare ASP.NET sessions with classic ASP? (B) Which are the various modes of storing ASP.NET
in Sql server as var_name int How do you separate business logic while creating an ASP.NET application? There are two level of asp.net debugging 1. Page level debugging For this we have to edit the page level debugging The control itself will take care of the date display How can you deploy an asp.net application ? You can deploy an ASP.NET Web application using any one of the following three deployment options. a) Deployment using VS
w3wp.exe (0x0DB4) 0x0AB8 Excel Services Application Excel Calculation Services 8jg2 Medium ResourceManager.PerformCleanup: Memory Manager: CurrentSize = 536850432. 53fed7f1-b549-1a88-0000-000050f7b00c 11 / 13 / 2011 00:08:32.18 w3wp w3wp.exe (0x0DB4) 0x0BEC Excel Services Application Excel Calculation Services 8jg2 Medium ResourceManager.PerformCleanup: Disk Manager: CurrentSize = 352934. 11c5f189-b549-1a88-0000-000050f7b00c 11 / 13 / 2011 00:08:34.43 w3wp w3wp.exe (0x0DB4) 0x0AB8 Excel Services Application Excel Calculation Services 8jg2 Medium ResourceManager.PerformCleanup: Memory Manager: CurrentSize = 536850432. 53fed7f1-b549-1a88-0000-000050f7b00c 11 / 13 / 2011 00:08:41.88 w3wp.exe (0x0DB4) 0x0AB8 Excel Services Application Excel Calculation Services 8jg2 Medium ResourceManager.PerformCleanup: Memory Manager: CurrentSize = 536850432. 53fed7f1-b549-1a88-0000-000050f7b00c 11 / 13 / 2011 00:08:43.50 OWSTIMER w3wp.exe (0x0DB4) 0x0BEC Excel Services Application Excel Calculation Services 8jg2 Medium ResourceManager.PerformCleanup: Disk Manager: CurrentSize = 352934. 11c5f189-b549-1a88-0000-000050f7b00c 11 / 13 / 2011 00:08:46.50 OWSTIMER w3wp.exe (0x0DB4) 0x0AB8 Excel Services Application Excel Calculation Services 8jg2 Medium ResourceManager.PerformCleanup: Memory Manager: CurrentSize = 536850432. 53fed7f1-b549-1a88-0000-000050f7b00c 11 / 13 / 2011 00:08:47.60 OWSTIMER w3wp.exe (0x0DB4) 0x0AB8 Excel Services Application Excel Calculation Services 8jg2 Medium ResourceManager.PerformCleanup: Memory Manager: CurrentSize = 536850432. 53fed7f1-b549-1a88-0000-000050f7b00c 11 / 13 / 2011 00:08:52.03 w3wp w3wp.exe (0x0DB4) 0x0BEC Excel Services Application Excel Calculation Services 8jg2 Medium ResourceManager.PerformCleanup: Disk Manager: CurrentSize = 352934. 11c5f189-b549-1a88-0000-000050f7b00c 11 / 13 / 2011 00:08:55.89 w3wp
Migration from ASP to ASP.net How to convert ASP site to ASP.NET site using C# http: / / www.asp.net / downloads / archived-v11 / migration-assistants / asp-to-aspnet hi, ASP.NET framework is very much different from unstrucured ASP and there is no correct way to
Tracing in ASP.NET? hi all, what is tracing? how to achieve tracing in asp.net? different ways of doing tracing? thanks and regards Aman Khan hi. . Tracing in ASP.NET 2.0 Tracing is a way to monitor the execution of your ASP.NET application. You can record exception details and program flow in a way that doesn't