Hi,
I have a multiband grid with each band having its own row edit template. I've added 2 buttons on the template which will allow a user to traverse between the bands without having to closeout and reopen the row edit template again. However, when moving between bands since I am manually closing and reopening the new band's template, the new template opens up in the default position.
I would like to provide the user with a seamless transition when moving between bands. To this end, I tried to capture the X & Y coordinates of the row edit template on closing and tried to set it on the template again before it is displayed again.
For some reason though this code always seems to return the X and Y position as 0.
Here is my code, any help is much appreciated-
Private Sub ugVersion_BeforeRowEditTemplateClosed(sender As Object, e As BeforeRowEditTemplateClosedEventArgs) Handles ugVersion.BeforeRowEditTemplateClosed x_location = e.Template.Location.X y_location = e.Template.Location.Y End Sub
Private Sub ugVersion_BeforeRowEditTemplateDisplayed(sender As Object, e As BeforeRowEditTemplateDisplayedEventArgs) Handles ugVersion.BeforeRowEditTemplateDisplayed e.Location = New System.Drawing.Point(x_location, y_location)
EnableDisableCVTemplateControls(True) End Sub
Hi Kuldeep,
The UltraGridRowEditTemplate is nested in another control. You can get the Location of the Template's Parent instead and this should work.
Please let me know if you have any questions.
Hi Mike,
Thanks that worked!!!
For anyone who's interested the code that finally worked for me was -
Private Sub ugVersion_BeforeRowEditTemplateClosed(sender As Object, e As BeforeRowEditTemplateClosedEventArgs) Handles ugVersion.BeforeRowEditTemplateClosed x_location = e.Template.Parent.Location.X y_location = e.Template.Parent.Location.Y End Sub
Thanks,
Karthik Subramanian