Replies
I just wanted to let you know that I now have the grid working. Thanks for the help!
Alex,
This has helped. I am starting to make some progress with this.
Thanks,
Thank you Alex.
I tried that by commenting out sections of code until the error went away. Now I have another error "Error: Object doesn't support this property or method" on line 57. I have a suspicion as to what it might be but IE's debugger is locking up on me today. I'll have an our help desk look at it.
In the meantime, here is the code I am left with:
function wdgEmployeeDeductions_RowSelectionChanged(wdgEmployeeDeductions, eventArgs)
{
var grid = getGrid();
var behav = grid.get_behaviors();
var selection = behav.get_selection();
///<summary>
///
///</summary>
///<param name="sender" type="Infragistics.Web.UI.WebDataGrid"></param>
///<param name="eventArgs" type="Infragistics.Web.UI.RowSelectionChangedEventArgs"></param>
//Add code to handle your event here.
var selectedRow = selection.get_selectedRows();
var row = selectedRow.getItem(0) ;
var lbldeduction = $get('<%#lbldeduction.ClientID%>');
var lblrateamount = $get('<%#lblrateamount.ClientID%>');
var lblfrequency = $get('<%#lblfrequency.ClientID%>');
var lblgoal = $get('<%#lblgoal.ClientID%>');
var lblpaid = $get('<%#lblpaid.ClientID%>');
var lblminimum = $get('<%#lblminimum.ClientID%>');
var lblmaximum = $get('<%#lblmaximum.ClientID%>');
var lbllasttaken = $get('<%#lbllasttaken.ClientID%>');
var lblytdmax = $get('<%#lblytdmax.ClientID%>');
var lblstartdate = $get('<%#lblstartdate.ClientID%>');
var lblenddate = $get('<%#lblenddate.ClientID%>');
var lblnotes = $get('<%#lblnotes.ClientID%>');
var lblcc1 = $get('<%#lblcc1.ClientID%>');
var lblcc2 = $get('<%#lblcc2.ClientID%>');
var lblcc3 = $get('<%#lblcc3.ClientID%>');
var lblcc4 = $get('<%#lblcc4.ClientID%>');
var lblcc5 = $get('<%#lblcc5.ClientID%>');
var lbljobcode = $get('<%#lbljobcode.ClientID%>');
var cell = row.get_cell(16) ;
var value = cell.get_Value();
if (value != null)
{
document.getElementById('lbldeduction').innerHTML=value;
}
else
{
document.getElementById('lbldeduction').innerHTML="";
}
My suspicion is that cell.get_Value() is not valid, although I am not sure why that is.
Any ideas?
Hello Alex,
I tried adding the sender and eventArgs to the function:
function wdgEmployeeDeductions_RowSelectionChanged(wdgEmployeeDeductions, eventArgs)
{…}
The function is inside a <script type="text/javascript" id="igClientScript2"> </script> set. The getGrid() function is inside its own set of tags. Both are in the <head id="Head1" runat="server"> section.
I have tried it with one set of script tags also.
The ASP for the webdatagrid behaviors is below:
<ig:WebDataGrid ID="wdgEmployeeDeductions" runat="server" CssClass="GridBorderStyle"
Height="104px" Width="778px" AutoGenerateColumns="False">
<Behaviors>
<ig:RowSelectors>
</ig:RowSelectors>
<ig:Selection CellClickAction="Row" CellSelectType="None" RowSelectType="Single">
<SelectionClientEvents RowSelectionChanged="wdgEmployeeDeductions_RowSelectionChanged" />
</ig:Selection>
</Behaviors>
The error occurs as the grid on the page is loading. When you clear the error, the page completes loading and clicking on a row in the grid does nothing. Right now I am just trying to get it working in IE 8.0.7601.17514.
We are using VS2005, not 2010.
I have viewed the videos and gone through the forums looking for resolutions and have yet to find one.
Thanking you in advance for your continued assistance.