|
i did, the problem is the method expects a DataRow and im inserting a DataGridViewDataRow if i table.Rows.Remove(row);
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
i said this :
dataGridView1.Rows.Remove(row);
Not this :
table.Rows.Remove(row);
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
|
|
|
|
|
it works
that doesnt make sense, does the dataGridView automatically change its dataSource if i change the data in the datagrid view?
thanx
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
yes of course
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
|
|
|
|
|
i didnt know that
thank you
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Hi
I guess you have to select the rows in the datatable and then delete it.
foreach (DataGridViewRow row in dataGridView1.SelectedRows)
{
DataRow[] selectedRows = avalibalTimeCatTable.Select("IDColumnsName = " + row.Cells[0].Value.ToString());
foreach (DataRows rowtoDelete in selectedRows)
{
avalibalTimeCatTable.Rows.Remove(rowtoDelete);
}
}
Not tested
Might fail in the foreach loop.
Kjetil
|
|
|
|
|
YOUR A GENIUS!!!!!!!!!
it worked like a charm!!!
thanx
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
I have two tables in my MS SQL database. The first one (Publication) contains all sorts of information about books, and has one foreign key (AuthorID). The second table (Author) contains the names of the authors. Now, I need to sort the first table, alphabeticaly, by the authors names. But all I succeeded in doing so far was to sort it by Authors IDs. If anyone has an idea on how to solve this, any help would be greatly appreciated.
Thanks.
|
|
|
|
|
I don't know, but I suspect you'll need classes from System.DirectoryServices, perhaps DirectorySearcher.
|
|
|
|
|
Hello.
I have been creating a application that checks the application version and sees if it fits with the version from http://msbeditor.dumpen.dk/versioninfo.html
If it doesnt I use a webBrowser component to open a download link to http://msbeditor.dumpen.dk/msbEditor.rar
But this is not very practical because, the ones using my application have to download all files even though some of the files are not changed..
So I wanted to ask if you have an idea on how to make a auto updater in C#?
I was thinking of something like:
Check the application version with the online version (Allready done)
If it doesnt fit, then match all the files (last changed or file size or similar) in the rar file (from msbeditor.dumpen.dk) with the files in the application folder
If they are changed then download the changed files
Any ideas?
|
|
|
|
|
Sounds okay. You can create an additional updater application that will download the files and then update your main application when finished.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Thank you
Im glad you like the idea
But do you have any like real code for me?
Because (for me since im not that expierenced) its hard to go from idea to actullay coding it
A snippet or similar is just fine!
|
|
|
|
|
Hi.
Have you considered ClickOnce ?
Kjetil
|
|
|
|
|
Hello,
could anyone solve my problem. I have application working with MSSQL Server: there is one table "goods" (id, name) and another one - "info" (id, idgood1, idgood2, info), where idgood1 and idggod2 - foreign keys.
In my application I need to present a DataGridView in such a way,
_______| goods1 | goods2 | goods3
goods1 | info11 | ______ | ______
goods2 | ______ | ______ | info23
goods3 | info31 | ______ | info33
I select data from two tables ("goods", "info") in appropriate DataTable instances: GoodsDataTable and InfoDataTable. Then I CREATE (dynamically) one more DataTable - VisualDataTable, which IS what i need. Then I put VisualDataTable into DataSet, DataSet into BindingSource, and, finally, BindingSource into DataGridView. It's working. Until I want to update something!
I tried to call SqlAdapter's Update method as for InfoDataTable as DataSet. But nothing happens.
In general, how should I update data in case when "visual" part of DataGridView and database structure are different..?
Another words, I take data from database, and put data into database with one table, and I edit data with another table.
|
|
|
|
|
Your design is a bit blur. What I understand form your post is that you combine two tables into one, this is called DataView object which should be in the SQL server layer of your program.
Create a SqlCommand that creates a DataView combining both tables then make your SELECT/UPDATE commands on that view. Both tables will be updated accordingly.
I hope I got you right.
Regards
|
|
|
|
|
OK, I'll show an example
"Goods" Table:
id | name
---------
23 | foo1
24 | foo2
25 | foo3
"Info" Table:
id | idgood1 | idgood2 | info
-----------------------------
10 | _____23 | _____24 | inf1
11 | _____23 | _____25 | inf2
12 | _____24 | _____25 | inf3
I want to see in DataGridView such structure (first row - row header, first column - column header):
____ | foo1 | foo2 | foo3
--------------------------
foo1 | ____ | inf1 | inf2
foo2 | ____ | ____ | inf3
foo3 | ____ | ____ | ____
|
|
|
|
|
I've created a form with 'WindowState' set to "Maximized", so that the window starts in fullscreen. I don't want the user being able to restore the window back to it's original size, so I've disabled the "Maximize" button, and I've set the 'FormBorderStyle' to "Fixed Dialog".
However, I can still double-click the form and resize it back to it's original size, so I'm wondering what can I do to prevent this?
I'm using MS Visual Studio 2008 for what it matters.
Note: I'm fairly new to C#, so I'd appreciate it if you could be as detailed as possible if you got any suggestions.
Thanks in advance
|
|
|
|
|
Don't think you can prevent it happening, but you can respond and reverse the action.
Handle the "resize" event on the form (in the properties window, click the events button, find the resize event and double click on it), add some code that checks if the windowstate state is maximised. If it's not, set it to maximised.
Simon
|
|
|
|
|
You should be able to do it by overriding WndProc and intercepting the WM_ENTERSIZEMOVE (0x0231) message, or another similar message if that one isn't sent in your situation.
Dave
|
|
|
|
|
|
Perhaps set the .MinimumSize to the .Size in the Load event handler?
|
|
|
|
|
hi guys! I have a listview with a PDF's from a local folder. when the item is double clicked I want to be displayed. What is the best way of doing this? I haven't do any coding for opening PDF
's before. Thx ahead for reading this post
|
|
|
|
|
.Net doesn't provide PDF support by default. You'll need to get a 3rd party PDF library, or display it by calling external software.
PDF Library - Google for one, there's about a gazillion.
External software - like adobe or foxit. You'll need to ensure it's installed, maybe setup some kind of prerequisite in your app's installed, the call it from your software. Or possibly just open the pdf file and let windows kick in to choose the software.
Simon
|
|
|
|
|
laziale wrote: when the item is double clicked I want to be displayed.
Process.Start("pdffilename.pdf")
|
|
|
|
|
it says that access is denied
|
|
|
|