Click here to Skip to main content
16,013,642 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to Convert Image data into Data formet through OCR scaning technology Pin
Wamuti19-Feb-10 21:32
Wamuti19-Feb-10 21:32 
QuestionFormatting text in text boxes Pin
ASPnoob19-Feb-10 16:59
ASPnoob19-Feb-10 16:59 
AnswerRe: Formatting text in text boxes Pin
tonyonlinux19-Feb-10 17:14
tonyonlinux19-Feb-10 17:14 
GeneralRe: Formatting text in text boxes Pin
AspDotNetDev19-Feb-10 17:19
protectorAspDotNetDev19-Feb-10 17:19 
AnswerRe: Formatting text in text boxes Pin
AspDotNetDev19-Feb-10 17:16
protectorAspDotNetDev19-Feb-10 17:16 
Questionhow would i do a groupby in this instance ?[modified] Pin
tonyonlinux19-Feb-10 16:54
tonyonlinux19-Feb-10 16:54 
AnswerRe: how would i do a groupby in this instance Pin
Dan Mos19-Feb-10 17:21
Dan Mos19-Feb-10 17:21 
GeneralRe: how would i do a groupby in this instance Pin
tonyonlinux19-Feb-10 18:05
tonyonlinux19-Feb-10 18:05 
I realize the first and second queries work that's not the issue.
The issue is how do i do the first one using the data from the second one?
Basically i want to use the query's results and only return the distinct ones or the firstordefault()

so basically what I'm trying to do is
 public class FillGrid
       {
           public int AuthorID {get; set;}
           public int BookNumber {get;set;}
           public int BookID { get; set;}
           public int Count {get; set;}
           public string Title { get; set; }
           public string Author { get; set; }
           public decimal Price { get; set; }
           public string Keywords { get; set; }
       
                                    public List<FillGrid>FillTheGrid(string treeviewText,string treeviewTag)
                                    {
                                        List <FillGrid>results = new List<FillGrid>();
........


List<FillGrid> distinctresults = query.GroupBy(i => i.BookID).Select(i => i.FirstOrDefault());
return distinctresults;
</pre>

but i keep getting the following error.
<pre>
Error	1	Cannot implicitly convert type 'System.Collections.Generic.IEnumerable<yetagain.DataOperations.FillGrid>' to 'System.Collections.Generic.List<yetagain.DataOperations.FillGrid>'. An explicit conversion exists (are you missing a cast?)	

GeneralRe: how would i do a groupby in this instance Pin
Dan Mos19-Feb-10 18:41
Dan Mos19-Feb-10 18:41 
GeneralRe: how would i do a groupby in this instance Pin
tonyonlinux19-Feb-10 18:55
tonyonlinux19-Feb-10 18:55 
QuestionMoving form without showing contents Pin
desto-tj19-Feb-10 14:55
desto-tj19-Feb-10 14:55 
GeneralREPOST Pin
AspDotNetDev19-Feb-10 15:07
protectorAspDotNetDev19-Feb-10 15:07 
AnswerRe: Moving form without showing contents Pin
Som Shekhar19-Feb-10 18:57
Som Shekhar19-Feb-10 18:57 
GeneralRe: Moving form without showing contents Pin
desto-tj19-Feb-10 20:38
desto-tj19-Feb-10 20:38 
GeneralRe: Moving form without showing contents Pin
Som Shekhar19-Feb-10 20:59
Som Shekhar19-Feb-10 20:59 
GeneralRe: Moving form without showing contents Pin
desto-tj19-Feb-10 21:08
desto-tj19-Feb-10 21:08 
GeneralRe: Moving form without showing contents Pin
Dan Mos20-Feb-10 21:16
Dan Mos20-Feb-10 21:16 
QuestionAbout property grid. Pin
gaferrero19-Feb-10 13:57
gaferrero19-Feb-10 13:57 
AnswerRe: About property grid. Pin
AspDotNetDev19-Feb-10 14:13
protectorAspDotNetDev19-Feb-10 14:13 
Questioninternet Pin
sanforjackass19-Feb-10 11:58
sanforjackass19-Feb-10 11:58 
AnswerRe: internet Pin
AspDotNetDev19-Feb-10 12:28
protectorAspDotNetDev19-Feb-10 12:28 
GeneralRe: internet Pin
sanforjackass19-Feb-10 12:40
sanforjackass19-Feb-10 12:40 
GeneralRe: internet Pin
AspDotNetDev19-Feb-10 12:46
protectorAspDotNetDev19-Feb-10 12:46 
GeneralRe: internet Pin
harold aptroot19-Feb-10 12:49
harold aptroot19-Feb-10 12:49 
GeneralRe: internet Pin
AspDotNetDev19-Feb-10 12:56
protectorAspDotNetDev19-Feb-10 12:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.