I find it ironic that all of your samples use dynamic SQL or TABLE attached data.
In the real world no DBA will allow direct access to sensitive data like orders and customers. The typical approach will be to build and use stored procedures that can be granted to groups or individual users to control the data access.
Nowhere do I find any samples of using stored procedures to return a subset of data from a data table, edit the data and return it via stored procedures. We will not recommend this product unless I can build a prototype with this architecture. I've done it in the past with your competitor's grid...how do I do it with this one?
dhouse@amcon.com
Read one of the other column related posts, and tried what was suggested...Building BoundDataField objects, setting properties, and then adding them to the Grid.Columns collection.
Kinda works, but not exactly...Don't want to display some columns, but need the data to do updates, like the rowID field. Setting it's width to ZERO does NOT remove the column. It defaults to a value of approx 5.
Also, how do you force a column to use a checkbox as it's edit control. I have a boolean column (SQL Bit DataType) but is shows as "false" in the grid.
Also, how do you flag certain columns as ReadOnly...
Would be really nice if you produced some type of documentation for this stuff...much faster to search online help files than wait for a forum response...
I changed the grid from the UltraWebGrid to the WebDataGrid...
Now when I load the grid with data from a datatable, I cannot alter the columns, as they do not exist...
WebDataGrid1.DataSource = dtLabels
WebDataGrid1.DataBind()
Try
.Columns("PriceLabelID").Width = 0
.Columns("Selected").Width = 20
.Columns("Selected").Header.Text = "Sel"
.Columns("BranchNo").Width = 0
.Columns("UPCNumber").Width = 90
.Columns("Retail").Width = 40
.Columns("ItemDescription").Header.Text = "Description"
.Columns("SellRatio").Width = 40
.Columns("Source").Width = 0
End With
'Stop
End Try
Columns.Count in the WebDataGrid1 object is 0...
This looks like you're using WebGrid (class name Infragistics.WebUI.UltraWebGrid.UltraWebGrid), rather than WebDataGrid (class name Infragistics.Web.UI.GridControls.WebDataGrid).
Can you confirm? If so, I'll move this post to the WebGrid forum (it's currently in the WebDataGrid forum).
NetAdvantage_ASPNET_20083_CLR35.exe
This is strange, what version of NetAdvantage you are using?