Click here to Skip to main content
15,881,455 members
Home / Discussions / C#
   

C#

 
QuestionScrollbarposition of richtextbox Pin
nightrider133-Apr-07 12:26
nightrider133-Apr-07 12:26 
AnswerRe: Scrollbarposition of richtextbox Pin
mav.northwind3-Apr-07 19:09
mav.northwind3-Apr-07 19:09 
QuestionSpeech Recognition problem once using Windows Vista? Pin
Khoramdin3-Apr-07 11:25
Khoramdin3-Apr-07 11:25 
AnswerRe: Speech Recognition problem once using Windows Vista? Pin
Christian Graus3-Apr-07 12:38
protectorChristian Graus3-Apr-07 12:38 
GeneralRe: Speech Recognition problem once using Windows Vista? Pin
Vikram A Punathambekar3-Apr-07 18:13
Vikram A Punathambekar3-Apr-07 18:13 
GeneralRe: Speech Recognition problem once using Windows Vista? Pin
Christian Graus3-Apr-07 19:12
protectorChristian Graus3-Apr-07 19:12 
GeneralRe: Speech Recognition problem once using Windows Vista? Pin
Khoramdin3-Apr-07 20:23
Khoramdin3-Apr-07 20:23 
QuestionHow to get the row number from the DataTable.Row.Find() method? Pin
joaquimc3-Apr-07 9:52
joaquimc3-Apr-07 9:52 
Hello,

I'm new to C# development and i'm stucked with one problem with the DataTable.Row.Find() method:

I have a DataSet called: 'MinhaTabela', and a DataTable called: 'Cpostais'.
This DataTable has 2 columns: 'Cpostal', and 'Localidade'.

I wrote the following code to find a record on the DataTable:

<br />
// Defining the key         <br />
CPostais.PrimaryKey = new DataColumn[] { CPostais.Columns["cpostal"] };<br />
<br />
// Use that key to search the record with the field 'Cpostal' equal to '3000-001'<br />
DataRow RegistoEncontrado = CPostais.Rows.Find("3000-001");<br />
<br />
// If the row was found<br />
if (RegistoEncontrado != null)<br />
{<br />
   // Now my problem:<br />
   // The following line of code dont work, <br />
   // because the DataRow object doesn't have a 'ActualRow' property<br />
   // but, what is the property where i can read that value?<br />
   int ROW_NUMBER = RegistoEncontrado.ActualRow; <br />
      <br />
   // If i found the row number then i would do this...<br />
   Grid2.CurrentCell = Grid2.Rows[ROW_NUMBER].Cells["localidade"];<br />
   Grid2.BeginEdit(false);<br />
<br />
}<br />
<br />
else<br />
<br />
// Row not found<br />
{<br />
   MessageBox.Show("Record not found...");<br />
}<br />


Does anyone knows how to get the row number after i find the respective record?

TIA,
Joaqui,
AnswerRe: How to get the row number from the DataTable.Row.Find() method? Pin
Guffa3-Apr-07 13:27
Guffa3-Apr-07 13:27 
AnswerRe: How to get the row number from the DataTable.Row.Find() method? [modified] Pin
joaquimc5-Apr-07 3:38
joaquimc5-Apr-07 3:38 
QuestionHow can I bind to a database with Dataset Pin
mghiassi3-Apr-07 9:41
mghiassi3-Apr-07 9:41 
AnswerRe: How can I bind to a database with Dataset Pin
kubben3-Apr-07 9:48
kubben3-Apr-07 9:48 
AnswerRe: How can I bind to a database with Dataset Pin
Muammar©3-Apr-07 22:05
Muammar©3-Apr-07 22:05 
GeneralRe: How can I bind to a database with Dataset Pin
mghiassi5-Apr-07 8:30
mghiassi5-Apr-07 8:30 
QuestionStopping threads without Thread.Abort() Pin
JHubSharp3-Apr-07 9:36
JHubSharp3-Apr-07 9:36 
AnswerRe: Stopping threads without Thread.Abort() Pin
Leslie Sanford3-Apr-07 11:30
Leslie Sanford3-Apr-07 11:30 
QuestionTransparent Label Pin
logicon3-Apr-07 9:27
logicon3-Apr-07 9:27 
AnswerRe: Transparent Label Pin
Douglas Troy3-Apr-07 9:29
Douglas Troy3-Apr-07 9:29 
GeneralRe: Transparent Label Pin
logicon3-Apr-07 9:35
logicon3-Apr-07 9:35 
GeneralRe: Transparent Label Pin
Douglas Troy3-Apr-07 9:38
Douglas Troy3-Apr-07 9:38 
GeneralRe: Transparent Label Pin
logicon3-Apr-07 9:40
logicon3-Apr-07 9:40 
GeneralRe: Transparent Label Pin
Douglas Troy3-Apr-07 9:51
Douglas Troy3-Apr-07 9:51 
GeneralRe: Transparent Label Pin
Dave Kreskowiak3-Apr-07 10:03
mveDave Kreskowiak3-Apr-07 10:03 
QuestionSelf restart Pin
Marc Clifton3-Apr-07 9:05
mvaMarc Clifton3-Apr-07 9:05 
AnswerRe: Self restart Pin
Douglas Troy3-Apr-07 9:22
Douglas Troy3-Apr-07 9:22 

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.