or
' the nestedDatasource is a dataset with a relation added
If
NestedTable
Then
RadGrid1.EnableLinqExpressions =
False
RadGrid1.ClientSettings.AllowExpandCollapse =
True
RadGrid1.MasterTableView.HierarchyDefaultExpanded =
False
RadGrid1.MasterTableView.HierarchyLoadMode = GridChildLoadMode.ServerBind
RadGrid1.MasterTableView.SelfHierarchySettings.KeyName = NestedTableKey
RadGrid1.MasterTableView.SelfHierarchySettings.ParentKeyName = NestedTableParentKey
' RadGrid1.MasterTableView.SelfHierarchySettings.MaximumDepth = 0
Dim
expandCollapseColumn
As
New
GridExpandColumn
expandCollapseColumn.HeaderStyle.Width = 20
RadGrid1.MasterTableView.Columns.Add(expandCollapseColumn)
RadGrid1.MasterTableView.ShowHeader =
False
RadGrid1.MasterTableView.HierarchyDefaultExpanded =
False
Datasource = NestedDatasource.Tables(0)
End
If
....
'create the columns dynamicaly from the dataset
boundColumn =
New
GridBoundColumn
RadGrid1.MasterTableView.Columns.Add(boundColumn)
boundColumn.DataField = column.ColumnName
boundColumn.HeaderText = column.ColumnName.Replace(
"_"
,
" "
).ToLower()
If
colDataType =
"int32"
Then
boundColumn.DataFormatString =
"<nobr>{0:N0}</nobr>"
boundColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center
.....
.....
Protected
Sub
RadGrid1_NeedDataSource(
ByVal
source
As
Object
,
ByVal
e
As
Telerik.Web.UI.GridNeedDataSourceEventArgs)
Handles
RadGrid1.NeedDataSource
If
NestedTable
Then
RadGrid1.MasterTableView.VirtualItemCount = NestedDatasource.Tables(0).Rows.Count()
RadGrid1.DataSource = NestedDatasource
RadGrid1.Visible =
True
Else
If
Not
Datasource
Is
Nothing
Then
RadGrid1.MasterTableView.VirtualItemCount = Datasource.Rows.Count()
RadGrid1.DataSource = Datasource
RadGrid1.Visible =
True
Else
RadGrid1.Visible =
False
Exit
Sub
End
If
End
If
End
Sub
function
responseEnd(sender, eventArgs) {
alert('Response complete');
}
This execute when the request END, that's OK, But how i get the return if i want to return some STRING ?
Line: 6
Error: '_events' is null or not an object
nData.KnowledgeManagement.Web.UI.Searcher.prototype =
{
initialize:
function
() {
nData.KnowledgeManagement.Web.UI.Searcher.callBaseMethod(
this
,
'initialize'
);
// SearchTextBox
this
._searchTextBox = $find(
this
.get_id() +
'_searchTextBox'
);
this
._keyUpDelegate = Function.createDelegate(
this
,
this
._keyUp);
$addHandler(
this
._searchTextBox._textBoxElement,
"keyup"
,
this
._keyUpDelegate);
// XmlHttpPanel
this
._xmlHttpPanel = $find(
this
.get_id() +
'_xmlHttpPanel'
);
this
._xmlHttpPanel._searcher =
this
;
this
._xmlHttpPanel.add_responseEnding(
this
._xmlHttpPanelResponseEnding);
this
._xmlHttpPanel.add_responseError(
this
._clientResponseError);
},
dispose:
function
() {
nData.KnowledgeManagement.Web.UI.Searcher.callBaseMethod(
this
,
'dispose'
);
if
(
this
._keyUpDelegate) {
$removeHandler(
this
._searchTextBox._textBoxElement,
"keyup"
,
this
._keyUpDelegate);
this
._keyUpDelegate =
null
;
}
this
._xmlHttpPanel.remove_responseEnding(
this
._xmlHttpPanelResponseEnding);
this
._xmlHttpPanel.remove_responseError(
this
._clientResponseError);
},
_keyUp:
function
() {
this
._search(
this
._searchTextBox._textBoxElement.value);
},
...
}