.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

CQWP QueryOverride grouping issue

Posted By:      Posted Date: October 07, 2010    Points: 0   Category :SharePoint


I have extended content query web part and using dynamic caml for query. I specified grouping in toolpart but the same group headers will appear several times. I referred http://sptoolbox.codeplex.com/Thread/View.aspx?ThreadId=33346 and many other posts which said this issue can be solved using OrderBy in the dynamic caml for the same field as grouping.

I tried adding OrderBy in the caml but run into errors. Follwing code works fine if OrderBy is removed:

            public string CreateCAMLQuery(List<string> names)
                StringBuilder sb = new StringBuilder();
                for (int i = 0; i < names.Count; i++)
                    AppendEQ(sb, names[i]);

View Complete Post

More Related Resource Links

Grouping Issue in Gridview

Consider Table in Database Table Name: Work_Order   Work_Id Height Width Thickness Material Shape 11-1 20.3 32.5 50.2 Steel U 11-2 20.3 32.5 50.2 Steel O 11-3 20.3 32.5 50.2 Steel U 11-4 22.3 32.5 50.2 Iron V 11-5 22.3 32.5 50.2 Iron V 11-6 30.3 52.5 63.2 Steel O 11-7 30.3 52.5 63.2 Steel U   Please Provide me the Sqlcommands and method to display the above in an asp.net  Grid View as shown below.   Material Height Width Thickness Shape Steel         11-1 20.3 32.5 50.2 U 11-2 20.3 32.5 50.2 O 11-3 20.3 32.5 50.2 U Steel         11-6 30.3 52.5 63.2 U 11-7 30.3 52.5 63.2 U Iron         11-4 22.3 32.5 50.2 V 11-5 22.3 32.5 50.2 V  Basically I would like group above by Material and check if Height,Weight, Thickness (shape not beconsidered) are same.Is it possible to display the above?

Gridview Grouping issue

Consider a table in DatabaseTable name: Work_OrderWork_Id     Height        Width        Thickness    Material     Shape11-1             20.3cm       32.5cm       50.2cm        Steel            U 11-2             20.3cm       32.5cm       50.2cm        Steel            V11-3             42.3cm       72.5cm       80.5cm        Steel            O11-4             42.3cm       72.5cm       80.5cm        Steel            U11-5             30.3cm       62.5cm       25.2cm        Iron              V11-6             30.3cm       62.5cm       25.2cm        Iron              U Please Provide me the Sql commands a

CQWP and Event Content Type Issue After Upgrade from 2007


If you can answer this question it will be greatly appreciated.  I know it's a weird one and I know most of you guys on the forums are top notch, but it might stump the lot of you.  So I challenge you to help me out if you can.

I am working with a colleague and he upgraded the a very large farm with about 20-30 servers.  It has about 60,000 users.  All the other site collections and applications work fine, but one.  We are having a weird issue with the Content Query Webpart.  We cannot get it to work right when we scope it to an event list.  In the drop down it's not showing any content types when it should show List Content types -> Event.  In the list type it's show greyed out "Asset Library".

Now I did notice the event content type was hidden, so I went through the fix to move it to List Content Types.  I thought this is sure going to fix my issue right?  You would think so, but it didn't fix the issue.  So I am thinking there is something corrupt with this content type.  If any of you have an idea or some suggestions I'm all ears.  I'm looking for really crazy thinking out of the box answers.  Thanks for any help in advance.  If you help me I'll try and pay it forward to the next person.  If you don't I'll still pay it forward by answering other question

Issue with row and column Grouping

In my report I have two row groups one below the other that belong to the same parent group. I also have a column group. What happens is until I have only one row group and one column group the report works fine. When I add a second row group below the first one the values are displayed correct for this second row grouping but the values for the first row group which were earlier correct are not shown. The display for those values is blank. Can anyone help with why this is happening? 

Playing with Linq grouping: GroupByMany?

One of its features is grouping. Many people understand grouping like it is defined in Sql. Linq is implementing grouping quite the same way. Let's discover this syntax and how to make consecutive groups easier.

Grouping Gridview with jquery

The requirement of the project is to show a table of data with the riskdetails(just for assumption) which have the corresponing values for every month and people used to compare the values for last months.

Building a grouping Grid with GridView and ASP.NET AJAX toolkit CollapsiblePanel

I've posted an update to this post to apply on demand loading of Details data using ASP.NET AJAX PageMethods. I'm demonstrating the usage if CollapsiblePanelExtender client events on the new post. Check it out.

I admit, Matt Berseth is really inspiring me! Few days ago I pass through 2 of his great posts:

.Surrounding your Data Table and Dialog Controls with ComponentArt Styled Panels
.Building a Grouping Grid with the ASP.NET 3.5 LinqDataSource and ListView Controls
The first one is pure design tips one which I used for making good presentation of my demo here. The 2nd post is actually the idea.

Grouping Gridview with jquery in asp.net

The requirement of the project is to show a table of data with the riskdetails(just for assumption) which have the corresponing values for every month and people used to compare the values for last months.

IsapiModule Error 500 Issue


I am about exhausted trying to figure out this error:

HTTP Error 500.0 - Internal Server Error

Description: The page cannot be displayed because an internal server error has occurred.

Error Code: 0x8007007b

Notification: ExecuteRequestHandler

Module: IsapiModule

Requested URL: http://localhost:80/ReportServer

Physical Path: c:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer

When I enable Failed Request Tracing Rules and view the log output I am supposing that the actual problem is in the 2nd call where there are 2 backslashes before the actual filename in the specified path:


CALL_ISAPI_EXTENSION DllName="C:\Windows\Microsoft.NET\Framework\v2.0.50727\\aspnet_isapi.dll"


MVC2 issue - Stuck. Trying to create a cms with nested partials


I am currently trying to display multiple items on a single page. I am not sure as to how to tackle this. What I have is a database table that has all the page data in. I have this run as a PagesController and this works fine. However what I would like to do is, if say the Products page is selected via the menu, I want to pull back not only the Products page html but also get all the products, and even be able to pull them through via category. I was trying to use a partial view, but I can't get it to work. The same would be for other pages, having partial views to display the other content, ie if Gallery is selected, the page html for Gallery shows and it then can push to a partial view that pulls all the gallery images from the gallery db table and so on. 

Maybe I am tackling this the wrong way. I have the pages stored in the db to allow for a CMS system I have setup. Maybe I need to use models for all the other items(Products, Gallery, Videos and such) and use the partial for the page html?

Any help would be greatly appreciated as I am confused.

xpath issue


Hi i am using xpath to loop through each node,

the xml is below i can get the value of "link" but i cant get the thumbnail value, have you got any ideas how i can do this, my code is below.



     <link>test 1</link>
     <media:thumbnail url="http://test.com/image.jpg" height="75" width="75" />



     <link>test 2</link>
     <media:thumbnail url="http://test.com/image.jpg" height="75" width="75" />


public void FindLinks(XPathNavigator p_xPathNav, DataTable dt)
            //run the XPath query
            XPathNodeIterator xPathIt = p_xPathNav.Select("//item");

            //use the

User validation Issue in xlsx file



I am validating user from Login.xlsx file. It was working fine by validating email and password from that file. For testing i got new file same contents of file but added some more user names.

So after that when i validating the user i am getting the following error "Data type mismatch in criteria expression".

But when i replaced the new to old one it is working fine. The contens of both files are the same. So why this kind of error happened.


Multiple Paramatized Threading issue


I need the funcitonality to have two methods run concurrently of each other and the parent thread (aka the method that makes these two calls) to halt until BOTH are done. After the threads are done, I need to perform logic on the returns of the method, so it is essential for both of them to be complete before the parent thread continues. I have searched the internet and tried varous attacks, and I always come up with the same result, this being the parent thread continues operation after the first thread finishes, leaving the second thread running.  Can someone show me a quick example of how I can do this. I have tried checking states of the threads, halting the threads, but I always end up with the same thing. Any help would be great. Thanks.

Data Truncation issue with Enterprise Library Logging WriteLog stored Proc


Hi ,

I'm using Enterprise Library Logging  feature for logging. The issue i am facing is when the Logging message is too large(more than 65534 chars) ,complete data  is not logged in the Formatted Mesage column which is  of data Type nText .

I am able insert complete data if i try inserting from Sql insert Query from sql management studio. Do i need to add any attributes to data base listener or do i need to change the sp.

 Is there any way to increase the WriteLog stored proc param size in EnterpriseLibrary.Logging config file ? . Please let me know.


Thanks In Advance.

Word Automation Issue in Windows Server 2008 Hosting



The problem I am posting here is that I was facing nearly 2 weeks around. Any body comes with this stuff please help.

Word Automation in sample ASP.NET(C#) application.

I am using Microsoft.Office.Inetrop.Word Assembly for automation. Here I am reading a XXX.dot template file and fill the contents with dynamic data.

When i am executing my code in localhost:someportnumber the automation is working fine and I could get expected result and when I am hosting in my inetmgr(Windows XP is my OS) it is also working fine.

But the problem is that when I am hosting in my production server(Windows Server 2008 Standard Edition) I am not able to perform automation and results in the following error.

Data: System.Collections.ListDictionaryInternal
Message: Word has encountered a problem.
Source: Microsoft Word

The code gets failed in the following line:

ApplicationClass wordApp = new Microsoft.Office.Interop.Word.ApplicationClass();

Document wordDoc = wordApp.Documents.Add(ref oTemplate, ref oFalse, ref oMissing, ref oMissing); // Error in this line

I cannot able to proceed further. Can anybody please help me in solving this issue?

Thank you.

With Regards,


If Statement Issue



This is very strange to me. I have spent 2hrs looking into this inside out , but dont seem to get it

I have an if statement that inserts data into the database. But i check to make sure the name is not entered twice. Now when the name is already in the db, then it should insert else put out a message saying its already in the db

My code works fine except that  when its not in the db, its inserts but still puts out the message that says "Name is already in use" Not sure if am not seeing something. But thought i did bring it to the forum. Here is my code...Pretty simple

Protected Sub btnAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdd.Click

        Dim objConnection As SqlConnection
        Dim objCommand As SqlCommand
        Dim strSQLQuery1 As String


        ' If there's nothing to Add for then don't search
        ' o/w build our SQL Query and execute it.
        If String.IsNullOrEmpty(txtAdd.Text) Or Leadbank.SelectedValue = "000" Then


Toolbox: Issue and Defect Tracking, Automate IT Tasks, and More


In this issue, issue and defect tracking, automating IT tasks, and more.

Scott Mitchell

MSDN Magazine December 2006

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend