Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
psibertrip #1
Working TableStyle Not Working on a Second DataGrid
I am having difficulty getting Tablestyles to work on a
datagrid. I have 2 datasets, 1 filled and the other not. The
first contains customer, stock and order history information
and has the Customers table tied to a datagrid, while the
second is to be kept empty to accept new order items and is
tied to another datagrid on the same form. The same code I
used for setting up the TableStyle for my Customers datagrid
is not working for the New Order Items datagrid. Please help
if at all possible.
'******* Customers Table Columns *******
Dim ts As New DataGridTableStyle()
ts.MappingName = "Customers"
Dim DefMap(2, 1) As String
DefMap(0, 0) = "Name"
DefMap(0, 1) = "Name"
DefMap(1, 0) = "Contract"
DefMap(1, 1) = "Contract"
DefMap(2, 0) = "Extension"
DefMap(2, 1) = "Extension"
Dim column As New DataGridTextBoxColumn()
Dim i As Short
For i = 0 To GetSetting("OSInv", "CustColumns", "Qty",
"2")
column = New DataGridTextBoxColumn()
column.MappingName = GetSetting("OSInv", "CustColumns",
"Map" & i, DefMap(i, 0))
column.HeaderText = GetSetting("OSInv", "CustColumns",
"Header" & i, DefMap(i, 1))
column.Width = CInt(GetSetting("OSInv", "CustColumns",
"Width" & i, "80"))
column.NullText = GetSetting("OSInv", "CustColumns",
"Null" & i, "")
ts.GridColumnStyles.Add(column)
Next
dgCustomers.TableStyles.Add(ts)
'******* Order Items Table Columns *******
ts = New DataGridTableStyle()
ts.MappingName = "CustOrder"
ReDim DefMap(4, 1)
DefMap(0, 0) = "SKU"
DefMap(0, 1) = "SKU"
DefMap(1, 0) = "Qty"
DefMap(1, 1) = "Qty"
DefMap(2, 0) = "Manufacturer"
DefMap(2, 1) = "Manufacturer"
DefMap(3, 0) = "Description"
DefMap(3, 1) = "Description"
DefMap(4, 0) = "Unit"
DefMap(4, 1) = "Unit"
For i = 0 To GetSetting("OSInv",
"CustOrderColumns", "Qty", "4")
column = New DataGridTextBoxColumn()
column.MappingName = GetSetting("OSInv",
"CustOrderColumns", "Map" & i, DefMap(i, 0))
column.HeaderText = GetSetting("OSInv",
"CustOrderColumns", "Header" & i, DefMap(i, 1))
column.Width = CInt(GetSetting("OSInv",
"CustOrderColumns", "Width" & i, "80"))
column.NullText = GetSetting("OSInv",
"CustOrderColumns", "Null" & i, "")
ts.GridColumnStyles.Add(column)
Next
Me.dgCustOrder.TableStyles.Add(ts)
psibertrip Guest
-
#38816 [Opn]: PHP code that was working perfectly recently stopped working.
ID: 38816 User updated by: mtoohee at gmail dot com -Summary: PHP code that was working perfectly recently stopped.... -
Macromedia Flash Player installed and working properly suddenlys stops working..
No idea what has caused the Flash player to stop working. This is not my machine but a relatives who has asked for help over the T'giving... -
Data not working on Label but is working in Datagrid
I am creating a simple website in Flex. I want to show different content from the database for home, about us, contact us, etc. I am using a CFC as... -
Why is my Paging not working in my DataGrid?
Question: Why can't I enable paging in Datagrid? Answer: You must check 'AllowPaging' You must add code to handle the PageIndexChanged Event. ... -
Focus in Datagrid not working
http://aspnet.4guysfromrolla.com/articles/090902-1.aspx I have used this and double checked my work and it isn't working for me! uggh! what am i...



Reply With Quote

