vb.net - How to display data into GridView after click a button -


hi have 2 gridview , 1 button. when press button, process data on gridview1. here code of button process :

 protected sub btnhitung_click(sender object, e eventargs) handles btnhitung.click     dim vnhari string = ddlnhari.selectedvalue      'jika belum pilih jumlah hari     if vnhari = ""         clientscript.registerstartupscript(page.[gettype](), "validation", "<script language='javascript'>alert('pilih hari terlebih dahulu')</script>")     else         'get batas min. tanggal dari jumlah hari yang dipilih         dim vltgl date = date.now.adddays(-vnhari).toshortdatestring         nhari integer = 0 convert.toint32(vnhari)             dim jumsaham int32             dim jum int32             data integer = 0 investorgridview.rows.count - 1      '-1 : untuk exclude header                 'jika tanggal pada datagrid = vltgl, maka ambil datanya                 if convert.todatetime(investorgridview.rows(data).cells(0).text).toshortdatestring = vltgl                     jum = convert.toint32(investorgridview.rows(data).cells(3).text)                 end if                 jumsaham = jumsaham + jum             next             vltgl = vltgl.adddays(1).toshortdatestring         next     end if end sub 

anyone know how can store vltgl value , jumsaham value datatable , show in gridview2? stuck here. thanks


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -