Hello. I'm currently trying to upgrade a infragistics webGrid 14.2. I'm having problems getting the code below to work:
Dim EmployeeName As Infragistics.Web.UI.GridControls.ValueList = wdgAssignments.Columns(EmployeeIDColumn).ValueList EmployeeName.DataSource = UnitDataset1 EmployeeName.DataMember = "Employee" EmployeeName.ValueMember = "EmployeeId" EmployeeName.DisplayMember = "FullName" EmployeeName.DataBind()
What should I used since Type infragistic.web.ui.Gridcoontrols.Valuelist is not defined.
Hello Holsey,
Thank you for posting in the Infragistics community !
I am not sure what you are trying to achieve so it will be quite helpful if you answer my questions:
1) Are you using WebDropDown or other provider for the WebDataGrid
2) At what time/event are you trying to get .ValueList and what do you expect it to return ?
3) What is wdgASssignments in your code - is this the WebDataGrid or something else ?
Please update the thread with answers to these and I will be glad to help you.
To answer your questions (I'm a coworker of his):
1) No, it is not for a webdropdown.
2) I believe on the specific page he is trying to access it, it is in a few different locations depending on parameters the page is loaded.
3) Yes, that is the grid.
I am working on a page where I'm trying to find the alternative to this Value list as well. On my page, and similarly on his, the table is databound to a specific datasource. That datasource returns some ID fields (numberic) that actually point to a primary key in another table. We would then use another query to get those values and then update the ValueList of that column and it would select the proper value to show on the screen. This was done by previous programmers of this product and the desire is to not change the current procedures as much as possible, but to upgrade our grids from the 10.3 UltraWebGrid to the 14.2 WebDataGrid.
Specifically in my page, I am trying to update the value list after the table is databound. The column for the datasource is called RequestStatusID and it returns an Integer that points to our Lookup table. However, after the table was databound (previously), we would update the ValueList like below to make that column show the text value.
Private Sub SetupStatusColumn() Dim StatusList As ValueList = uwgRequests.Columns.FromKey("RequestStatusID").ValueList If StatusCodes Is Nothing Then Dim Lookup As New USASLookup.LookupBLL() StatusCodes = Lookup.GetData("REQUEST_STATUS") End If StatusList.DataSource = StatusCodes StatusList.DataMember = "Lookup" StatusList.ValueMember = "LOOKUPID" StatusList.DisplayMember = "VALUE" StatusList.DataBind() End Sub
This would take a value of 1298 for that cell and change it to show Pending on the grid. Is there a way to do this functionally with the WebDataGrid.