Count word appearance and show in gridview
Hello all, I am working on a project with multi tables. In one table the user selects one of 13 categories that they are uploading images to. Each category has a sub category. On the main page , I have a grid view for each category that list the subcategories.
Much the way a classified ads would work, I want to be able to show the number of each image in the subcategories as in below.
Name
number
of images
Subcategory
3
Subcategory
2
Subcategory
4
Subcategory
23
Subcategory
1
Subcategory
3
Subcategory
332
Subcategory
1
Subcategory
3
Subcategory
2
Subcategory
3
I am using the count function in stored procedure that counts the number of images in subcategory entered
select subcategory, count(*) as mycount from userinput group as subcategory.
which gives me the count of each item under the subcategory listed by the user.
I need to be able to take this count and show it next the item name in the 13 tables that list the subcategories.
So I am counting the entries from one table (datasource) and showing the number of entries in 13 different tables (GridViews) based on the name of the subcategory.
this has to be done when the page loads so the usre will see the correct amount of images in the 13 grid views.
Any ideas on how to do this??
Thanks in advance.
Hi Jasonpauthement,
If I understand correctly, you want to display the categories and corresponding subcategories in the main table, then display the each subcategory and the corresponding count images in another 13 tables. If in this scenario, we can refer to the steps below
to display another 13 tables:
Drag a table with subcategory and the corresponding count images values to the design surface.
Then use a list with the same dataset to contain the table.
In Row Groups, Right-click the Details group to add a group grouped on subcategory.
Then each subcategory and its corresponding count images values would be displayed in the list. If there are any misunderstanding, please elaborate the issue for further investigation.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support
Similar Messages
-
Counting words, lines and char
i want a program which counts the number of lines,words and characters in a file.....................
please help meOne thread is enough.Continue there, please.
[http://forums.sun.com/thread.jspa?threadID=5367866]
I'm locking this one. -
Get Artists and show Artist Name as string
Hi
I'm using VS2013, EF6, WPF
I have tables Media, MediaArtists, Artists
MediaArtist is a bridge table that use MediaId and ArtistId. it's mean that every Media has more Artists.
dbContext db = new dbContext();
mediumDataGrid.ItemsSource = db.Media.Select(m => new{
m.MediaId,
m.Title,
m.LastPlayedDate,
????m.MediaArtists.Select(a => Artist)????
}).ToList();
I want to get the Artists "Name" and show in gridview as Artist1, Artist2, Artist3
can you please let me know how do that?
thanksHello Zorig,
It seems that you are trying to perform a group by comma list in linq, if you data is not larger, you could use the LINQ2Object as below:
var result = db.X.ToList().Select(x => new { XID = x.XID, XName = x.XName, YNames = string.Join(",", x.Y.Select(y => y.XName)) }).ToList();
If data is large, you could check the workaround from Emran Hussain:
http://stackoverflow.com/a/25676673
Or to use store produce for a complex query instead.
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
After I upgrade my MacProBook a box appeared showing the word "password" and I'm stuck here
Can you Force Quit?
What did you upgrade? -
Help! Cannot connect to iTunes Store. Only thing shows up is white screen and iTunes Store words appear.
Hi Davin12,
Here is an article with some troubleshooting ideas for when you are not able to connect to the iTunes Store:
Can't connect to the iTunes Store
http://support.apple.com/kb/ts1368
Take care,
- Ari -
What happened to page count, word count and the toolbar at the top?
Is there any way to edit the toolbar so that when I want to switch fonts I don't have to keep opening the toolbar on the side? (Is there anyway I can get the toolbar from the previous version back?)
Also, is there a way for the page count and word count to show up and stay there for future documents? I had the word count appear and tried to save that as a template but when trying to open up new documents I have to go back and make it so the word count shows up again.What Peter said.
Is there any way to edit the toolbar so that when I want to switch fonts I don't have to keep opening the toolbar on the side?
Yes. Menu > View > Customize Toolbar... drag/drop the Fonts icon adjacent to the Comments icon on the Toolbar. The Fonts icon now becomes a toggle to show/hide the Fonts toolbox, which you could also produce with a command+T.
(Is there anyway I can get the toolbar from the previous version back?
No.
Also, is there a way for the page count and word count to show up and stay there for future documents
No. Available via Menu > View > Show Word Count. This produces a floating box at the bottom of your document. When you roll over it with your mouse, you have a selection of words, characters, and paragraphs. The word count excludes spaces. -
Iweb images disappear and show only 2 words: Comments Widget
would anyone please help
I built a website and publish the web successfully. However, after i changed some album and images, all images disappeared and showed only 2 words "Comments Widget" Anyone know how to fix this problem.
Thank you!the website I pulished seems working well in safari and firefox
Are you now saying that the first problem is no longer there? All the pages I visited appeared to be loading fine. As far as getting your site to work the IE see How to get your iWeb Site to load in Internet Explorer. IE is the acknowledged worst browser out there. This site may help you. -
Counting times a word appears in document
I am trying to read from a file and count how many times a word appears in that document.
For example if i had a list of names
Daniel Fowler
Joe Mahogony
Daniel Peterson
Chris Sim
How would you count the amount of people named Daniel and display it?
I am currently using findInLine"Daniel" but when ran no luck.
Any ideas?danieltnbaker wrote:
deepak,
the bufferedreader reads content from the file yes?
but what method would i use to count the amount of a word in that file?
finInLine finds the word but cannot turn that into an integer. any other methods?first of all the code I had posted in my previous post should work and it uses the Scanner to read the file.
If you want to use the FileReader approach the within the code that actually reads the file line by line, you can use the String.indexOf method (as suggested by nclow) to check if a particular word is present in that line of the file. IF it is there you increment a counter.
int counter = 0;
// Read through the entire file
String currentLineFromFile = bufferedReader.readLine(); // throws IOException
while(currentLineFromFile != null)
// Add a carriage return (line break) to preserve the file formatting.
textFromFile.append(carriageReturn + currentLineFromFile);
currentLineFromFile = bufferedReader.readLine(); // throws IOException
if (currentLineFromFile.indexOf("Daniel") != -1)
counter++
System.out.println("No of occurances- " + counter);
}hope this helps
[email protected]
Edited by: deepak_1your.com on 16-Apr-2008 14:18 -
Hello
I forget your password to my iPad mini and show me the word
(Been suspended iPad) Contact itunes
please help me ):Hello, 3zeeo90.
Thank you for visiting Apple Support Communities.
If your account is disabled, see the steps in the article below.
Apple ID: 'This Apple ID has been disabled for security reasons' alert appears
http://support.apple.com/kb/ts2446
If you have tried the steps above and this issue persists, see the article below.
Apple ID: Contacting Apple for help with Apple ID account security
http://support.apple.com/kb/HT5699
If your iOS device is disabled, see the steps in the article below.
iOS: Forgotten passcode or device disabled after entering wrong passcode
http://support.apple.com/kb/ht1212
Cheers,
Jason H. -
Whenever I try to open Microsoft Word it doesn't open and shows me an error report!
Whenever I try to open Microsoft Word it doesn't open and shows me an error report! I don't know what to do! Help!!!!
This is the extra info that comes along with the error report:
Microsoft Error Reporting log version: 2.0
Error Signature:
Exception: EXC_BAD_ACCESS
Date/Time: 2013-08-30 16:41:14 -0400
Application Name: Microsoft Word
Application Bundle ID: com.microsoft.Word
Application Signature: MSWD
Application Version: 14.1.0.110310
Crashed Module Name: MBURibbon
Crashed Module Version: 14.3.4.130416
Crashed Module Offset: 0x000072f0
Blame Module Name: MBURibbon
Blame Module Version: 14.3.4.130416
Blame Module Offset: 0x000072f0
Application LCID: 1033
Extra app info: Reg=en Loc=0x0409
Crashed thread: 0
What should I do??????It might be a good idea to also ask here:
Office for Mac forums -
I have an older iPod that no longer shows up in iTunes or appears to be charging. When I press the Menu and Select buttons, the Apple logo appears and then an icon of a battery with an exclamation point. Is it dead for good?
If it is otherwise working, you can change the battery. If you want to do it yourself, you can buy the part on eBay and other online sources. Just make sure you know the type of iPod you have so that you get the right part.
http://support.apple.com/kb/HT1353
There are online guides, including the ones on this web site
http://www.ifixit.com/Device/iPod
(Note: Most replacement batteries come with plastic/nylon tools seen in the guides.)
You can also have a repair business do the work.
If it is just the battery, if you do a Reset (using the Menu and Select buttons) while it is connect to your computer, I think it should still be recognized by iTunes. -
I have a new computer with Windows 7 professional, Office 2007, Adobe XI. I have just created a word document and tried save it as a PDF but the PDF option doesn't appear in the drop down menu. Any ideas please? Thank you.
What is "Adobe XI" - Reader, or Acrobat?
But either way, 'Save as Adobe PDF' is a Word function, independent of what Adobe software you have installed. -
When I create a text message from my contact on my iphone 5, the contacts mobile number appears and not there name. But when they respond to my text, is shows up as a new text message with there name. How do I fix this?
Double click the home button and swipe up the messages app to stop it, then open the app again. This pretty much completely stops the process and freshly opens it again, resolving problems at times. I have had this happen before as well on my iPad, I get a banner, check messages, and nothing new is there.
If that doesn't work, close the app like suggested above, but then restart the phone by holding down the home and lock button for 10-15 seconds until the apple logo appears. -
Hi I replaced my hard drive on macbook and I want to install mac osx10.5 with the CD that came with the macbook. When I run the CD after a while I get the page showing language options for 2 second then a gray screen appears and nothing happens. I partitioned my hard drive and I tried installing Microsoft windows and that worked just fine. But I do not understand why it wont install mac os x 10.5????? PLEASE HELP ME. Thanks Hamid
Try a new post in the 10.5 Installation forum.
DALE -
I have a word document that I have put hyperlinks in and turned into a pdf. When I email and receiver opens in iPad the document is blank. When I do a file save as pdf the document appears and the hyperlinks work but the document has much of the content turned into symbols. What is going wrong?
You select the printer properties and set the appropriate page size (I think there is a place to set it in PDF Maker too, but not sure). In the printer, this is equivalent to putting the proper paper in the printer.
Maybe you are looking for
-
How to get each node in tree?
how to get each node in tree? Message was edited by: NikisinProblem
-
When viewing photo albums photos show in random. How do you get photos to show in sequecne?
-
How to debug a ABAP-PI function module...
Hi, I'm using ABAP-PI port. For that am using customized FM, xxx_OWN_FUNCTION to process the 03 status idoc. Now some problem is there in the FM. I want to debug the FM. It's not stoped at break point. How can I debug the FM? thanks in adv..
-
Well got my portfolio site finished in Flash but neither of the size of the layout (600x800p) and therefore sharpness of the text publishes properly - I was trying to get around embedding the swf in html but I guess I'm gonna have to.. anyone got any
-
Flash Player 11.7.700.202 Plugin Download
Please can someone point me to the msi download for Flash Player 11.7.700.202 Plugin (non-IE). I can find the msi download for Active X (IE), but not for the plugin. Thanks!