Click here to Skip to main content
15,897,718 members
Home / Discussions / C#
   

C#

 
GeneralRe: Textbox Control function..... Pin
musefan1-Jul-09 2:43
musefan1-Jul-09 2:43 
GeneralRe: Textbox Control function..... Pin
Hum Dum1-Jul-09 2:56
Hum Dum1-Jul-09 2:56 
GeneralRe: Textbox Control function..... Pin
dojohansen1-Jul-09 6:27
dojohansen1-Jul-09 6:27 
AnswerRe: Textbox Control function..... Pin
OriginalGriff1-Jul-09 2:16
mveOriginalGriff1-Jul-09 2:16 
GeneralRe: Textbox Control function..... Pin
Hum Dum1-Jul-09 2:46
Hum Dum1-Jul-09 2:46 
GeneralRe: Textbox Control function..... Pin
OriginalGriff1-Jul-09 3:46
mveOriginalGriff1-Jul-09 3:46 
AnswerRe: Textbox Control function..... Pin
K03061-Jul-09 2:19
K03061-Jul-09 2:19 
GeneralRe: Textbox Control function..... Pin
Luc Pattyn1-Jul-09 2:35
sitebuilderLuc Pattyn1-Jul-09 2:35 
GeneralRe: Textbox Control function..... Pin
Hum Dum1-Jul-09 2:52
Hum Dum1-Jul-09 2:52 
GeneralRe: Textbox Control function..... Pin
musefan1-Jul-09 3:06
musefan1-Jul-09 3:06 
GeneralRe: Textbox Control function..... Pin
Luc Pattyn1-Jul-09 3:38
sitebuilderLuc Pattyn1-Jul-09 3:38 
QuestionWinApp access variables in WebService...? Pin
Mtyb1-Jul-09 0:46
Mtyb1-Jul-09 0:46 
AnswerRe: WinApp access variables in WebService...? Pin
SeMartens1-Jul-09 1:28
SeMartens1-Jul-09 1:28 
AnswerRe: WinApp access variables in WebService...? Pin
dojohansen1-Jul-09 1:31
dojohansen1-Jul-09 1:31 
GeneralRe: WinApp access variables in WebService...? Pin
Mtyb1-Jul-09 2:10
Mtyb1-Jul-09 2:10 
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 

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.