Click here to Skip to main content
15,887,683 members
Home / Discussions / C#
   

C#

 
GeneralRe: WinApp access variables in WebService...? Pin
dojohansen1-Jul-09 4:43
dojohansen1-Jul-09 4:43 
GeneralRe: WinApp access variables in WebService...? Pin
J4amieC1-Jul-09 2:45
J4amieC1-Jul-09 2:45 
GeneralRe: WinApp access variables in WebService...? Pin
dojohansen1-Jul-09 4:48
dojohansen1-Jul-09 4:48 
GeneralRe: WinApp access variables in WebService...? Pin
J4amieC1-Jul-09 7:06
J4amieC1-Jul-09 7:06 
GeneralRe: WinApp access variables in WebService...? Pin
dojohansen1-Jul-09 21:26
dojohansen1-Jul-09 21:26 
QuestionDataView error: Pin
padmanabhan N1-Jul-09 0:29
padmanabhan N1-Jul-09 0:29 
AnswerRe: DataView error: Pin
Henry Minute1-Jul-09 1:38
Henry Minute1-Jul-09 1:38 
AnswerRe: DataView error: Pin
Niladri_Biswas1-Jul-09 3:12
Niladri_Biswas1-Jul-09 3:12 
I fully agree with Henry Minute.

I am providing you three scenarios.

Say I have a datatable like this

public DataTable MtDataTable()
{
  DataTable dt = new DataTable();
  dt.Columns.Add("First Name");
  dt.Columns.Add("Last Name");
  dt.Rows.Add("Niladri", "Biswas");
  dt.Rows.Add("Deepak", "Goyal");
  dt.Rows.Add("Padmanabhan", "N");
  dt.Rows.Add("Code", "Project");
  dt.Rows.Add("Niladri", "Biswas");
  return dt;

}


In the Form's Load event, I wrote the following code

Scenario 1:

private void Form1_Load(object sender, EventArgs e)
 {
    DataTable dtTemptable = MtDataTable();
          
    DataView dv = new DataView(dtTemptable, "[FirstName]", null, DataViewRowState.CurrentRows);           
            
}


I got the error message "Cannot find column [FirstName]"

Scenario 2:
private void Form1_Load(object sender, EventArgs e)
{
  DataTable dtTemptable = MtDataTable();
            
  DataView dv = new DataView(dtTemptable, "[First Name]", null, DataViewRowState.CurrentRows);
           
            
}


I got the error message "Filter expression '[First Name]' does not evaluate to a Boolean term." But notice I thing, I did not receive the Column not find message. This time error occurs because it expects a boolean expression which I did not provided


Scenario 3:

private void Form1_Load(object sender, EventArgs e)
{
   DataTable dtTemptable = MtDataTable();            
   DataView dataView = new DataView(dtTemptable);
    dataView.RowFilter = "[First Name] IN ('Niladri')";
   foreach (DataRowView drv in dataView)            
   MessageBox.Show(drv["First Name"].ToString());            
}


This gives me the output as "Niladri" 2 times.

Hope this helps.
Smile | :)

Niladri Biswas

QuestionHow to remove CLI Header or how to disable dissasembling of my app Pin
Matjaz-xyz30-Jun-09 23:54
Matjaz-xyz30-Jun-09 23:54 
AnswerRe: How to remove CLI Header or how to disable dissasembling of my app Pin
OriginalGriff1-Jul-09 1:07
mveOriginalGriff1-Jul-09 1:07 
GeneralRe: How to remove CLI Header or how to disable dissasembling of my app Pin
dojohansen1-Jul-09 1:37
dojohansen1-Jul-09 1:37 
GeneralRe: How to remove CLI Header or how to disable dissasembling of my app Pin
OriginalGriff1-Jul-09 1:45
mveOriginalGriff1-Jul-09 1:45 
GeneralRe: How to remove CLI Header or how to disable dissasembling of my app Pin
Matjaz-xyz1-Jul-09 1:49
Matjaz-xyz1-Jul-09 1:49 
QuestionQuestion of reason for rule "return value void for event handling delegates" Pin
Chamundi30-Jun-09 23:38
Chamundi30-Jun-09 23:38 
AnswerRe: Question of reason for rule "return value void for event handling delegates" Pin
kstls30-Jun-09 23:49
kstls30-Jun-09 23:49 
AnswerRe: Question of reason for rule "return value void for event handling delegates" Pin
Luc Pattyn30-Jun-09 23:59
sitebuilderLuc Pattyn30-Jun-09 23:59 
GeneralRe: Question of reason for rule "return value void for event handling delegates" Pin
Chamundi1-Jul-09 0:08
Chamundi1-Jul-09 0:08 
GeneralRe: Question of reason for rule "return value void for event handling delegates" Pin
Luc Pattyn1-Jul-09 0:30
sitebuilderLuc Pattyn1-Jul-09 0:30 
GeneralRe: Question of reason for rule "return value void for event handling delegates" Pin
Chamundi1-Jul-09 5:09
Chamundi1-Jul-09 5:09 
QuestionSmartNavigation Pin
minniemooo30-Jun-09 22:59
minniemooo30-Jun-09 22:59 
AnswerRe: SmartNavigation Pin
dan!sh 30-Jun-09 23:04
professional dan!sh 30-Jun-09 23:04 
QuestionAForge.net writer.Open problem Pin
tvbarnard30-Jun-09 22:47
tvbarnard30-Jun-09 22:47 
QuestionRe: AForge.net writer.Open problem Pin
Eddy Vluggen30-Jun-09 23:18
professionalEddy Vluggen30-Jun-09 23:18 
Questionhow to change the File summary information Pin
Joe Rozario30-Jun-09 22:36
Joe Rozario30-Jun-09 22:36 
AnswerRe: how to change the File summary information Pin
dan!sh 30-Jun-09 23:01
professional dan!sh 30-Jun-09 23:01 

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.