|
i've 4 DataTables and all 4 have same column, now when i try to add Column[] to tables then a runtime error occured that is :
Column 'ABC' already belongs to another DataTable.
'ABC' is the first column
all columns added in first table but in second, its has an error
CODE:
DataColumn[] DataColumns = GetDCs();
DT1.Columns.AddRange(DataColumns);
DT2.Columns.AddRange(DataColumns); <<errored line
DT3.Columns.AddRange(DataColumns);
DT4.Columns.AddRange(DataColumns);
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
THe issue is not with the names, it's that you can't add a column to more than one table. So, you need to call GetDCs four times, or call Clone on DataColumns to create copies.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i can not call GetDCs four times, as it have lots of code, i made DataColumn[] so that i will not need to call GetDCs again,
I used Clone() but problem persits.
Code
DataColumn[] F_DataColumns = GetDCs();
DataColumn[] S_DataColumns = (DataColumn[])F_DataColumns.Clone();
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Xmen wrote: DataColumn[] F_DataColumns = GetDCs();
DataColumn[] S_DataColumns = (DataColumn[])F_DataColumns.Clone();
Since F_DataColumns is an array, I guess you won't be able to directly clone it. Iterate through each item and do cloning.
|
|
|
|
|
so why C# have Clone() and CopyTo(), if they dont do desired work ?
is there any alternative way intead of using Loop?
thanks
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Check this[^]. A similar discussion.
|
|
|
|
|
there are lots of thanks xD, there is no answer of that question which someone asked for column xD
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
They are base methods, which each class has to impliment. I guess they don't work for arrays. You have no choice. Either copy the array, or call the method every time, b/c you need a distinct array for each table.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
ok
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Clone before you add them.
|
|
|
|
|
yeah, i did that
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi,
I've got an application that selects different antennas in a radio station. There are 8 buttons on the form, which are mutually exclusive (unless a "stack" button is pressed, which allows multiple antennas to be selected at the same time.) When pressed, a button has to convey that it's on (i.e., the antenna has been selected.) With the lackluster standard button controls in Visual Studio Express, the best I've been able to do to indicate that a button has been pushed is to "light it up" with a different color. The buttons don't look very realistic and I've had one user complain that it wasn't intuitive that he had to click on buttons to select antennas.
At a minimum, I'd like something like FooButton, available on this site. The buttons appear raised, and when pushed they sink below the surface. Unfortunately, FooButton is available only in C++, and I don't have the skills or time to convert it to C#. There's some other pushbutton code on the site for C#, but it doesn't look like it does what I want.
I downloaded MultiMedia Soft's 3D Control Magic and it's great -- all the shapes and effects one would ever want, fully integrated with the Visual Studio ToolBox and has a WYSIWYG editor integrated into Visual Studio. But it's $250. Not sure I want to spend that much on this app and not sure I'll need the capability for other apps.
Does anyone know of free or inexpensive code to do what I want?
zqx3
|
|
|
|
|
All you need is to copy the bitmaps for the various states you want, from the library demo you have, and write an owner drawn button that uses them.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
How do I copy the bitmap, and how do I write an owner drawn button?
|
|
|
|
|
CTRL - PrintScreen and there have to be articles on owner drawn buttons on CP. You set the button to be owner drawn, then you need to handle the button's paint event and take control of drawing it.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Sounds like a lot of work. Anybody know of any code out there I can use?
|
|
|
|
|
Anything wrong with this[^] one ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Nice library. Should do the trick. Thanks. Only problem is, the buttons I designed in the demo have rounded corners and the library only draws rectangular buttons. I end up either squaring off the image with the button borders or having white space fill the corners between the image and the button border. I'd like the border of the button drawn by the library to hug the outline of the image, but don't know how to do that. Don't know anything about drawing rectangles with rounded corners. Do you?
zqx3
|
|
|
|
|
zqx3 wrote: Don't know anything about drawing rectangles with rounded corners.
Will this[^] link help?
/ravi (Author, FooButton)
|
|
|
|
|
Anybody can help with me please?i have been trying this for a week...and can't find any article related to this prob...
listView1.Items.Clear();
conn.Open();
cmd.CommandText = "SELECT * FROM hardwareTable WHERE ID="+searchBox.Text;
SqlCeDataReader rdr = cmd.ExecuteReader();
ListViewItem lvi = null;
while(rdr.Read())
{
lvi = new ListViewItem(rdr.GetInt32(0).ToString());
lvi.SubItems.Add(rdr.GetString(1));
lvi.SubItems.Add(rdr.GetString(2));
lvi.SubItems.Add(rdr.GetString(3));
lvi.SubItems.Add(rdr.GetString(4));
lvi.SubItems.Add(rdr.GetString(5));
lvi.SubItems.Add(rdr.GetString(6));
lvi.SubItems.Add(rdr.GetString(7));
listView1.Items.Add(lvi);
}
listView1.Refresh();
conn.Close();
what is the problem with my CODING???it shows an error when i push my search button..
|
|
|
|
|
How do I calculate the FPS of an app? I've looked to some articles and what I find always gets me an "Infinite" FPS. EVEN with nearly 50 sprites and I know it's not infinite. Thanks in advance.
- I love D-flat!
modified on Friday, February 22, 2008 8:09 PM
|
|
|
|
|
|
Hello all,
I'm trying to make a "public" webbrowser (for an internet kiosk).
My Webbrowser works quite good, but I have a problem : I didn't find the way to block windows "calls" to other applications...
For example : if a user click on a "mailto:" hyperlink, my webbrowser will call outlook express application !
I don't want user to be able to use another application ! Is that possible ?
I was thinking on catching a special windows message (WM_ActivateApp ??)... but don't think it's the better way.
If someone as any idea, don't hesitate to answer this message.
Thank you for your help
Ric
|
|
|
|
|
Look at navigating event of the web browser control.
this.WebBrowser1.Navigating += new System.Windows.Forms.WebBrowserNavigatingEventHandler( this.WebBrowser1_Navigating );
The event get sent two parameters; normally named sender and e
(object sender, WebBrowserNavigatingEventArgs e)
e has some properties and methods. Two of the properties are "Url" and "Cancel".
If you set Cancel to true then it prevents navagation. So you can do something like the following:
if(e.Url.ToString().ToLower().StartsWith("mailto:"))
{
e.Cancel = true;
}
|
|
|
|
|
Thanks ! I'm going to try it now
|
|
|
|