Hi,
I'am trying to add a new row to the child grid and I get "Element cannot be undefined" exception.
1. WebHierarchicalDataGrid has 2 levels of data.
2. BatchUpdating is on. (it's important, if it is off - works fine)
3. AddingRow behaviour has been added.
4. I enter some values for a new row and press 'Enter' after that the error appears
Please check is it a real bug or I do something wrong.
Thanks,
Alexander
Hi Alexander,
I've submitted bug 101084 for this issue of not finding controls in the user control on their regular id. This should most likely be in the next Service Release. If you require a fix sooner, you could request an untested build from Developer Support.
regards,David Young
If I set controlID = txtSubRuleId, the substitution {ClientID} is null. (as for SetValueJavaScript, as for GetValueJavaScript)
I am sure it is because control txtSubRuleId cannot be found on the server side if it is located in the UserControl.
Am I right that it is uncommon scenario to use UserControl as template?
It is very convenient because it reduces the amount of code of one page, and makes code more readable.
I think you should have the control ID set to txtSubRuleId and then you can get rid of the +'_txtSubRuleId' in the getter and setter javaScript. I've never tried with a user control, but all of the controls in it should end up in our TemplateContainer at run time to find the control with that id. But I'm not sure if it would work at design time for the designers. So you may have to explicitly type this into the aspx.
-Dave
Hi, David!
Thank you.
I've download the lates Service Release, and the problem has come away.
Could you help me with following task:
I want to use UserControl as RowEditingTemplate.
All works fine, the control is shown correctly but there is a problem with data binding, I've done it as shown below, but I don't like it, maybe you could suggest something better:
<ig:RowEditingTemplate > <ClientBindings> <ig:RowEditingClientBinding ColumnKey="SubRuleId" ControlID="subRuleTemplate" GetValueJavaScript="$get({ClientID}+'_txtSubRuleId'). SetValueJavaScript="$get({ClientID}+'_txtSubRuleId').value = {value};" /></ClientBindings><Template> <controls:SubRuleTempate runat="server" ID="subRuleTemplate"></controls:SubRuleTempate> </Template></ig:RowEditingTemplate>
SubRuleTemplate - it is UserControl. it has asp:TextBox with id = txtSubRuleId
I dont like the way I am getting to the edit controls located on UserControl:
$get({ClientID}+'_txtSubRuleId')
The second problem that I can set ControlID = subRuleTemplate only for one RowEditingClientBinding,otherwise I get error:
An EditRowClientBinding linked to the template control with the ControlID = subruleTemplate has already been found. Each column only supports a single binding object to a single editor.
Alexande
Obviously, your example sounds very simple. But some key points include what browser you are seeing this in, what level you're adding the row in, what your grid actually looks like (the columns), and what version you're running. If you don't have the latest Service Release, I would suggest downloading it. I tried with the latest 11.2 and got no exception in either the parent or child band.If you're able to attach a sample here, that would be great.