Tony,
Then as I understand you well for the same, you can simply write a new file,
because that has the same effect.
(And don't forget then to create a temp file before you start writing the
new one)
In my idea will that go much quicker while it is easier to do.
Be aware that you cannot use both solutions with more then 1 user active at
a time.
Cor
"Tony Johansson" <(E-Mail Removed)> wrote in message
news:hwxLl.8426$(E-Mail Removed)...
> Hello!
>
> So if I will add a new product I just use append to the textfile.
> So if I will remove a product I create a temporary file on Path and then
> looping and writing to tempfile
> and when I find don't write and then I use suitable File.
> So if I have to change I do similar thing with the textfile but I insted
> write the changes back.
>
> Hope you understand what I mean.
>
>
> //Tony
>
> "Cor Ligthert[MVP]" <(E-Mail Removed)> skrev i meddelandet
> news:eOa$(E-Mail Removed)...
>> Tony,
>>
>> I am very curious how you do that removing and adding of rows to your
>> textfile.
>>
>> Cor
>>
>> "Tony Johansson" <(E-Mail Removed)> wrote in message
>> news:kunLl.8422$(E-Mail Removed)...
>>> Hello
>>>
>>> I saw I could use this DataRowVersion.Original on a DataRow like this
>>> string prodNo = (string)row["ProdNr",
>>> DataRowVersion.Original].ToString();
>>>
>>>
>>> //Tony
>>> "Tony Johansson" <(E-Mail Removed)> skrev i meddelandet
>>> news:UkkLl.8420$(E-Mail Removed)...
>>>> Hello!
>>>>
>>>> When I delete a row from the DataGridView how can I get this row so I
>>>> have a change to remove
>>>> it from the textfile.
>>>> I use a DataGridView to represent the DataTable with its DataRows
>>>> In addition I use
>>>> _bindingSource.DataSource = _dataTable;
>>>> dataGridViewWareHouse.DataSource = _bindingSource;
>>>>
>>>> //Tony
>>>>
>>>>
>>>> "Cor Ligthert[MVP]" <(E-Mail Removed)> skrev i meddelandet
>>>> news:(E-Mail Removed)...
>>>>> Tony,
>>>>>
>>>>> Then first try to find how you do that to a textfile.
>>>>>
>>>>> Cor
>>>>>
>>>>> "Tony Johansson" <(E-Mail Removed)> wrote in message
>>>>> news:4CiLl.8418$(E-Mail Removed)...
>>>>>> Hello!
>>>>>>
>>>>>> I will do one of these alternatives.
>>>>>> 1. Add new rows to the Textfile which mean new products.
>>>>>> 2. Change existing products for example change the number of items
>>>>>> for a particularly product.
>>>>>> 3. Delete a product from the file.
>>>>>>
>>>>>> //Tony
>>>>>>
>>>>>>
>>>>>> "Cor Ligthert[MVP]" <(E-Mail Removed)> skrev i meddelandet
>>>>>> news:eePsE9$(E-Mail Removed)...
>>>>>>> Tony,
>>>>>>>
>>>>>>> Is it possible that you stay in the same message, because today you
>>>>>>> have made more related message.
>>>>>>>
>>>>>>> Don't be afraid, this will be seen by others too, but then they know
>>>>>>> what you are doing,
>>>>>>>
>>>>>>> By the way, what we don't know yet is, are you rewriting the
>>>>>>> complete textfile or only the changed rows?
>>>>>>>
>>>>>>> Cor
>>>>>>>
>>>>>>> "Tony Johansson" <(E-Mail Removed)> wrote in message
>>>>>>> news:eCgLl.8416$(E-Mail Removed)...
>>>>>>>> Hello!
>>>>>>>>
>>>>>>>> I have a DataGridView that represent a DataTable with some DataRow.
>>>>>>>> I have also these bindings.
>>>>>>>> _bindingSource.DataSource = _dataTable;
>>>>>>>> dataGridViewWareHouse.DataSource = _bindingSource;
>>>>>>>>
>>>>>>>> When clicking on the Save button I write to a textfile.
>>>>>>>>
>>>>>>>> Now to my question when I Change,Add or delete rows in the
>>>>>>>> DataGridView do I ever
>>>>>>>> have to check the rowState Detached.
>>>>>>>>
>>>>>>>> //Tony
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>
>
|