Click here to Skip to main content
15,911,503 members
Home / Discussions / C#
   

C#

 
GeneralRe: System.OutOfMemory Exception Pin
Christian Graus4-May-08 19:09
protectorChristian Graus4-May-08 19:09 
GeneralRe: System.OutOfMemory Exception Pin
Luc Pattyn4-May-08 23:25
sitebuilderLuc Pattyn4-May-08 23:25 
QuestionHow to connect and disconnect internet ,via an internet gatewaye connection using C# Pin
pejman4-May-08 12:55
pejman4-May-08 12:55 
QuestionWindows Context Menu Problem Pin
Arthur Hylton4-May-08 12:07
Arthur Hylton4-May-08 12:07 
AnswerRe: Windows Context Menu Problem Pin
Christian Graus4-May-08 12:21
protectorChristian Graus4-May-08 12:21 
AnswerRe: Windows Context Menu Problem Pin
Luc Pattyn4-May-08 12:27
sitebuilderLuc Pattyn4-May-08 12:27 
Question[Message Deleted] [modified] Pin
Lord President4-May-08 10:06
Lord President4-May-08 10:06 
AnswerRe: Open and Save File dialogs Pin
Gareth H4-May-08 10:27
Gareth H4-May-08 10:27 
GeneralRe: Open and Save File dialogs Pin
Lord President4-May-08 10:33
Lord President4-May-08 10:33 
GeneralRe: Open and Save File dialogs Pin
Gareth H4-May-08 10:35
Gareth H4-May-08 10:35 
GeneralRe: Open and Save File dialogs [modified] Pin
Lord President4-May-08 10:38
Lord President4-May-08 10:38 
GeneralRe: [Message Deleted] Pin
Guffa4-May-08 21:57
Guffa4-May-08 21:57 
QuestionEmedded Scripting Languages Pin
martin_hughes4-May-08 8:19
martin_hughes4-May-08 8:19 
AnswerRe: Emedded Scripting Languages Pin
Uwe Keim4-May-08 8:35
sitebuilderUwe Keim4-May-08 8:35 
GeneralRe: Emedded Scripting Languages Pin
martin_hughes4-May-08 8:43
martin_hughes4-May-08 8:43 
Questionwork with a large amount of precalculated data Pin
chris9974-May-08 7:34
chris9974-May-08 7:34 
AnswerRe: work with a large amount of precalculated data Pin
Charith Jayasundara4-May-08 7:58
Charith Jayasundara4-May-08 7:58 
GeneralRe: work with a large amount of precalculated data Pin
chris9974-May-08 11:01
chris9974-May-08 11:01 
QuestionCasting an anonymous type Pin
belzer4-May-08 6:56
belzer4-May-08 6:56 
Hello Forum,

I am creating a GridView with one column “Item Description”, the column is a “DataGridViewButtonColumn” the idea is the user can click to select an item, how can I get the item id?

When you see the code below you will realize that the issue is how to cast an anonymous type, Please help…

Thanks you


lnqDataDataContext dc = new lnqDataDataContext();

var query = (from p in dc.Products
select new
{
Id = p.ID,
Description = string.Concat(p.Price.ToString(), " - ", p.Description)
});

grdItemsGrid.DataSource = query;

DataGridViewButtonColumn items = new DataGridViewButtonColumn();

items.DataPropertyName = "Description";
items.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

grdItemsGrid.Columns.Add(items);

grdItemsGrid.CellContentClick += (o, e) =>
{

};
AnswerRe: Casting an anonymous type Pin
Guffa4-May-08 8:09
Guffa4-May-08 8:09 
GeneralRe: Casting an anonymous type Pin
belzer4-May-08 10:32
belzer4-May-08 10:32 
GeneralRe: Casting an anonymous type Pin
Roger Alsing4-May-08 18:47
Roger Alsing4-May-08 18:47 
GeneralRe: Casting an anonymous type Pin
Guffa4-May-08 21:38
Guffa4-May-08 21:38 
GeneralRe: Casting an anonymous type Pin
Roger Alsing5-May-08 6:21
Roger Alsing5-May-08 6:21 
QuestionIssue with Setup and Deployment Project Pin
paas4-May-08 6:05
paas4-May-08 6:05 

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.