We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

DropDown Cell implementation

Hello, Could anyone suggest the best way to implement a drop-down grid cells? I have a main gdbg with some rows being of a drop-down type. In these row cells I have to prevent a user from entering data directly, but through a drop-down pop-up that essentially has two columns - name/value pair. The user enters value and a total appears in the main grid cell upon closing of the drop-down. I am implementing the drop-down as a virtual grouping control since I need to calculate and show the total. Is that the right choice for control? Would another virtual gdbg be better? The reason for choosing virtual type is that the same drop-down is required for every cell in a certain row and the data source remains the same. I looked into samples, but all of them quite simplified, so my questions still remain unanswered. Any insight will be greatly appreciated. And by the way, I am still on version.

3 Replies

AD Administrator Syncfusion Team May 13, 2005 11:27 AM UTC

So, youwant to edit the dropdowns, allowing your user to change values and add new values in the dropdown? If so, then newer releases of our GridGroupingControl support this directly with you having to do your own dropdown celltype. In 2051, you would have to drop a grid of some type to implement this. If the value you are moving to the cell in the main grid is produced by summing the values in the dropdown, then your choice is to use a gridgroupingcontrol with a summary row, or to use some other grid and sum things yourself. Why do you have reservations about how you currently have it working? Why do you want to do it differently?

IK Igor Kashtelyan May 18, 2005 04:47 PM UTC

Thanks Clay, The thing is that currently we have an existing gdbg. The new functionality under certain conditions should prevent users from entering values directly. Instead, the user will be presented with a name/value pair in the dropdown control and so the user should enter data into the value cells. Upon completion, the sum should be automatically calculated into main gdbd''s cell. Currently, I have implemented a dropdown as a virtual gridgrouping control, but have a problem - when clicking on a dropdown button, I get a null reference exception. Also, I am not certain when is the best point to fill the data into the dropdown group control. I do not want to do that on load, as each cell has its won set of values and this will take too long, not to mention that not all rows will have a drop-down... Could you please advise on above? I have upgraded the version and currently run on v3.0.1.0 Thanks.

AD Administrator Syncfusion Team May 18, 2005 06:26 PM UTC

As in the other post, try catching the gridDataBoundGrid''''s CurrentCellShowingDropDown event, and then fill the other grid at that point. Can you post a call stack of the exception? If you can upload a sample project showing the problem, we can try to suggest something.

Live Chat Icon For mobile
Up arrow icon