<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[My Visual Database — delete from tablegrid]]></title>
		<link>https://myvisualdatabase.com/forum/viewtopic.php?id=8017</link>
		<atom:link href="https://myvisualdatabase.com/forum/extern.php?action=feed&amp;tid=8017&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in delete from tablegrid.]]></description>
		<lastBuildDate>Tue, 02 Aug 2022 06:16:27 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: delete from tablegrid]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=45570#p45570</link>
			<description><![CDATA[<p><span class="postimg"><img src="http://myvisualdatabase.com/forum/misc.php?action=pun_attachment&amp;item=8910&amp;download=0" alt="http://myvisualdatabase.com/forum/misc.php?action=pun_attachment&amp;amp;item=8910&amp;amp;download=0" /></span><br />?</p>]]></description>
			<author><![CDATA[null@example.com (k245)]]></author>
			<pubDate>Tue, 02 Aug 2022 06:16:27 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=45570#p45570</guid>
		</item>
		<item>
			<title><![CDATA[Re: delete from tablegrid]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=45566#p45566</link>
			<description><![CDATA[<p>Всем привет подскажите решение:<br />Есть таблица и кнопка удалить. Как выглядит скрипт? Если в таблице не выделена запись то открывается форма Form2 и там уже сообщение что не выбрана запись. Если запись выбрана то она удаляется скриптом причем все связанные с ней записи.</p>]]></description>
			<author><![CDATA[null@example.com (chartcatuser)]]></author>
			<pubDate>Tue, 02 Aug 2022 02:20:14 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=45566#p45566</guid>
		</item>
		<item>
			<title><![CDATA[Re: delete from tablegrid]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=45565#p45565</link>
			<description><![CDATA[<p>Всем привет подскажите решение:<br />Есть таблица и кнопка удалить. Если в таблице не выделена запись то открывается форма Form2 и там уже сообщение что не выбрана запись. Если запись выбрана то она скриптом удаляться<br />procedure Form1_Button3_OnClick (Sender: TObject; var Cancel: boolean);<br />begin<br />&nbsp; &nbsp; Cancel := True;<br />&nbsp; &nbsp; if Form1.TableGrid1.dbItemID then<br />&nbsp; &nbsp; begin<br />&nbsp; &nbsp; &nbsp; &nbsp; if Confirm(&#039;Are you sure you want to delete customer? This will make its children orphan. Proceed?&#039;) then<br />&nbsp; &nbsp; &nbsp; &nbsp; begin<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // make tele Customer to delete orphan<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SQLExecute(DELETE tele SET id_Customer = NULL WHERE id_Customer = &#039;+IntToStr(Form1.TableGrid1.dbItemID));</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // proceed to delete.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Cancel := False;<br />&nbsp; &nbsp; &nbsp; &nbsp; end;<br />&nbsp; &nbsp; end else<br />&nbsp; &nbsp; &nbsp; &nbsp; ShowMessage(&#039;Cannot proceed without selected record&#039;);<br />end;</p><p>{<br />&nbsp; Comfirm massages with &quot;Yes or No&quot;<br />}<br />function Confirm(msg: String=&#039;Please Confirm.&#039;; ICON: Integer=MB_ICONQUESTION; title:String=&#039;Confirm&#039;): boolean;<br />begin<br />&nbsp; &nbsp; result := IDYES = MessageBox(msg, &#039;APPNAME : &#039;+title, MB_YESNO+ICON);<br />end;.</p>]]></description>
			<author><![CDATA[null@example.com (chartcatuser)]]></author>
			<pubDate>Tue, 02 Aug 2022 02:05:08 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=45565#p45565</guid>
		</item>
		<item>
			<title><![CDATA[Re: delete from tablegrid]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=44073#p44073</link>
			<description><![CDATA[<p>Thank you derek you have solved my issue which is about one row in tablegrid. One thing more I would like to ask if there is more then one rows in tablegrid and more then one text box then how this statement would be?</p>]]></description>
			<author><![CDATA[null@example.com (unforgettable)]]></author>
			<pubDate>Mon, 07 Mar 2022 01:49:20 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=44073#p44073</guid>
		</item>
		<item>
			<title><![CDATA[Re: delete from tablegrid]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=44068#p44068</link>
			<description><![CDATA[<p>If you are selecting a row and a) hitting the &#039;delete&#039; key or b) right-clicking, then I have to assume that you are using an editable grid;&nbsp; it would have been helpful to have known this.<br />Simply add the code to the &#039;onchange&#039; event of the tablegrid instead.<br />.<br />procedure Sales_TableGrid1_OnChange (Sender: TObject);<br />begin<br />&nbsp; &nbsp; if sales.tablegrid1.rowcount = 0 then sales.edit4.clear;<br /> //Sales.stotal.Value:= Sales.TableGrid1.Columns[1].Footer.Formulavalue;<br /> //ComputeReceivable;<br />end;</p>]]></description>
			<author><![CDATA[null@example.com (derek)]]></author>
			<pubDate>Sun, 06 Mar 2022 21:07:53 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=44068#p44068</guid>
		</item>
		<item>
			<title><![CDATA[Re: delete from tablegrid]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=44066#p44066</link>
			<description><![CDATA[<p>Thank you derek. It works but it does not work when I select row and hit delete key or select row and click right mouse button.</p>]]></description>
			<author><![CDATA[null@example.com (unforgettable)]]></author>
			<pubDate>Sun, 06 Mar 2022 19:23:48 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=44066#p44066</guid>
		</item>
		<item>
			<title><![CDATA[Re: delete from tablegrid]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=44065#p44065</link>
			<description><![CDATA[<p>If all you want to do is clear out the edit field, then just change this procedure as follows:<br />procedure Sales_Button5_OnAfterClick (Sender: TObject);<br />begin<br />&nbsp; &nbsp; if sales.tablegrid1.rowcount = 0 then sales.edit4.clear;<br />&nbsp; &nbsp; UpdateTicketTotalSales(Sales.btnSave.dbGeneralTableId);<br />end;<br />Derek.</p>]]></description>
			<author><![CDATA[null@example.com (derek)]]></author>
			<pubDate>Sun, 06 Mar 2022 19:09:33 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=44065#p44065</guid>
		</item>
		<item>
			<title><![CDATA[Re: delete from tablegrid]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=44060#p44060</link>
			<description><![CDATA[<p>hi derek<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;look at attached pic too</p>]]></description>
			<author><![CDATA[null@example.com (unforgettable)]]></author>
			<pubDate>Sun, 06 Mar 2022 13:38:51 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=44060#p44060</guid>
		</item>
		<item>
			<title><![CDATA[Re: delete from tablegrid]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=44059#p44059</link>
			<description><![CDATA[<p>Hi derek<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; look at this project. When I enter sale on sale form it will appear on tablegrid and I type costumer&#039;s name. In case costumer refuse to buy then I delete record from tablegrid then costumer name should also be cleared.</p>]]></description>
			<author><![CDATA[null@example.com (unforgettable)]]></author>
			<pubDate>Sun, 06 Mar 2022 13:36:55 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=44059#p44059</guid>
		</item>
		<item>
			<title><![CDATA[Re: delete from tablegrid]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=44058#p44058</link>
			<description><![CDATA[<p>It sounds as if you are using the same form to edit a record as you are to display the tablegrid.&nbsp; <br />This is not &#039;standard&#039; MVD but obviously can still be done quite easily.&nbsp; <br />But you will find that if you delete a record from the tablegrid, you will then have to write a small script to delete any associated edit fields, comboboxes etc.<br />As always, if you attach your project, it will make it easier for people to understand your exact problem rather than having to make assumptions.<br />Derek.</p>]]></description>
			<author><![CDATA[null@example.com (derek)]]></author>
			<pubDate>Sun, 06 Mar 2022 11:38:49 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=44058#p44058</guid>
		</item>
		<item>
			<title><![CDATA[Re: delete from tablegrid]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=44057#p44057</link>
			<description><![CDATA[<p>I am sorry. I want to know when we delete a record from tablegride, it must also clear the data on text box of same form.</p>]]></description>
			<author><![CDATA[null@example.com (unforgettable)]]></author>
			<pubDate>Sun, 06 Mar 2022 11:00:47 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=44057#p44057</guid>
		</item>
		<item>
			<title><![CDATA[Re: delete from tablegrid]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=44052#p44052</link>
			<description><![CDATA[<p>It will also be deleted since the data is entered in a database which corresponds with the tables and the text zones. Try it and you will understand.</p>]]></description>
			<author><![CDATA[null@example.com (Destiny)]]></author>
			<pubDate>Sat, 05 Mar 2022 13:16:50 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=44052#p44052</guid>
		</item>
		<item>
			<title><![CDATA[Re: delete from tablegrid]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=44050#p44050</link>
			<description><![CDATA[<p>if text box belong to an other table then?</p>]]></description>
			<author><![CDATA[null@example.com (unforgettable)]]></author>
			<pubDate>Sat, 05 Mar 2022 11:59:10 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=44050#p44050</guid>
		</item>
		<item>
			<title><![CDATA[Re: delete from tablegrid]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=44049#p44049</link>
			<description><![CDATA[<p>When you delete data in the TableGrid they are also deleting text boxes.</p>]]></description>
			<author><![CDATA[null@example.com (Destiny)]]></author>
			<pubDate>Sat, 05 Mar 2022 11:26:27 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=44049#p44049</guid>
		</item>
		<item>
			<title><![CDATA[delete from tablegrid]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=44048#p44048</link>
			<description><![CDATA[<p>It is possible if we delete data from tablegrid then concerned text in a text box should also delete. How it will be?</p>]]></description>
			<author><![CDATA[null@example.com (unforgettable)]]></author>
			<pubDate>Sat, 05 Mar 2022 10:00:56 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=44048#p44048</guid>
		</item>
	</channel>
</rss>
