Click here to Skip to main content
15,896,444 members
Home / Discussions / C#
   

C#

 
QuestionTimezone parsing issue - "Date" is wrong (but offset in terms of hours/minutes correct) Pin
devvvy8-Dec-11 17:06
devvvy8-Dec-11 17:06 
AnswerRe: Timezone parsing issue - "Date" is wrong (but offset in terms of hours/minutes correct) Pin
Richard MacCutchan8-Dec-11 22:28
mveRichard MacCutchan8-Dec-11 22:28 
AnswerRe: Timezone parsing issue - "Date" is wrong (but offset in terms of hours/minutes correct) Pin
jschell9-Dec-11 11:23
jschell9-Dec-11 11:23 
QuestionList<T>.Sort(IComparer) throws ArgumentException Pin
Firo Atrum Ventus8-Dec-11 15:42
Firo Atrum Ventus8-Dec-11 15:42 
AnswerRe: List.Sort(IComparer) throws ArgumentException Pin
PIEBALDconsult8-Dec-11 16:06
mvePIEBALDconsult8-Dec-11 16:06 
GeneralRe: List.Sort(IComparer) throws ArgumentException Pin
Firo Atrum Ventus8-Dec-11 16:19
Firo Atrum Ventus8-Dec-11 16:19 
AnswerRe: List.Sort(IComparer) throws ArgumentException Pin
Luc Pattyn8-Dec-11 22:02
sitebuilderLuc Pattyn8-Dec-11 22:02 
GeneralRe: List.Sort(IComparer) throws ArgumentException Pin
Firo Atrum Ventus9-Dec-11 4:58
Firo Atrum Ventus9-Dec-11 4:58 
AnswerRe: List.Sort(IComparer) throws ArgumentException Pin
BobJanova8-Dec-11 22:37
BobJanova8-Dec-11 22:37 
GeneralRe: List.Sort(IComparer) throws ArgumentException Pin
Firo Atrum Ventus9-Dec-11 5:07
Firo Atrum Ventus9-Dec-11 5:07 
QuestionPorting VS 2005 => 2010: "Could not load file or assembly..." [SOLVED] Pin
Alan Balkany8-Dec-11 12:14
Alan Balkany8-Dec-11 12:14 
AnswerRe: Porting VS 2005 => 2010: "Could not load file or assembly..." Pin
Richard MacCutchan8-Dec-11 22:22
mveRichard MacCutchan8-Dec-11 22:22 
GeneralRe: Porting VS 2005 => 2010: "Could not load file or assembly..." Pin
Alan Balkany9-Dec-11 4:55
Alan Balkany9-Dec-11 4:55 
GeneralRe: Porting VS 2005 => 2010: "Could not load file or assembly..." Pin
Richard MacCutchan9-Dec-11 6:20
mveRichard MacCutchan9-Dec-11 6:20 
GeneralRe: Porting VS 2005 => 2010: "Could not load file or assembly..." Pin
Alan Balkany9-Dec-11 7:12
Alan Balkany9-Dec-11 7:12 
AnswerLink to solution Pin
Alan Balkany12-Dec-11 5:25
Alan Balkany12-Dec-11 5:25 
Questioncontrol "asp:listview" bind to web service without database with "if statement" c# Pin
aspkiddy8-Dec-11 10:26
aspkiddy8-Dec-11 10:26 
Hi,

I have a "asp:listview" bind to web service without database.
I don't use "ObjectDataSource" and in my contol "ListView" : I haven't atribut "DataKeyNames" and "DataSourceID"

I bind to it in code-behind Smile | :)
C#
protected void Page_Load(object sender, System.EventArgs e)
	{
	//...
	Act ActWEBService = WebServiceFactory.CreateInstance().CreateActWebService();
	ActStruct[] myActs = ActWEBService.GetActs(nameIdItemDataBound);
	
	mSeenFromPageState.Acts = new ActStruct[myActs.Length];
	
	foreach(ActStruct act in myActs)
		{
		ListViewActs.DataSource = ActWEBService.GetActs(nameIdItemDataBound);
		ListViewActs.DataBind();
		}
	//....

protected void OurListView_ItemDataBound(object sender, ListViewItemEventArgs e)
	{
	if (e.Item.ItemType == ListViewItemType.DataItem)
		{
			System.Data.DataRowView rowView = e.Item.DataItem as System.Data.DataRowView;
			ListViewDataItem dataItem = (ListViewDataItem)e.Item;
			
			Act ActWEBService = WebServiceFactory.CreateInstance().CreateActWebService();
			ActStruct[] myActs = ActWEBService.GetActs(nameIdItemDataBound);
			
	//....

So here is my list on screen :
nameIdItemDataBound....thatOneId............name
11BB...................................1..............................john
13AA...................................3..............................alice
15AAA..................................2..............................roxy
16TXQ..................................1..............................jean

But I want items that have [3] in their [thatOneId], does not appear in my list!
"if statement" does not use with Listview so I must put a filter...
like this : Where(a => a.name != value);Confused | :confused:

C#
oreach(ActStruct act in myActs)
		{
		ListViewActs.DataSource = ActWEBService.GetActs(nameIdItemDataBound).Where(d => d.thatOneId != 3);
		ListViewActs.DataBind();  // line Ligne : 82 !!!!!!!!!!!! here I have a message error
		}


I have a message error :
'ListView with id 'ListViewActs' must have a data source that either implements ICollection or can perform data source paging if AllowPaging is true.' (line Ligne : 82 )

Could you help me for this ? Cry | :((
Questionproblem with list predicate (?) or list item not being found Pin
CCodeNewbie8-Dec-11 9:33
CCodeNewbie8-Dec-11 9:33 
AnswerRe: problem with list predicate (?) or list item not being found Pin
emardini8-Dec-11 15:00
emardini8-Dec-11 15:00 
GeneralRe: problem with list predicate (?) or list item not being found Pin
CCodeNewbie8-Dec-11 21:38
CCodeNewbie8-Dec-11 21:38 
QuestionC# dataset error Pin
classy_dog8-Dec-11 9:05
classy_dog8-Dec-11 9:05 
QuestionLinq - Remove Object From Collection Pin
Kevin Marois8-Dec-11 7:19
professionalKevin Marois8-Dec-11 7:19 
AnswerRe: Linq - Remove Object From Collection Pin
fjdiewornncalwe8-Dec-11 7:37
professionalfjdiewornncalwe8-Dec-11 7:37 
AnswerRe: Linq - Remove Object From Collection Pin
Dan Mos8-Dec-11 7:46
Dan Mos8-Dec-11 7:46 
GeneralRe: Linq - Remove Object From Collection Pin
Kevin Marois8-Dec-11 7:49
professionalKevin Marois8-Dec-11 7:49 

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.