|
That was still left from the previous version. I corrected the original answer.
The rows aren't deleted until you call AcceptChanges. They are only marked to be deleted. So depending if you have a database where you want to reflect the changes, you can first mark the rows to be deleted, actually delete from a database and the accept any pending changes.
Have a look at DataTable.AcceptChanges Method[^]
|
|
|
|
|
Accept changes was called. As per the edit in my previous post, only some of the rows with zeros have been removed?
Is the indexing here working correctly? I've seen other methods were the loop starts at the bottom of the table.
|
|
|
|
|
You're correct, looping from the end is working since when an item is removed, it would be 'skipped' if looping forward.
|
|
|
|
|
Sorry - I didn't notice your loop was starting at the bottom
I will try and figure out why only some zeros are being removed. Thanks for your help.
|
|
|
|
|
You're welcome, hopefully you find the reason. If needed, post a new question to the forums
|
|
|
|
|
Hi
i have problem in this senario :
I have Sql server database 2008 R2 ,
Entity FrameWork 4 with ModelFirst approach
project : PM software with GIS
beacuse security we decided that security of system implemented with RLS(Row level Security ) on server side (DBMS) , i mean with Schema and View on Sql only Record's of views showed up for valid user ,
and for Views in SQL don't have relation to other views
" for example tables that we connect their relation wity PK and FK "
when i generate EF model from database only i add views in the Model
so , i corrected Name Of Views with polorilize , change Updatableview Confige for any view that supported as well as Table ,
and by hand i connect all relation between entities that made up of views
by Navigation panel and association Tool
what's the problem :
beacuse i created all relation in EDM between entitys and thease not exsit in between of views
,
any time i change fileds,views , name of views , schema of view and important of them New Views with New Schema and ,...
when I update model by EF EDm (ModelFirst)
all of older entities crashed ,
all of realation between entities damaged
, and all change not returned
note :
for speed , security and distributed business of system
we tryed all proccess and all calculation on server sidee
plaese Help me....
Regard
DOT NET Developer
Ali Sarshogh . Iran country.Isfahan City
Chief programmer.
|
|
|
|
|
Hi,
So I am to design an application with some basic functionality and hardware interface (COMs etc), have decided to use C#.
The System which the app run on will be WinXp, without Internet and it will be a dedicated system to run that app ONLY, nothing else has to be run on it, there will be keyboard/mouse to sue the app but the user is not expected to go elsewhere, not be able to close the app and app should start-up as XP starts, no explorer,task manager etc.
It is for a dedicated POS terminal... can someone here please guide me a bit in the right direction, I am sort of lost as from where to start.
I know I will need to put the app in startup to get it running when system starts and somehow keep explorer from starting, I can capture key sequences and/or disable Windows shortcuts altogether (don't know how), provide a control to shutdown PC from within the app.
Note: the user is not the opponent, he is not deliberately trying to get out of the app, I hope.
Does anyonehave experience with this type of requirement.
|
|
|
|
|
Zaid Pirwani wrote: Does anyonehave experience with this type of requirement.
Kiosk mode[^]
|
|
|
|
|
KIOSK, so this was the magic word I was missing.... simply didn't came to mind.
THANKS for the tutorial link.
|
|
|
|
|
You're welcome
|
|
|
|
|
As noted in the other thread kiosk is the key word but do further research on it besides just the one tutorial.
There are many clever ways to break a kiosk and you should insure that at least the common ones are not allowed.
|
|
|
|
|
when I try to open a office word file with c# in website, everything is working fine on my local machine. However when I upload the files to hosting server I receive an error like:
"Could not load file or assembly 'office, Version=12.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c' or one of its dependencies.
The system cannot find the file specified".
I have learned that hosting server machine hasn't installed office version because of licence an security reasons.
How can I solve this problem ?maybe can I reference a dll file on client machine to open the word document with c# code or .. please help me about it.
|
|
|
|
|
a.ergin wrote: How can I solve this problem ?m
Try to place the assembly 'office, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' on the server. Don't install office, just copy the assembly from your local system on the server and see.
a.ergin wrote: can I reference a dll file on client machine to open the word document with c# code
You need to place the assembly where the code runs. If it's a desktop app, provide assembly on system where it runs.
|
|
|
|
|
actually, at first there had been a problem with the web.config file and web project never starts. Then, I had put the file
Microsoft.Office.Interop.Word.dll
in to the bin folder(inside my project) and my application starts however when I navigate through to the page and hit the button which runs the code to open word file. I had received errorlines could not load file or... I had post in my previous posted massage.
I have tried to put some other dll files in bin folder but it did not work.. please help me about this problem..
|
|
|
|
|
|
Yes button event handler in the codebehind file works on the server side.
the solution that you have sent including the third one usefull for me.
thanks alot
|
|
|
|
|
i am making a browser window application in c# using webcontrol.
is there a way that i can specify the save location, by default it picks the IE's default save location
|
|
|
|
|
Hi,
This is Tushar . I want to develop Expense Management tool as a Mini Project in C# language using ASP.Net Technology(Windows Forms).
So,can anyone help me to find any idea and source code for given Project?
Thanks,
Tushar
|
|
|
|
|
Tushar Urade wrote: in C# language using ASP.Net Technology(Windows Forms). The first thing you need to do is decide on your platform: do you want to use ASP.NET or Windows Forms? You cannot do it both ways at the same time. As for source code, there are hundreds of samples in the CodeProject articles section[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
To add to what Richard said, there is another problem with your request:
Tushar Urade wrote: I want to develop Expense Management tool
Is incompatible with:
Tushar Urade wrote: find any idea and source code for given Project
If we give you source code, you haven't developed it, have you?
If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.
|
|
|
|
|
Do a search in the articles section on this site - you might find something that is useful to you and might help you get started.
|
|
|
|
|
Hi,
After building my C# solution (using Visual Studio 2010), my debug folder (bin/debug) includes some assembly file (dll files, and .exe file).
Then I tried to use the obfuscator software (such as: Dotfuscator,..) to obfuscate my files successful. Then, I add these assembly file to my setup project, and build it to create setup package.
But, after installed my setup package, I tried to use decompiled softwares to check assembly files (in the installation folder), I still could see and get origin codes.
Do you know why ? How can I obfuscate my assembly file for setup package ?
Thank you for your help !
|
|
|
|
|
Hi,
I use this to change the back color of a cell:
private void dataGridViewData_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
if (!string.IsNullOrEmpty(e.Value.ToString()))
{
e.CellStyle.BackColor = Color.LightGoldenrodYellow;
}
}
This works, but also check box cells are changed if they are checked or not.
How can I make an exception for check boxes, or is there an other way to do this?
The datagridview is set to autogenerateColumns = true.
Groover,
0200 A9 23
0202 8D 01 80
0205 00
|
|
|
|
|
One way to distinguish columns is to check the ColumnIndex property of the DataGridViewCellFormattingEventArgs object.
For example you can access the actual column being formatted using
dataGridViewData.Columns[e.ColumnIndex]
For more info, refer to DataGridViewCellFormattingEventArgs[^]
|
|
|
|
|
Hi,
I've already been there, but I wanted something simple.
Have it working now, this is what I use:
private void dataGridViewData_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
int x =e.ColumnIndex;
int y = e.RowIndex;
if (dataGridViewZakdata[x,y].GetType() == typeof(DataGridViewTextBoxCell))
{
if (!string.IsNullOrEmpty(e.Value.ToString()))
{
e.CellStyle.BackColor = Color.LightGoldenrodYellow;
}
}
}
Thank You for your efford,
Groover,
0200 A9 23
0202 8D 01 80
0205 00
|
|
|
|