I'm binding a dataset into a hierarchical web grid. The first band has 6 columns and the 2nd band has 8 columns.
I want to put a dropdown list into Bands[ 1 ].Columns[ 8 ]. I do not know how to do this based on the samples and I would like to set the dropdown list selection based on the data received from the database.
Any help would be appreciated.
How did u resolve it?
Hi,
valuelist is bound to a column, but i want to bind for a cell based on some conditions
With Regards,
Tushar Borhade
Software Programmer
Well, I stopped being thick, and worked it out. On to the next problem (which is getting the thing to actually update!!!)
I'm assuming your EmployeeStatusId is the INT you set in your employee table which you want to set using the dropdown. The next thing you need is a query that returns a translation between your INT values and the text you want in the dropdown, like this:
SELECT [StatusId], [StatusName] + '/' + CAST([StatusId] AS NVARCHAR(999)) AS [DropDownText]FROM [StatusLookupTable]
The confiture your dropdown column like this:
Here is where you lose me. I want to have a grid that shows the "words", a dropdown that contains the "words" but a Value member that contains an Int.
For example, let's say we have a select statement like:
Select LastName, EmployeeStatusLabel, EmployeeStatusID From Employee
Then we hook this up to my UltraGrid.
I want two columns: Employee Name || Employee Status
When someone selects the Employee Status cell, I want a drop down that shows some coded value pairs like Active/1, Inactive/2, etc. etc.
Now, the datatype of the displayed column is string, but the value I want to save is Int. Is this possible?