|
I have number of textBox controls in my form.I want to save the text in the LostFocus or Leave Event.if i use mouse click to move one textbox to another, it work properly.but when i use "Tab Key" the value is different.
for example
i move TextBox1 to TextBox2 by mouse click, active control is TextBox1
i move TextBox1 to TextBox2 by "Tab Key", active control is TextBox2
but in both condition i need TextBox1.
How can i solve this problem.
|
|
|
|
|
use tabindex property
ex: TextBox1.TabIndex = 1;
TextBox2.TabIndex = 2;
aarthi
|
|
|
|
|
Dear All,
How to create selection formula for particular date using C#
Use the same formula in the C#
That is in the Crystal Report Viewer.
Please help me to give solution for this ASAP.
Have a great day.'
With Regards,
Siva
|
|
|
|
|
Exactly 9 out of 16 of the questions you have posted have had the word "Urgent" in the subject. Have you considered slowing down a little? Life should not be led at an "Urgent" state - its bad for your health!
Have a read of this[^] thread, which explains how to get better answers to your questions.
The current question you have posted is fragmented, and somewhat vague... What do you want to do with selecting dates? What do you mean by "Selection formula"? What formula are you using in crystal? Its easy enough to deplicate most date/time operations in C#.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
Hi,
I have peculiar problem in reading an excel file to Dataset. That is, I have stored one excel file in my desktop. The same file is stored in my C drive also. While running the application, if the file is from desktop, it is throwing error that " Microsoft Jet Database Engine couldn't open the file....". But if the file is reads from C drive, it is reading correctly. Anybody has any solution for this? Why it is not reading the file from desktop? Following is the code I'm using for reading file:
private void btnReadFile_Click(object sender, System.EventArgs e)
{
string strFilePath;
strFilePath=File1.Value; // I'm using FileField HTML control.
GetDataFromXL(strFilePath);
}
private void GetDataFromXL(string fullfilepath)
{
try
{
string strConnectionString =string.Empty;
int NoofRecords;
strConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+fullfilepath+@";Extended Properties=""Excel 8.0;HDR=YES;""" ;
OleDbConnection cnCSV =new OleDbConnection (strConnectionString);
cnCSV.Open();
lblmessage.Text="File found and opened";
OleDbCommand cmdSelect = new OleDbCommand (@"SELECT * FROM [Sheet1$]", cnCSV);
OleDbDataAdapter daCSV = new OleDbDataAdapter();
daCSV.SelectCommand = cmdSelect;
DataTable dtCSV = new DataTable ();
daCSV.Fill(ds,"IndexesTbl");
NoofRecords=ds.Tables[0].Rows.Count;
}
catch(Exception ex)
{
errMessage=ex.Message;
lblmessage.Text=errMessage;
}
finally
{}
Anybody who knows, please help me. Advance thanks for the same.
Regards
Raja Raman S
Reuters India Pvt.Ltd.
Bangalore
|
|
|
|
|
Put this in your GetDataFromXL procedure, to see just what the Data Source parameter of the Connection String is being set to:
MessageBox.Show(fullfilepath,"Testing Path");
----------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
Hi,
Thank you for the reply.
The fullfilepath string value is set as C:\Documents and Settings\raja.raman\Desktop\IndicesTbl.xls. The path is correct only. Still facing the error. Please help. Thanks a lot.
Regards,
Raja Raman S
Reuters India Pvt.Ltd.
Bangalore
|
|
|
|
|
Try this:
C:\\Documents and Settings\\raja.raman\\Desktop\\IndicesTbl.xls
----------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
Hello!
I have a problem: I use a datagridview control to display data coming from a server application. The data is taken from a "generic" on the client side (that has in each element a cell from my table) and put in a dataset table (I've tried puttting it directly to the datagridview and I get the same problem). At runtime, everything works well, the datagridview gets populated with the correct data, the problem is when I try to scroll(v or h) the application freezes. The same if I use my keyboard and try to get to a non-visible cell. If I set No ScrollBars property, I can move with the keyboard around - no problem.
Any ideeas?
|
|
|
|
|
Well, it's not the number of rows that seems to be the problem, but the scrollbar - whenever a scrollbar has to be displayed the control freezes. I've also set scrollbars to "None" and everything works OK (except of course I have to use the keyboard to see everything), but this isn't the fix I need.
Anyway, below is the code I'm using... maybe is something wrong there ( my experience is quite limited):
DataTable temp=new DataTable();
DataRow newRow;
DataColumn newCol;
ds1.Tables.Clear();
ds1.Tables.Add(temp);
i = 0; j = 0; prima = true;
newRow = temp.NewRow(); newRow.BeginEdit();
for (i = 0; i < fp.lista_selectie.Count; i++) //fp is the parent form
{
if (fp.lista_selectie[i] != "##rr##") //##rr## is what I'm putting beetwen rows
if (prima) //used to add columns when adding the first row
{
newCol = new DataColumn(i.ToString());
temp.Columns.Add(newCol);
newRow[j++] = fp.lista_selectie[i].ToString();
}
else
newRow[j++] = fp.lista_selectie[i].ToString();
else
{
newRow.EndEdit();
temp.Rows.Add(newRow);
newRow = temp.NewRow();
newRow.BeginEdit();
j = 0; prima = false;
}
}
dGV1.DataSource = temp;
I'm using VS2005.
Any ideeas? Or going back to Listview?
-- modified at 7:21 Wednesday 21st June, 2006
|
|
|
|
|
Is there a possibility (net 2.0) to check if a class is inherited from another class? I have no instances of the 2 classes only types.
e.g.
class A:class B
{
}
class B:class C{
}
class a inherits from class B? -> yes....
Regards
Hansjörg
Edit/Delete Message
|
|
|
|
|
Have you tried:
A aObj = new A();
if(aObj is B)
//do something
|
|
|
|
|
is not possible because I don't have always the default constructor....
regards
Hansjörg
|
|
|
|
|
Use the IsSubclassOf method.
---
b { font-weight: normal; }
|
|
|
|
|
|
Hi,
I have done live video capturing by DirectX.Capture class but the video quality is poor. The previewing video stream is having small size of squares along the movie character's what have to be do for this. Please give me idea to solve my problem.
Advance Thanks
Best Regards.,
-- modified at 6:51 Friday 16th June, 2006
|
|
|
|
|
I have a form with two DataGrid controls. When a user selects a row in DataGrid1, DataGrid2 is populated with child data using a filtered DataView object.
I also have certain criteria that allows me to preselect a "default" row of data in DataGrid2.
So basically user clicks on a row in DataGrid1, DataGrid2 is populated with all valid child data, and then the program also automatically selects a row in DataGrid2 that in most cases will be the correct selection. But the user also has the choice to change the selection in DataGrid2 before continuing.
The code works fine - the CurrentCellChanged event in DataGrid1 correctly populates all rows into DataGrid2 and then additional code correctly "pre-selects" a default row in DataGrid2.
In most cases the user will simply accept the default selection in DataGrid2, but they still need to be able to review the programmatic default selection before they accept it.
The problem is I can preselect a default row in DataGrid2, but that selection may not always be within the rows that are visible in DataGrid2.
What I want to do is ensure that the preselected (programmatically selected) default row in DataGrid2 is always visible without the user actually having to scroll down to find the preselected row.
Is this possible???
TIA!!!!
|
|
|
|
|
Hi to all
I am rading text file ...... line by line by using
string line = rd.ReadLine();
but line contain special character like \t\r\n I want to remove all the character from that line .. HOw it possible
Yogesh
|
|
|
|
|
Use the String.Replace() method.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
what does this mean?
Additional information: The form that was specified to be the MdiParent for this form is not an MdiContainer.
I tried to assign a class to be the MdiParent of a form and I got that message.
|
|
|
|
|
check that the form to which u r trying to assign as mdiparent
should have its IsMdiCotainer property true.
rahul
|
|
|
|
|
Set your parent form's IsMdiContainer property to true.
Regards,
Wasif Ehsan.
|
|
|
|
|
Hi..
I want to use my custom class ( that contains collection ) as DataSet.
I will send the dataset to report.
How can i do that?
Thanks.
mca
|
|
|
|
|
Create a method in your class which creates/returns a DataSet containing the current state of the object.
Josh
|
|
|
|
|
its a solution but :
there are classes/collections in main class and the sub classes/collections also contains classes/collection..its like a tree and i dont want to do that manualy
by your solution i must write methods to all sub classes/collections in the main class
mca
|
|
|
|