Hi,
I am getting this strange issue . I have a grid with three columns . The first column is a field name , the next is operator and the last column is condition. Now , i have a button to edit the row . On click of this button , the second column (operator )should turn into a drop down which is happening. Some of the values in the drop down are equals , not equals and includes. Now the initial condition of the row (before click of edit , field = x , oprerator = equals , condtion = y). On click of edit , the second column turns into a dropdown with the current value (which is equals ) selected and the third column turns into a editable user control (here we are using usercontrol - we have done it using the editorcomponent and renderingcomponet of ultracontrolcontainer). Now the problem is , when the screen loads (after the edit click) , the third column which is a usercontrol shows nothing. Only when we click on the cell (of the third column) , it shows the value and when we go out of it (we click the second column cell again) it again becomes blank. How we have used the usercontrol - we have created a user control class say Z with a ultracomboeditor in it . We have created two instances of Z and assigend one each to editorcomponent and rendering component respectively,
Apart from this we have another issue. The usercontrol doesnot fit properly inside the grid column. Please help asap. It would be great if smbdy can include a code example.Thanks
Hi..Can anyone help...a bit urgent..
Hello RC,
Could you please try to attach if possible a small sample project reproducing the above mentioned issue, I will be happy to take a look at it?
If you like, you could give me specific requirements in order for me to create a sample project for you.
How do you want me to proceed with this?
As I mentioned in one of my earlier replies, there are samples of using UltraControlContainerEditor included in NetAdvantage. If you installed the samples when you installed NetAdvantage, they are already on your hard drive. If not, then you can install them the same way you installed NetAdvantage.
In any case, what you are trying to do here is going to be a little tricky. It's very hard for me to offer you any useful advice without a lot more information, like the structure of your "Filter" object.
The grid in the samples you posted here are not using a custom filter object in the grid cell, they are using a List<T>. So is that what you are actually using? Or is it some custom object?
If all you need are two values, a "to" and a "from" that specify a range, then it would seem to make sense for your grid column to contain a custom object with two properties on it. Using a list is very strange, because a list could have 0, 1, or more items in it, and you are depending on their being only 2. A List will also make things difficult for you because it will be more complicated to track changes to the list, whereas a custom object will be easier to track.
In any case, does it matter to you if the objects are persisted? For example, if the user goes into a cell in the grid and changes the "to" field, but leaves the "from" field alone, does it matter if you change the "form" setting in the existing object as opposed to simply creating a new Filter object with the new properties? I ask, because the latter approach will make things easier for you because setting the grid cell's Value to a new object is something the grid can track, whereas changing a property on an object in the the cell is not.
Hi mike/borris ,
Thansk for your reply. In our app , we are create filters that we need to apply on data. Occasionally we need to edit a filter also.Filter data areloaded within the grid. So for example , salary ranges between 10000 and 20000. If i were to edit this filter , i have to provide user with an environment where he can specify the range. So , for this i need two text boxes , one will have the "from"(10000 for ex) value , the other will have the "to" value (20000) for ex. So showing this two boxes inside a grid column is not possible. In that case we need to wrap them in a usercontrol and show the usercontrol inside the grid. Likewise there are various other requirements as well. If it was associated with a simple dropdown , we would not have used usercontrol in the first place. The problem however is, that , since no simple & downloadable demo of looading a usercontrol grid is avialble on the web , we are just not hitting the right patch. It would be helpful , if you can direct me to a downloadable code example (if any) of loading the usercontrol inside the grid. I looked at the code sample page. But , could not relate certain things as it could not be debugged. If i can get a doenloadable sample , it will be really helpful.
Hi RC,
Is what you want a simple dropdown in the cell? Your scenario and project seem to be complex. If you like a software development, code review or implementation planning I can guide you to our Consulting Services Team. Please take a look at the following page, especially at the bottom:
http://es.infragistics.com/help/support-policies/.
I'm not sure what you are trying to do there, exactly. Since your UserControl has no Value property, the UltraControlContainerEditor is falling back to using Text. But the Text that is being applied here it the Value of the grid cell, which in this case is a list. So... I'm afraid I don't see how that's supposed to work. Are you trying to use the Value in the grid cell as the list to display on the dropdown of your UserControl? If so, then how would the UserControl know which value is currently selected?
I think if you override the Text property on your UserControl and put a breakpoint in the setter for the property, it might make things clearer to you about what's going on here. The value you selected is lost when you leave the cell, because you are not storing that value anywhere.
RC said:Instead of suggesting the chnages , it will be really really helpful , if you can make the changes in this uploaded sample and upload it back from ur side.
For small changes, I'd be happy to do that, and I agree that it would be more helpful. The problem is that the changes that were required here are not small and my time limited. Also, the way you have things set up in this case doesn't really make it clear what you are trying to do, exactly.
So far, it looks like you just want to put a dropdown list in a cell. If that's the case, you are going about it in an extremely over-complicated way. You don't need a ControlContainerEditor for that. Of course, maybe there is more to it and this is just a small sample without the true complexity of your application.
Sorry forgot to attach the code. Attached it now.