DataGrid.Dispose

S

Sam

I want to clear datagird data at memory (Client) but unsure how effective
the impact?

Coding
-------
Sub CLEAR(Sender as Object, e As EventArgs)
Rpt_GL_BatchNum.Text = Nothing
Rpt_GL_BatchType.Text= Nothing
Rpt_GL_DocNum.Text = Nothing
Rpt_GL_DocType.Text = Nothing
Rpt_GL_AccNum.Text = Nothing
Rpt_GL_FrDate.Text = Nothing
Rpt_GL_ToDate.Text = Nothing
Rpt_GL_DataGrid.DataSource = Nothing
Rpt_GL_DataGrid.Dispose
End Sub

Question?
----------
- Does it clear the datagrid data ?
- How to clear datagrid data after used?

Please advise.

Many thanks.
 
E

Eliyahu Goldin

If you don't want datagrid to be present on client side, just set its'
Visible property to false and it won't be sent down there.

Eliyahu
 
S

Scott M.

You don't need to set your objects to nothing in .NET (unless we're talking
about COM InterOp objects). All you need to do is "disconnect" the grid
from it's datasource, re-connect it to an empty datasource (like an empty
DataSet) and rebind the grid.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,128
Latest member
ElwoodPhil
Top