AZZA-KHAMEES
asked on
0x800a138f - JavaScript runtime error: Unable to get property 'value' of undefined or null reference
Hi Experts
i am using Obout component Master and Detail grid, and its working perfectly in ASP.net Web site, recently i created ASP.net Web Application using the same functionality from web site, and its working when i try to add record in the master grid, but when i try to add a record in the detail grid i am getting an error
when adding record in in detail grid i am taking CPRNo from grid as a default number using this javascrip function
the content of aspx page
note that i am using Foreign Key CPRNo
i tried to contact Obout support team but i am not getting any reply, i think this company stooped
Obout
please help me
i am using Obout component Master and Detail grid, and its working perfectly in ASP.net Web site, recently i created ASP.net Web Application using the same functionality from web site, and its working when i try to add record in the master grid, but when i try to add a record in the detail grid i am getting an error
0x800a138f - JavaScript runtime error: Unable to get property 'value' of undefined or null reference
when adding record in in detail grid i am taking CPRNo from grid as a default number using this javascrip function
function onPopulateControls(sender, record) {
record.cprno = sender.ForeignKeys.cprno.value;
return record;
}
this function was working in ASP.Net web site but ASP.net web application its giving me an errorthe content of aspx page
<Obout:Grid ID="Grid1" runat="server" DataSourceID="SqlDataSource1" >
<MasterDetailSettings LoadingMode="OnCallback" ShowEmptyDetails="true"/>
<DetailGrids>
<Obout:DetailGrid ID="Grid2" runat="server" DataSourceID="SqlDataSource2" ForeignKeys="cprno" AutoGenerateColumns="false" >
<ClientSideEvents ExposeSender="true" OnClientPopulateControls="onPopulateControls" />
<Columns>
<obout:Column DataField="cprno" HeaderText="cprno" ReadOnly="true" Visible="false"></obout:Column>
<obout:Column DataField="CarNo" HeaderText="CarNo" Width="100"></obout:Column>
<obout:Column DataField="CarColor" HeaderText="CarColor" Width="100"></obout:Column>
<obout:Column DataField="Company" HeaderText="Company" Width="200"></obout:Column>
<obout:Column DataField="" HeaderText="" AllowEdit="true" AllowDelete="true" Width="100" Align="center"></obout:Column>
</Columns>
<MasterDetailSettings LoadingMode="OnCallback" />
</Obout:DetailGrid>
</DetailGrids>
</Obout:Grid>
note that i am using Foreign Key CPRNo
i tried to contact Obout support team but i am not getting any reply, i think this company stooped
Obout
please help me
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I wonder if it is case-sensitive, and it should be CPRNo instead of cprno...
ASKER
no its not
i tried to remove .Value and it work but it return empty value
my major question is, why that the application was working fine when it was ASP.net web site and when i changed it to ASP.net web application i am getting this error?
i tried to remove .Value and it work but it return empty value
my major question is, why that the application was working fine when it was ASP.net web site and when i changed it to ASP.net web application i am getting this error?
That is the question of the day...how did you change from Web Site model to Web Application model? Did the process change anything in the web.config?
ASKER
i created a new web application and then i modified the pages by adding the same functionality.
What version of Visual Studio are you using? There is a menu option for converting a Web Site project to a Web Application project.
ASKER
i am using Visual studio 2012
I believe that 2012 should have that option. Do you still have the Web Site model code base?
ASKER
the null is the value of cprno
Open in new window