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
285
VisibleIndex , ListIndex coming as -1 during a CellList_Select operation
posted

Hi,

I have a valuelist attached to one of my columns in the ultragrid. One of the options in the list (say :- "Add object") opens up a dialog where i select some object , click OK and then come back to the parent form. Here when i try to set this newly added object as the selectedItem in the cell , i see that CellList_Select operation is not giving me the row's visible index or List index , both these properties are coming as "-1".

Any ideas what is going on here?

Thanks,

Keerti Somasundaram

Parents
  • 469350
    Offline posted

    Hi Keerti,

    I'm really not sure I understand the issue. It sounds like you are saying that you are launching a dialog from the CellListSelect event and then doing something, but it's not clear what. There is no SelectedItem property on a cell, so I don't understand what you are setting. And the event args for CellListSelect do not return an index, just a cell.

    So it's very unclear to me what you are doing. It sounds like maybe you are accessing the ValueList of the cell and trying to set the cell's Value or Text by setting the SelectedIndex on the ValueList, but that's not a good idea. The ValueList services the entire column and it's really not good to use the ValueList to change the cell programmatically. You would be better off setting the Value property on the cell.

Reply Children
No Data