I have the following grid:
<
ig:WebDataGrid
ID
=
"webdgRequest"
runat
"server"
AutoGenerateColumns
"False"
Width
"100%"
Height
"500px"
StyleSetName
"Office2007Silver"
DataKeyFields
"ID"
EnableDataViewState
"True"
oninitializerow
"webdgRequest_InitializeRow"
>
Columns
ig:TemplateDataField
Key
"RowNumber"
"50px"
Header
Text
/>
ItemTemplate
asp:Label
"lblID"
Text='<%#Eval("RowNumber") %>'></
</
"checkField"
HeaderTemplate
div
style
"text-align: center;"
asp:CheckBox
"chkDeleted"
ig:BoundDataField
DataFieldName
"Comments"
"100px"
"Request Type"
"80px"
"UserName"
"Requested By"
"MakerDate"
"Requested On"
"DepartmentName"
"Department"
"Region"
"Location"
"Branch"
"AccountName"
"AccountNumber"
"ClientName"
"Requested Reporting Group"
"ClientGroups"
"Linked Reporting Groups"
"AccountID"
Hidden
"0px"
"UserID"
"true"
CssClass
"hideMyColumn"
"CheckerPermission"
Behaviors
ig:EditingCore
ig:CellEditing
Enabled
ColumnSettings
ig:EditingColumnSetting
ColumnKey
ReadOnly
ig:Sorting
ig:Selection
ColumnSelectType
"Single"
RowSelectType
ig:ColumnResizing
ig:Filtering
ig:RowSelectors
ig:Activation
ig:VirtualScrolling
I add the following functionaility to the checkbox within the InitialIzeRow handler
protected
void
webdgRequest_InitializeRow(
object
sender, Infragistics.Web.UI.GridControls.RowEventArgs e)
{
string
Id = ((Label)e.Row.Items[0].FindControl(
)).Text;
var chkBox = (CheckBox)e.Row.Items[1].FindControl(
);
if
(chkBox !=
null
&& Id !=
)
chkBox.Attributes.Add(
"onClick"
,
"return getClickedRow("
+ Id +
",'"
+ chkBox.ClientID +
"');"
}
Which in turn calls the following Javascript each time the check box state is changed:
script
type
"text/javascript"
function getObj(name) {
if (document.getElementById) // test if browser supports document.getElementById
this.obj = document.getElementById(name);
this.style = document.getElementById(name).style;
else if (document.all) // test if browser supports document.all
this.obj = document.all[name];
this.style = document.all[name].style;
else if (document.layers) // test if browser supports document.layers
this.obj = document.layers[name];
this.style = document.layers[name].style;
function getClickedRow(rowClicked, checkBoxID) {
var params;
var clientSideCheckBoxID = new getObj(checkBoxID);
if (clientSideCheckBoxID.obj.checked == true) {
params = rowClicked + '-' + 'checked'; // We can split this string on the server side to determine how we need to update the data source
__doPostBack('<%= webdgRequest.ClientID %>', params);
} else {
params = rowClicked + '-' + 'unchecked'; // We can split this string on the server side to determine how we need to update the data source
However when I try to do the post back, I keep getting PageRequestManagerServerErrorException. What could be causing this? Kind Regards