|
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
|
|
|
|
|
Is there some one here who knows of a component that works like the score in cubase.
Let me explain:
I want the capability to add and remove "boxes" boxes which should be possible to drag against a "timeline"
please look at this simple picture for explanation:
http://img140.imageshack.us/img140/6339/example8rm.jpg[^]
|
|
|
|
|
u can use lables to add dynamicaly at runtime
and can drag it run time using mouse.
rahul
|
|
|
|
|
Basically you're talking about a user control. No control can drag with the mouse by itself, you need to code this behaviour.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thanks for your answers,
I am about to implement this behaviour with an ownerdrawn component, built upon one "bar" class, and one "container" class.
I am just asking to see if you know of, or ever have seen a component with these capabilities (or atleast somewhat close to these capabilities)
or if you have any suggestions on how to build this component. I am NOT going to use labels.
Also, the bars have to be containers for other objects which can be retrieved by clicking and so on...(this ain´t a problem though)
|
|
|
|
|
I get the mouse position using Control.MousePosition. How can I convert this global mouse-cords to a windows local cords?
_____________________________
...and justice for all
APe
|
|
|
|