Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
115
How can i add some values to a "Custom" column on my Grid
posted

Hey all,

 I have a UltraGrid displaying a certain # of informations, and everything works well until....

i am adding a  "custom" colum (if i may say) at the end of the grid. the custom column is only supposed to display the # of rows, for instance on row 1, i will have X # of details, and the last cell will be named "Items" with for value 1, row 2 will have for value 2 etc....

I can add the column with ease, but where i get stuck is when i try to add values into that column.

 this is wut i do:

in the Grid_InitializeLayout Event  :

e.Layout.Bands(0).Columns.Add("Items", "Items")

 and in some method i do:

Dim CustValues As ValueList = New ValueList
Dim i As Integer = 1

        While i < UltraGrid11BatchJobsHistory.Rows.Count
            CustValues.ValueListItems.Add(i)
            i += 1
        End While

        UltraGrid11BatchJobsHistory.DisplayLayout.Bands(0).Columns("Items").ValueList = CustValues

 

When i check the grid, i DO see the new column called ITems, but it has no value

can someone please help ?

Thank in advance

John

 

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

     Hi John,

        I'm not sure I understand your question. You are assigning a ValueList to the column, which means that the cells in this column will have a dropdown list of values that the user can choose. Are you saying that the dropdown is not showing up?

        You seem to be saying that the cells in this column have no value. But that is correct. There is nothing in your code here that assigns a Value to the cell, you are only assigning a ValueList, which is not at all the same thing.

        If you want to assign a Value to the cell, then I recommend using the InitializeRow event of the grid. The code would look something like this:

        e.Row.Cells("Items").Value = someValue

Children