I want to delete a row from InDatagridview that contains textbox.tex and transfer it to OutDatagridview
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I want to delete a row from InDatagridview that contains textbox.tex and transfer it to OutDatagridview
if i change the value of textbox it will search to InDatagridview and delete a row from InDatagridview that contains textbox.tex and transfer it to OutDatagridview.
If i change again the textbox value it will search to OutDatagridview and delete a row from OutDatagridview that contains textbox.text
and transfer it to InDatagridview.
Thanks!!!! a lot
vb.net
add a comment |
I want to delete a row from InDatagridview that contains textbox.tex and transfer it to OutDatagridview
if i change the value of textbox it will search to InDatagridview and delete a row from InDatagridview that contains textbox.tex and transfer it to OutDatagridview.
If i change again the textbox value it will search to OutDatagridview and delete a row from OutDatagridview that contains textbox.text
and transfer it to InDatagridview.
Thanks!!!! a lot
vb.net
3
Congratulations. Get to it and, if you encounter an issue along the way that we can help with, let us know. In the mean time, you might read this, this and this.
– jmcilhinney
Jan 4 at 13:34
There is rarely a good reason to "transfer" DGV rows from one to another control. A DataView makes it easy to show data in different contexts with almost no code.
– Nat Pongjardenlarp
Jan 5 at 18:53
add a comment |
I want to delete a row from InDatagridview that contains textbox.tex and transfer it to OutDatagridview
if i change the value of textbox it will search to InDatagridview and delete a row from InDatagridview that contains textbox.tex and transfer it to OutDatagridview.
If i change again the textbox value it will search to OutDatagridview and delete a row from OutDatagridview that contains textbox.text
and transfer it to InDatagridview.
Thanks!!!! a lot
vb.net
I want to delete a row from InDatagridview that contains textbox.tex and transfer it to OutDatagridview
if i change the value of textbox it will search to InDatagridview and delete a row from InDatagridview that contains textbox.tex and transfer it to OutDatagridview.
If i change again the textbox value it will search to OutDatagridview and delete a row from OutDatagridview that contains textbox.text
and transfer it to InDatagridview.
Thanks!!!! a lot
vb.net
vb.net
edited Jan 5 at 21:36
GPlay
asked Jan 4 at 13:22
GPlayGPlay
43
43
3
Congratulations. Get to it and, if you encounter an issue along the way that we can help with, let us know. In the mean time, you might read this, this and this.
– jmcilhinney
Jan 4 at 13:34
There is rarely a good reason to "transfer" DGV rows from one to another control. A DataView makes it easy to show data in different contexts with almost no code.
– Nat Pongjardenlarp
Jan 5 at 18:53
add a comment |
3
Congratulations. Get to it and, if you encounter an issue along the way that we can help with, let us know. In the mean time, you might read this, this and this.
– jmcilhinney
Jan 4 at 13:34
There is rarely a good reason to "transfer" DGV rows from one to another control. A DataView makes it easy to show data in different contexts with almost no code.
– Nat Pongjardenlarp
Jan 5 at 18:53
3
3
Congratulations. Get to it and, if you encounter an issue along the way that we can help with, let us know. In the mean time, you might read this, this and this.
– jmcilhinney
Jan 4 at 13:34
Congratulations. Get to it and, if you encounter an issue along the way that we can help with, let us know. In the mean time, you might read this, this and this.
– jmcilhinney
Jan 4 at 13:34
There is rarely a good reason to "transfer" DGV rows from one to another control. A DataView makes it easy to show data in different contexts with almost no code.
– Nat Pongjardenlarp
Jan 5 at 18:53
There is rarely a good reason to "transfer" DGV rows from one to another control. A DataView makes it easy to show data in different contexts with almost no code.
– Nat Pongjardenlarp
Jan 5 at 18:53
add a comment |
1 Answer
1
active
oldest
votes
Dim found, x, z As Boolean
Dim lookfor As String = Student_numberTextBox.Text
For dgv As Integer = In_TableDataGridView.Rows.Count - 1 To 0 Step -1
If In_TableDataGridView.RowCount > 0 Then
If lookfor = In_TableDataGridView.Rows(dgv).Cells(0).Value.ToString Then
found = True
End If
Else
found = False
End If
Next
If found = False Then
'In_TableBindingSource.AddNew()
If Out_tableDataGridView.RowCount > 0 Then
x = True
Else
x = False
End If
If x = True Then
Dim textout As String = Student_numberTextBox.Text
For inrow As Integer = Out_tableDataGridView.Rows.Count - 1 To 0 Step -1
If textout = Out_tableDataGridView.Rows(inrow).Cells(0).Value.ToString Then
Dim row2 As DataGridViewRow
row2 = Out_tableDataGridView.Rows(inrow)
Out_tableDataGridView.Rows.Remove(row2)
Else
'Exit For
End If
Next
End If
End If
If found = True Then
'Out_tableBindingSource.AddNew()
If In_TableDataGridView.RowCount > 0 Then
z = True
Else
z = False
End If
If z = True Then
Dim textin As String = Student_numberTextBox.Text
For outrow As Integer = In_TableDataGridView.Rows.Count - 1 To 0 Step -1
If textin = In_TableDataGridView.Rows(outrow).Cells(0).Value.ToString Then
Dim row1 As DataGridViewRow
row1 = In_TableDataGridView.Rows(outrow)
In_TableDataGridView.Rows.Remove(row1)
Else
'Exit For
End If
Next
End If`enter code here`
End If
End If
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54039763%2fi-want-to-delete-a-row-from-indatagridview-that-contains-textbox-tex-and-transfe%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Dim found, x, z As Boolean
Dim lookfor As String = Student_numberTextBox.Text
For dgv As Integer = In_TableDataGridView.Rows.Count - 1 To 0 Step -1
If In_TableDataGridView.RowCount > 0 Then
If lookfor = In_TableDataGridView.Rows(dgv).Cells(0).Value.ToString Then
found = True
End If
Else
found = False
End If
Next
If found = False Then
'In_TableBindingSource.AddNew()
If Out_tableDataGridView.RowCount > 0 Then
x = True
Else
x = False
End If
If x = True Then
Dim textout As String = Student_numberTextBox.Text
For inrow As Integer = Out_tableDataGridView.Rows.Count - 1 To 0 Step -1
If textout = Out_tableDataGridView.Rows(inrow).Cells(0).Value.ToString Then
Dim row2 As DataGridViewRow
row2 = Out_tableDataGridView.Rows(inrow)
Out_tableDataGridView.Rows.Remove(row2)
Else
'Exit For
End If
Next
End If
End If
If found = True Then
'Out_tableBindingSource.AddNew()
If In_TableDataGridView.RowCount > 0 Then
z = True
Else
z = False
End If
If z = True Then
Dim textin As String = Student_numberTextBox.Text
For outrow As Integer = In_TableDataGridView.Rows.Count - 1 To 0 Step -1
If textin = In_TableDataGridView.Rows(outrow).Cells(0).Value.ToString Then
Dim row1 As DataGridViewRow
row1 = In_TableDataGridView.Rows(outrow)
In_TableDataGridView.Rows.Remove(row1)
Else
'Exit For
End If
Next
End If`enter code here`
End If
End If
add a comment |
Dim found, x, z As Boolean
Dim lookfor As String = Student_numberTextBox.Text
For dgv As Integer = In_TableDataGridView.Rows.Count - 1 To 0 Step -1
If In_TableDataGridView.RowCount > 0 Then
If lookfor = In_TableDataGridView.Rows(dgv).Cells(0).Value.ToString Then
found = True
End If
Else
found = False
End If
Next
If found = False Then
'In_TableBindingSource.AddNew()
If Out_tableDataGridView.RowCount > 0 Then
x = True
Else
x = False
End If
If x = True Then
Dim textout As String = Student_numberTextBox.Text
For inrow As Integer = Out_tableDataGridView.Rows.Count - 1 To 0 Step -1
If textout = Out_tableDataGridView.Rows(inrow).Cells(0).Value.ToString Then
Dim row2 As DataGridViewRow
row2 = Out_tableDataGridView.Rows(inrow)
Out_tableDataGridView.Rows.Remove(row2)
Else
'Exit For
End If
Next
End If
End If
If found = True Then
'Out_tableBindingSource.AddNew()
If In_TableDataGridView.RowCount > 0 Then
z = True
Else
z = False
End If
If z = True Then
Dim textin As String = Student_numberTextBox.Text
For outrow As Integer = In_TableDataGridView.Rows.Count - 1 To 0 Step -1
If textin = In_TableDataGridView.Rows(outrow).Cells(0).Value.ToString Then
Dim row1 As DataGridViewRow
row1 = In_TableDataGridView.Rows(outrow)
In_TableDataGridView.Rows.Remove(row1)
Else
'Exit For
End If
Next
End If`enter code here`
End If
End If
add a comment |
Dim found, x, z As Boolean
Dim lookfor As String = Student_numberTextBox.Text
For dgv As Integer = In_TableDataGridView.Rows.Count - 1 To 0 Step -1
If In_TableDataGridView.RowCount > 0 Then
If lookfor = In_TableDataGridView.Rows(dgv).Cells(0).Value.ToString Then
found = True
End If
Else
found = False
End If
Next
If found = False Then
'In_TableBindingSource.AddNew()
If Out_tableDataGridView.RowCount > 0 Then
x = True
Else
x = False
End If
If x = True Then
Dim textout As String = Student_numberTextBox.Text
For inrow As Integer = Out_tableDataGridView.Rows.Count - 1 To 0 Step -1
If textout = Out_tableDataGridView.Rows(inrow).Cells(0).Value.ToString Then
Dim row2 As DataGridViewRow
row2 = Out_tableDataGridView.Rows(inrow)
Out_tableDataGridView.Rows.Remove(row2)
Else
'Exit For
End If
Next
End If
End If
If found = True Then
'Out_tableBindingSource.AddNew()
If In_TableDataGridView.RowCount > 0 Then
z = True
Else
z = False
End If
If z = True Then
Dim textin As String = Student_numberTextBox.Text
For outrow As Integer = In_TableDataGridView.Rows.Count - 1 To 0 Step -1
If textin = In_TableDataGridView.Rows(outrow).Cells(0).Value.ToString Then
Dim row1 As DataGridViewRow
row1 = In_TableDataGridView.Rows(outrow)
In_TableDataGridView.Rows.Remove(row1)
Else
'Exit For
End If
Next
End If`enter code here`
End If
End If
Dim found, x, z As Boolean
Dim lookfor As String = Student_numberTextBox.Text
For dgv As Integer = In_TableDataGridView.Rows.Count - 1 To 0 Step -1
If In_TableDataGridView.RowCount > 0 Then
If lookfor = In_TableDataGridView.Rows(dgv).Cells(0).Value.ToString Then
found = True
End If
Else
found = False
End If
Next
If found = False Then
'In_TableBindingSource.AddNew()
If Out_tableDataGridView.RowCount > 0 Then
x = True
Else
x = False
End If
If x = True Then
Dim textout As String = Student_numberTextBox.Text
For inrow As Integer = Out_tableDataGridView.Rows.Count - 1 To 0 Step -1
If textout = Out_tableDataGridView.Rows(inrow).Cells(0).Value.ToString Then
Dim row2 As DataGridViewRow
row2 = Out_tableDataGridView.Rows(inrow)
Out_tableDataGridView.Rows.Remove(row2)
Else
'Exit For
End If
Next
End If
End If
If found = True Then
'Out_tableBindingSource.AddNew()
If In_TableDataGridView.RowCount > 0 Then
z = True
Else
z = False
End If
If z = True Then
Dim textin As String = Student_numberTextBox.Text
For outrow As Integer = In_TableDataGridView.Rows.Count - 1 To 0 Step -1
If textin = In_TableDataGridView.Rows(outrow).Cells(0).Value.ToString Then
Dim row1 As DataGridViewRow
row1 = In_TableDataGridView.Rows(outrow)
In_TableDataGridView.Rows.Remove(row1)
Else
'Exit For
End If
Next
End If`enter code here`
End If
End If
edited Jan 5 at 22:19
answered Jan 5 at 18:35
GPlayGPlay
43
43
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54039763%2fi-want-to-delete-a-row-from-indatagridview-that-contains-textbox-tex-and-transfe%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
3
Congratulations. Get to it and, if you encounter an issue along the way that we can help with, let us know. In the mean time, you might read this, this and this.
– jmcilhinney
Jan 4 at 13:34
There is rarely a good reason to "transfer" DGV rows from one to another control. A DataView makes it easy to show data in different contexts with almost no code.
– Nat Pongjardenlarp
Jan 5 at 18:53