DataGrid Formatting Columns ISsues

C

coleenholley

I'm getting frustrated with trying to format a datagrid that is entirely populated dynamically using a class module written in VB .Net (No C# used!) We connect to a DB2 database using an RPC that is written in COBOL. The connection to the datagrid works in the code-behind in the class module, when I check the 'Create columns automatically at run time' box. If I don't select that, I don't get any data, even if I go in and add all my columns in the Bould column list and give the variable name I'm using in my code-behind (this actually gives me an error on the databind() call in the .aspx.vb code.) I desperately need to format my column widths in the datagrid - it looks like #$@! when it auto-generates! Here is a sample of the code used in the Class module that renders the datatable that we bind to

If li_rpd_array_row_len > 0 The
'Define the Column Names for the Datagrid to be constructed on the pag
dt_worksheet1.Columns.Add(New DataColumn("County"))...

'Build the DataTable with the Data
Dim ls_county, ls_tot_gas, ls_tot_gasohol, ls_tot_gallons As Strin
Dim i As Intege
For i = 0 To li_rpd_array_row_len - 1 Step i +
Tr
' row number and withdrawal type
ls_temp = ao_buffer.ExtractString(CType(li_start_arr, Short), CType(li_arr_str_len, Short)
dr_gallons = dt_worksheet1.NewRow(

ls_temp_arr = ls_temp.Substring(li_county_name, li_county_name_len).Trim(
ls_county = ls_temp_arr.ToString().Tri
dr_gallons(0) = ls_county ...

I haven't included all of the code here for space reasons... Does anyone have a suggestion how I can get this Blankety-blank datagrid to format my column widths? Thanks much for any help

Colee
 

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

Similar Threads


Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top