Click here to Skip to main content
15,912,507 members
Home / Discussions / C#
   

C#

 
GeneralRe: equivalent of exit() function in c# Pin
rj_21_200326-Sep-06 23:00
rj_21_200326-Sep-06 23:00 
AnswerRe: equivalent of exit() function in c# Pin
Stefan Troschuetz25-Sep-06 22:42
Stefan Troschuetz25-Sep-06 22:42 
GeneralRe: equivalent of exit() function in c# Pin
saqib8225-Sep-06 23:10
saqib8225-Sep-06 23:10 
GeneralRe: equivalent of exit() function in c# Pin
Rob Philpott26-Sep-06 0:20
Rob Philpott26-Sep-06 0:20 
GeneralRe: equivalent of exit() function in c# Pin
saqib8226-Sep-06 8:20
saqib8226-Sep-06 8:20 
GeneralRe: equivalent of exit() function in c# Pin
Rob Philpott26-Sep-06 10:25
Rob Philpott26-Sep-06 10:25 
Question"spying" on a program's network traffic Pin
likephatec25-Sep-06 22:10
likephatec25-Sep-06 22:10 
Questiongridview select error Pin
Brendan Vogt25-Sep-06 21:33
Brendan Vogt25-Sep-06 21:33 
Hi all!!

I have the following gridview error, and I am not sure how to fix it.

I have the following object datasource:

<asp:ObjectDataSource id="odsOrders" TypeName="MyName.BusinessLogicLayer.Order" runat="server">
</asp:ObjectDataSource>

And here is my gridview (part of it):

<asp:GridView id="gdvWineries" DataSourceID="odsOrders" DataKeyNames="ID" AutoGenerateColumns="False"
AllowPaging="true" PageSize="10" Width="100%" runat="server">

<Columns>

All my coloumns here.

</Columns>

</asp:GridView>

I have the select statement in my Page_Load event handler because the select statement can use onr of 2 methods to populate the gridview, depending on the roles of the user.

if (!Page.IsPostBack)
{
if (Role.IsInRoles("SystemAdmin"))
{
odsOrders.SelectMethod = "GetAllOrders";
}
else if (Role.IsInRoles("WineryAdmin"))
{
odsWineries.SelectParameters.Add(new Parameter("strMemberUsername", TypeCode.String,
User.Identity.Name));
odsWineries.SelectMethod = "GetWineryByMemberID";
}
}

Then at the bottom of the gridview it displays 1 2 3 4.. for the page numbers, but when I click on one of these numbers I get the following error:

The Select operation is not supported by ObjectDataSource 'odsOrders' unless the SelectMethod is specified.

Can someone please help me why I get this error and how to fix it?

Regards,
ma se
QuestionRecord sound Pin
Rahul.RK25-Sep-06 21:21
Rahul.RK25-Sep-06 21:21 
AnswerRe: Record sound Pin
Nader Elshehabi25-Sep-06 22:43
Nader Elshehabi25-Sep-06 22:43 
Questionhi,how do i count total number of child node in xml Pin
premkamalg25-Sep-06 21:20
premkamalg25-Sep-06 21:20 
AnswerRe: hi,how do i count total number of child node in xml Pin
Alper Camel25-Sep-06 21:30
Alper Camel25-Sep-06 21:30 
Generalhelp me Pin
premkamalg25-Sep-06 23:01
premkamalg25-Sep-06 23:01 
GeneralRe: help me Pin
Alper Camel25-Sep-06 23:06
Alper Camel25-Sep-06 23:06 
QuestionHow to disable hardware devices in computer Pin
Gnanapazham25-Sep-06 21:07
Gnanapazham25-Sep-06 21:07 
AnswerRe: How to disable hardware devices in computer Pin
Niiiissssshhhhhuuuuu25-Sep-06 21:46
Niiiissssshhhhhuuuuu25-Sep-06 21:46 
GeneralRe: How to disable hardware devices in computer Pin
delimavi25-Sep-06 22:39
delimavi25-Sep-06 22:39 
AnswerRe: How to disable hardware devices in computer Pin
Niiiissssshhhhhuuuuu25-Sep-06 23:39
Niiiissssshhhhhuuuuu25-Sep-06 23:39 
AnswerRe: How to disable hardware devices in computer Pin
Niiiissssshhhhhuuuuu25-Sep-06 23:40
Niiiissssshhhhhuuuuu25-Sep-06 23:40 
QuestionRetrieve windows users list Pin
Alper Camel25-Sep-06 21:04
Alper Camel25-Sep-06 21:04 
AnswerRe: Retrieve windows users list Pin
Niiiissssshhhhhuuuuu25-Sep-06 21:35
Niiiissssshhhhhuuuuu25-Sep-06 21:35 
GeneralRe: Retrieve windows users list Pin
Alper Camel25-Sep-06 21:42
Alper Camel25-Sep-06 21:42 
QuestionException occured in deserialization of memory stream(Its Urgent) Pin
Khushi8325-Sep-06 21:02
Khushi8325-Sep-06 21:02 
Questionhelp me plz Pin
sunita ramesh25-Sep-06 20:51
sunita ramesh25-Sep-06 20:51 
AnswerRe: help me plz Pin
Niiiissssshhhhhuuuuu25-Sep-06 21:43
Niiiissssshhhhhuuuuu25-Sep-06 21:43 

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.