I am using 2 RadButtons to search for a (Host or Victim) student then load 2 Radgrids via ajax.
I am pre populating the search criteria txtFirstName with "Cor" and txtLastName with "A".
This returns 5 rows from my DB.
When the Radgrids bind the ajax fires correctly and I can compare the 2 Students below.
In the Other radgrids that hold additional information.
If I change my search criteria to something else that will return more rows to the RadGrid.
The ajax is only firing for the first 5 rows.
If I swap out my 2 search RadButtons with regular ASP:Buttons and fire a post back to bind the 2 SearchRadGrids then all the rows are able to fire the ajax correctly.
any help is appreciated? Thanks
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
/>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
DefaultLoadingPanelID
=
"RadAjaxLoadingPanel1"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"btnHostSearch"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"hostSearchGrid"
LoadingPanelID
=
"hostSearchLoadingPanel"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"btnVictimSearch"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"victimSearchGrid"
LoadingPanelID
=
"victimSearchLoadingPanel"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"hostSearchGrid"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"hostStudentInfoGrid"
LoadingPanelID
=
"hostStudentInfoLoadingPanel"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"hostSchoolInfoGrid"
LoadingPanelID
=
"hostSchoolInfoLoadingPanel"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"hostAdmissionInfoGrid"
LoadingPanelID
=
"hostAdmissionInfoLoadingPanel"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"victimSearchGrid"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"victimStudentInfoGrid"
LoadingPanelID
=
"victimStudentInfoLoadingPanel"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"victimSchoolInfoGrid"
LoadingPanelID
=
"victimSchoolInfoLoadingPanel"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"victimAdmissionInfoGrid"
LoadingPanelID
=
"victimAdmissionInfoLoadingPanel"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<%--Loading Panels--%>
<
telerik:RadAjaxLoadingPanel
ID
=
"hostSearchLoadingPanel"
runat
=
"server"
></
telerik:RadAjaxLoadingPanel
>
<
telerik:RadAjaxLoadingPanel
ID
=
"victimSearchLoadingPanel"
runat
=
"server"
></
telerik:RadAjaxLoadingPanel
>
<
telerik:RadAjaxLoadingPanel
ID
=
"hostStudentInfoLoadingPanel"
runat
=
"server"
></
telerik:RadAjaxLoadingPanel
>
<
telerik:RadAjaxLoadingPanel
ID
=
"hostSchoolInfoLoadingPanel"
runat
=
"server"
></
telerik:RadAjaxLoadingPanel
>
<
telerik:RadAjaxLoadingPanel
ID
=
"hostAdmissionInfoLoadingPanel"
runat
=
"server"
></
telerik:RadAjaxLoadingPanel
>
<
telerik:RadAjaxLoadingPanel
ID
=
"victimStudentInfoLoadingPanel"
runat
=
"server"
></
telerik:RadAjaxLoadingPanel
>
<
telerik:RadAjaxLoadingPanel
ID
=
"victimSchoolInfoLoadingPanel"
runat
=
"server"
></
telerik:RadAjaxLoadingPanel
>
<
telerik:RadAjaxLoadingPanel
ID
=
"victimAdmissionInfoLoadingPanel"
runat
=
"server"
></
telerik:RadAjaxLoadingPanel
>
<
telerik:RadFormDecorator
ID
=
"FormDecorator1"
runat
=
"server"
DecoratedControls
=
"Buttons"
>
</
telerik:RadFormDecorator
>
<
br
/>
<
telerik:RadAjaxPanel
ID
=
"RadAjaxPanel1"
runat
=
"server"
>
<
asp:Label
Text
=
"First Name:"
runat
=
"server"
></
asp:Label
>
<
asp:TextBox
ID
=
"txtFirstName"
runat
=
"server"
></
asp:TextBox
>
<
asp:Label
ID
=
"Label1"
Text
=
"Last Name:"
runat
=
"server"
></
asp:Label
>
<
asp:TextBox
ID
=
"txtLastName"
runat
=
"server"
></
asp:TextBox
>
<
telerik:RadButton
ID
=
"btnHostSearch"
runat
=
"server"
OnClick
=
"btnHostSearch_Click"
Font-Underline
=
"false"
Text
=
"Search for Host"
>
<
Icon
PrimaryIconCssClass
=
"rbSearch"
PrimaryIconLeft
=
"4"
PrimaryIconTop
=
"4"
/>
</
telerik:RadButton
>
<
telerik:RadButton
ID
=
"btnVictimSearch"
runat
=
"server"
OnClick
=
"btnVictimSearch_Click"
Font-Underline
=
"false"
Text
=
"Search for Victim"
>
<
Icon
PrimaryIconCssClass
=
"rbSearch"
PrimaryIconLeft
=
"4"
PrimaryIconTop
=
"4"
/>
</
telerik:RadButton
>
</
telerik:RadAjaxPanel
>
<
br
/>
<
h5
><%--Host Students--%></
h5
>
<
hr
/>
<
telerik:RadGrid
ID
=
"hostSearchGrid"
runat
=
"server"
AllowFilteringByColumn
=
"false"
AllowPaging
=
"false"
AllowSorting
=
"false"
GridLines
=
"None"
OnItemCommand
=
"hostSearchGrid_Click_ItemCommand"
OnNeedDataSource
=
"hostSearchGrid_NeedDataSource"
>
<
MasterTableView
AutoGenerateColumns
=
"true"
DataKeyNames
=
"StudentID"
>
<
Columns
>
<
telerik:GridTemplateColumn
UniqueName
=
"TemplateColumn1"
HeaderText
=
"Select"
>
<
ItemStyle
HorizontalAlign
=
"Center"
/>
<
ItemTemplate
>
<
asp:ImageButton
ID
=
"ibtnAddToCart"
CommandName
=
"Compare"
runat
=
"server"
Height
=
25px
Width
=
25px
ImageUrl
=
"~/_Images/circle-up.png"
AlternateText
=
"Select"
/>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
<
telerik:RadGrid
ID
=
"victimSearchGrid"
runat
=
"server"
AllowFilteringByColumn
=
"false"
AllowPaging
=
"false"
AllowSorting
=
"false"
GridLines
=
"None"
OnItemCommand
=
"victimSearchGrid_Click_ItemCommand"
OnNeedDataSource
=
"victimSearchGrid_NeedDataSource"
>
<
MasterTableView
AutoGenerateColumns
=
"true"
DataKeyNames
=
"StudentID"
>
<
Columns
>
<
telerik:GridTemplateColumn
UniqueName
=
"TemplateColumn1"
HeaderText
=
"Select"
AllowFiltering
=
"false"
>
<
ItemStyle
HorizontalAlign
=
"Center"
/>
<
ItemTemplate
>
<
asp:ImageButton
ID
=
"ibtnAddToCart"
runat
=
"server"
Height
=
25px
Width
=
25px
ImageUrl
=
"~/_Images/circle-up.png"
AlternateText
=
"Select"
CommandName
=
"Compare"
/>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
<
br
/>
<
br
/>
<
h5
><%--Host Students--%></
h5
>
<
hr
/>
<
telerik:RadTabStrip
ID
=
"RadTabStrip1"
runat
=
"server"
Skin
=
"Outlook"
MultiPageID
=
"RadMultiPage1"
SelectedIndex
=
"0"
CssClass
=
"tabStrip"
>
<
Tabs
>
<
telerik:RadTab
Text
=
"Student Information"
>
</
telerik:RadTab
>
<
telerik:RadTab
Text
=
"School Information"
>
</
telerik:RadTab
>
<
telerik:RadTab
Text
=
"Admission Information"
>
</
telerik:RadTab
>
</
Tabs
>
</
telerik:RadTabStrip
>
<
telerik:RadMultiPage
ID
=
"RadMultiPage1"
runat
=
"server"
SelectedIndex
=
"0"
CssClass
=
"multiPage"
>
<
telerik:RadPageView
ID
=
"RadPageView1"
runat
=
"server"
>
<
telerik:RadGrid
ID
=
"hostStudentInfoGrid"
runat
=
"server"
AllowFilteringByColumn
=
"false"
AllowPaging
=
"false"
ShowFooter
=
"true"
AllowSorting
=
"false"
GridLines
=
"None"
PageSize
=
"5"
>
<
MasterTableView
AutoGenerateColumns
=
"True"
DataKeyNames
=
"StudentName"
>
<
NoRecordsTemplate
>
No Records Found.
</
NoRecordsTemplate
>
<
Columns
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
<
telerik:RadGrid
ID
=
"victimStudentInfoGrid"
runat
=
"server"
AllowFilteringByColumn
=
"false"
AllowPaging
=
"false"
ShowFooter
=
"true"
AllowSorting
=
"false"
GridLines
=
"None"
PageSize
=
"5"
>
<
MasterTableView
AutoGenerateColumns
=
"True"
DataKeyNames
=
"StudentName"
>
<
NoRecordsTemplate
>
No Records Found.
</
NoRecordsTemplate
>
<
Columns
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
</
telerik:RadPageView
>
<
telerik:RadPageView
ID
=
"RadPageView2"
runat
=
"server"
CssClass
=
"pageViewEducation"
>
<
telerik:RadGrid
ID
=
"hostSchoolInfoGrid"
runat
=
"server"
AllowFilteringByColumn
=
"false"
AllowPaging
=
"false"
ShowFooter
=
"true"
AllowSorting
=
"false"
GridLines
=
"None"
PageSize
=
"5"
>
<
MasterTableView
AutoGenerateColumns
=
"True"
DataKeyNames
=
"StudentName"
>
<
NoRecordsTemplate
>
No Records Found.
</
NoRecordsTemplate
>
<
Columns
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
<
telerik:RadGrid
ID
=
"victimSchoolInfoGrid"
runat
=
"server"
AllowFilteringByColumn
=
"false"
AllowPaging
=
"false"
ShowFooter
=
"true"
AllowSorting
=
"false"
GridLines
=
"None"
PageSize
=
"5"
>
<
MasterTableView
AutoGenerateColumns
=
"True"
DataKeyNames
=
"StudentName"
>
<
NoRecordsTemplate
>
No Records Found.
</
NoRecordsTemplate
>
<
Columns
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
</
telerik:RadPageView
>
<
telerik:RadPageView
ID
=
"RadPageView3"
runat
=
"server"
>
<
telerik:RadGrid
ID
=
"hostAdmissionInfoGrid"
runat
=
"server"
AllowFilteringByColumn
=
"false"
AllowPaging
=
"false"
ShowFooter
=
"true"
AllowSorting
=
"false"
GridLines
=
"None"
PageSize
=
"5"
>
<
MasterTableView
AutoGenerateColumns
=
"True"
DataKeyNames
=
"StudentName"
>
<
NoRecordsTemplate
>
No Records Found.
</
NoRecordsTemplate
>
<
Columns
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
<
telerik:RadGrid
ID
=
"victimAdmissionInfoGrid"
runat
=
"server"
AllowFilteringByColumn
=
"false"
AllowPaging
=
"false"
ShowFooter
=
"true"
AllowSorting
=
"false"
GridLines
=
"None"
PageSize
=
"5"
>
<
MasterTableView
AutoGenerateColumns
=
"True"
DataKeyNames
=
"StudentName"
>
<
NoRecordsTemplate
>
No Records Found.
</
NoRecordsTemplate
>
<
Columns
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
</
telerik:RadPageView
>
</
telerik:RadMultiPage
>
'General Controls
Protected txtFirstName, txtLastName As TextBox
Protected RadAjaxManager1 As RadAjaxManager
Protected WithEvents btnHostSearch, btnVictimSearch As RadButton
Protected WithEvents Button1 As Button
Protected WithEvents hostStudentInfoLoadingPanel, hostSchoolInfoLoadingPanel, hostAdmissionInfoLoadingPanel As RadAjaxLoadingPanel
' Host Grids
Protected WithEvents hostSearchGrid, hostStudentInfoGrid, hostSchoolInfoGrid, hostAdmissionInfoGrid As RadGrid
'Victim Grids
Protected WithEvents victimSearchGrid, victimStudentInfoGrid, victimSchoolInfoGrid, victimAdmissionInfoGrid As RadGrid
Public Property HostStudentsData() As DataTable
Get
Dim obj As Object = Me.Session("HostStudentsData")
If obj IsNot Nothing Then
Return DirectCast(obj, DataTable)
End If
Dim _hostStudentData As New DataTable()
Dim studentMerge As New MCOECN.DASL.BusinessLogic.SIS.StudentMerge.Merge()
_hostStudentData = studentMerge.GetStudentInfo(txtLastName.Text + "%", txtFirstName.Text + "%", CurrentContext.WorkingSchool.DistrictId)
Me.Session("HostStudentsData") = _hostStudentData
Return _hostStudentData
End Get
Set(value As DataTable)
Me.Session("HostStudentsData") = value
End Set
End Property
Public Property VictimStudentsData() As DataTable
Get
Dim obj As Object = Me.Session("VictimStudentsData")
If obj IsNot Nothing Then
Return DirectCast(obj, DataTable)
End If
Dim _victimStudentData As New DataTable()
Dim studentMerge As New MCOECN.DASL.BusinessLogic.SIS.StudentMerge.Merge()
_victimStudentData = studentMerge.GetStudentInfo(txtLastName.Text + "%", txtFirstName.Text + "%", CurrentContext.WorkingSchool.DistrictId)
Me.Session("VictimStudentsData") = _victimStudentData
Return _victimStudentData
End Get
Set(value As DataTable)
Me.Session("VictimStudentsData") = value
End Set
End Property
Protected Sub btnHostSearch_Click(sender As Object, e As EventArgs) Handles Button1.Click
HostStudentsData = Nothing
hostSearchGrid.Visible = True
Dim dt As DataTable = HostStudentsData
dt.AcceptChanges()
hostSearchGrid.DataSource = dt
hostSearchGrid.DataBind()
End Sub
Protected Sub btnVictimSearch_Click(sender As Object, e As EventArgs)
VictimStudentsData = Nothing
victimSearchGrid.Visible = True
victimSearchGrid.DataSource = VictimStudentsData
victimSearchGrid.DataBind()
End Sub
Protected Sub hostSearchGrid_NeedDataSource(ByVal source As Object, ByVal e As GridNeedDataSourceEventArgs)
Dim HostSearchStudents As DataTable = HostStudentsData
hostSearchGrid.DataSource = HostSearchStudents
End Sub
Protected Sub victimSearchGrid_NeedDataSource(ByVal source As Object, ByVal e As GridNeedDataSourceEventArgs)
Dim VictimSearchStudents As DataTable = VictimStudentsData
victimSearchGrid.DataSource = VictimSearchStudents
End Sub
Protected Sub hostSearchGrid_Click_ItemCommand(ByVal source As Object, ByVal e As GridCommandEventArgs)
If e.CommandName = "Compare" Then
Dim itemValues As IDictionary = New Dictionary(Of Object, Object)()
hostSearchGrid.Rebind()
Dim item As GridDataItem = DirectCast(e.Item, Global.Telerik.Web.UI.GridDataItem)
itemValues("StudentID") = item.OwnerTableView.DataKeyValues(item.ItemIndex)("StudentID").ToString()
Dim studentMerge As New MCOECN.DASL.BusinessLogic.SIS.StudentMerge.Merge()
Dim studentId As Guid = New Guid(itemValues("StudentID").ToString)
Dim studentDS As DataSet = studentMerge.GetStudentInfoById(studentId, CurrentContext.WorkingSchool.DistrictId)
BindHostInformation(studentDS)
End If
End Sub
Protected Sub victimSearchGrid_Click_ItemCommand(ByVal source As Object, ByVal e As GridCommandEventArgs)
If e.CommandName = "Compare" Then
Dim itemValues As IDictionary = New Dictionary(Of Object, Object)()
victimSearchGrid.Rebind()
Dim item As GridDataItem = DirectCast(e.Item, Global.Telerik.Web.UI.GridDataItem)
itemValues("StudentID") = item.OwnerTableView.DataKeyValues(item.ItemIndex)("StudentID").ToString()
Dim studentMerge As New MCOECN.DASL.BusinessLogic.SIS.StudentMerge.Merge()
Dim studentId As Guid = New Guid(itemValues("StudentID").ToString)
Dim studentDS As DataSet = studentMerge.GetStudentInfoById(studentId, CurrentContext.WorkingSchool.DistrictId)
BindVictimInformation(studentDS)
End If
End Sub
Private Sub BindHostInformation(ByVal hostStudentDS As DataSet)
hostStudentInfoGrid.DataSource = hostStudentDS.Tables(0)
hostSchoolInfoGrid.DataSource = hostStudentDS.Tables(1)
hostAdmissionInfoGrid.DataSource = hostStudentDS.Tables(2)
hostStudentInfoGrid.DataBind()
hostSchoolInfoGrid.DataBind()
hostAdmissionInfoGrid.DataBind()
End Sub
Private Sub BindVictimInformation(ByVal victimStudentDS As DataSet)
victimStudentInfoGrid.DataSource = victimStudentDS.Tables(0)
victimSchoolInfoGrid.DataSource = victimStudentDS.Tables(1)
victimAdmissionInfoGrid.DataSource = victimStudentDS.Tables(2)
victimStudentInfoGrid.DataBind()
victimSchoolInfoGrid.DataBind()
victimAdmissionInfoGrid.DataBind()
End Sub
Private Sub Page_Load1(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
txtFirstName.Text = "Cor"
txtLastName.Text = "A"
End If
End Sub
Protected Sub lvMissionSubTasks_ItemDeleting(sender As Object, e As Telerik.Web.UI.RadListViewCommandEventArgs) Handles lvMissionSubTasks.ItemDeleting
If TypeOf e.ListViewItem Is RadListViewItem Then
Dim lbl As Label = TryCast(e.ListViewItem.FindControl("lblItemID"), Label)
Dim de As New LaunchChecklist.BUS.Items
de.Delete(
CInt(lbl.Text))
'lvMissionSubTasks.DataBind()
Dim lv As RadListView = DirectCast(e.ListViewItem.FindControl("lvMissionLevel3SubTasks"), RadListView)
lv.DataBind()
End If
End Sub
<
asp:LinkButton ID="LinkButton1" OnClientClick="javascript:return confirm('Delete all selected customers?')"
runat
="server" CommandName="DeleteSelected"><img style="border:0px;vertical-align:middle;" alt="" src="Img/Delete.gif" />Delete selected customers</asp:LinkButton>
If e.CommandName = "DeleteSelected" Then
......
<
telerik:RadAjaxPanel
ID
=
"_radAjaPnl"
runat
=
"server"
Width
=
"100%"
Height
=
"100%"
>
<
telerik:RadGrid
ID
=
"_radGrid"
runat
=
"server"
ShowGroupPanel
=
"false"
ShowStatusBar
=
"false"
AllowPaging
=
"True"
AllowSorting
=
"false"
EnableEmbeddedSkins
=
"false"
Skin
=
"mscSkinOffice"
AutoGenerateColumns
=
"false"
GridLines
=
"none"
PageSize
=
"100"
OnDataBound
=
"_radGrid_DataBound"
OnItemCommand
=
"_radGrid_ItemCommand"
OnItemDataBound
=
"_radGrid_ItemDataBound"
OnUpdateCommand
=
"_radGrid_UpdateCommand"
OnNeedDataSource
=
"_radGrid_NeedDataSource"
Width
=
"880"
Visible
=
"true"
>
<
MasterTableView
EditMode
=
"PopUp"
TableLayout
=
"fixed"
AutoGenerateColumns
=
"False"
DataKeyNames
=
"Key,Document_Type,Document_No,Line_No,Document_Status,Type,Line_Formatting"
Width
=
"100%"
CommandItemDisplay
=
"TopAndBottom"
EnableHeaderContextMenu
=
"true"
>
<
Columns
>
<
telerik:GridButtonColumn
UniqueName
=
"_radGridImgbtnInsert"
ButtonType
=
"ImageButton"
CommandName
=
"InitInsert"
Text
=
"New line"
ImageUrl
=
"../site_images/_lineadd.png"
ConfirmDialogType
=
"RadWindow"
ConfirmText
=
"Do you want to insert new line?"
ConfirmTitle
=
"New line"
ConfirmDialogHeight
=
"130"
ConfirmDialogWidth
=
"300"
Groupable
=
"false"
Display
=
"false"
>
<
HeaderStyle
Width
=
"28px"
HorizontalAlign
=
"center"
/>
<
ItemStyle
Width
=
"28px"
HorizontalAlign
=
"center"
/>
</
telerik:GridButtonColumn
>
<
telerik:GridEditCommandColumn
UniqueName
=
"_radGridImgBtnUpdate"
ButtonType
=
"ImageButton"
EditImageUrl
=
"../site_images/_lineedit.png"
EditText
=
"Edit line"
Groupable
=
"false"
Display
=
"false"
>
<
HeaderStyle
Width
=
"28px"
HorizontalAlign
=
"center"
/>
<
ItemStyle
Width
=
"28px"
HorizontalAlign
=
"center"
/>
</
telerik:GridEditCommandColumn
>
<
telerik:GridButtonColumn
UniqueName
=
"_radGridImgBtnDelete"
ButtonType
=
"ImageButton"
CommandName
=
"Delete"
Text
=
"Delete line"
ImageUrl
=
"../site_images/_linedelete.png"
ConfirmDialogType
=
"RadWindow"
ConfirmText
=
"Delete the costing line?"
ConfirmTitle
=
"Delete line"
ConfirmDialogHeight
=
"130"
ConfirmDialogWidth
=
"250"
Groupable
=
"false"
Display
=
"false"
>
<
HeaderStyle
Width
=
"28px"
HorizontalAlign
=
"center"
/>
<
ItemStyle
Width
=
"28px"
HorizontalAlign
=
"center"
/>
</
telerik:GridButtonColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Status"
SortExpression
=
"Status"
UniqueName
=
"tmpcolStatus"
FilterControlAltText
=
"Filter tmpcolStatus column"
Groupable
=
"false"
Visible
=
"false"
Display
=
"false"
>
<
ItemTemplate
>
<
asp:Label
ID
=
"Label1"
runat
=
"server"
Text='<%# Eval("Document_Status") %>'></
asp:Label
>
</
ItemTemplate
>
<
HeaderStyle
HorizontalAlign
=
"Center"
Width
=
"80px"
/>
<
ItemStyle
HorizontalAlign
=
"Center"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"S/No."
SortExpression
=
"S_No"
UniqueName
=
"tmpcolS_No"
FilterControlAltText
=
"Filter tmpcolS_No column"
DataField
=
"S_No"
DataType
=
"System.String"
Groupable
=
"false"
>
<
ItemTemplate
>
<
telerik:RadTextBox
runat
=
"server"
ID
=
"_radtxtS_No"
Text='<%# DataBinder.Eval(Container.DataItem, "S_No") %>'
MaxLength="20" TextMode="SingleLine" BorderStyle="None" Width="35">
</
telerik:RadTextBox
>
</
ItemTemplate
>
<
HeaderStyle
Wrap
=
"false"
HorizontalAlign
=
"Left"
Width
=
"50"
/>
<
ItemStyle
Wrap
=
"false"
HorizontalAlign
=
"Left"
Width
=
"50"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridBoundColumn
DataField
=
"Type"
DataType
=
"System.Int32"
FilterControlAltText
=
"Filter Type column"
HeaderText
=
"Type"
SortExpression
=
"Type"
UniqueName
=
"Type"
Groupable
=
"false"
Display
=
"false"
>
<
HeaderStyle
HorizontalAlign
=
"left"
Width
=
"108"
/>
<
ItemStyle
HorizontalAlign
=
"left"
Width
=
"108"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"No"
FilterControlAltText
=
"Filter No column"
HeaderText
=
"No."
SortExpression
=
"No"
UniqueName
=
"No"
Groupable
=
"false"
>
<
HeaderStyle
HorizontalAlign
=
"left"
Width
=
"130"
/>
<
ItemStyle
HorizontalAlign
=
"left"
Width
=
"130"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Description"
SortExpression
=
""
UniqueName
=
"tmpcolDescription"
FilterControlAltText
=
"Filter tmpcolDescription column"
DataField
=
"Description"
Groupable
=
"false"
>
<
ItemTemplate
>
<
telerik:RadTextBox
runat
=
"server"
ID
=
"_radtxtDescription"
Text='<%# DataBinder.Eval(Container.DataItem, "Description") %>'
MaxLength="50" TextMode="SingleLine" BorderStyle="none" Width="300">
</
telerik:RadTextBox
>
</
ItemTemplate
>
<
HeaderStyle
Wrap
=
"false"
HorizontalAlign
=
"Left"
Width
=
"270"
/>
<
ItemStyle
Wrap
=
"false"
HorizontalAlign
=
"Right"
Width
=
"270"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Quantity"
SortExpression
=
""
UniqueName
=
"tmpcolQuantity"
FilterControlAltText
=
"Filter tmpcolQuantity column"
Groupable
=
"false"
>
<
ItemTemplate
>
<
telerik:RadNumericTextBox
ID
=
"_radnumQuantity"
runat
=
"server"
EmptyMessage
=
""
ShowSpinButtons
=
"false"
Type
=
"Number"
Width
=
"60px"
InvalidStyleDuration
=
"300"
Value='<%# Convert.ToDecimal(DataBinder.Eval(Container.DataItem, "Quantity")) %>'
BorderStyle="None" Height="13px" EnableOldBoxModel="true" EnabledStyle-HorizontalAlign="Right"
IncrementSettings-InterceptArrowKeys="false">
<
NumberFormat
AllowRounding
=
"true"
KeepNotRoundedValue
=
"False"
/>
</
telerik:RadNumericTextBox
>
</
ItemTemplate
>
<
HeaderStyle
Wrap
=
"false"
HorizontalAlign
=
"Right"
Width
=
"80"
/>
<
ItemStyle
Wrap
=
"false"
HorizontalAlign
=
"Right"
Width
=
"80"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Unit Cost"
SortExpression
=
""
UniqueName
=
"tmpcolUnit_Cost"
FilterControlAltText
=
"Filter tmpcolUnit_Cost column"
Groupable
=
"false"
>
<
ItemTemplate
>
<
telerik:RadNumericTextBox
ID
=
"_radnumUnit_Cost"
runat
=
"server"
EmptyMessage
=
""
ShowSpinButtons
=
"false"
Type
=
"Number"
Width
=
"80%"
InvalidStyleDuration
=
"300"
Value='<%# Convert.ToDecimal(DataBinder.Eval(Container.DataItem, "Unit_Cost")) %>'
BorderStyle="None" Height="13px" EnableOldBoxModel="true" EnabledStyle-HorizontalAlign="Right"
IncrementSettings-InterceptArrowKeys="false">
<
NumberFormat
AllowRounding
=
"true"
DecimalDigits
=
"5"
KeepNotRoundedValue
=
"False"
/>
</
telerik:RadNumericTextBox
>
<
telerik:RadButton
ID
=
"_btnunitcost"
runat
=
"server"
Text
=
"..."
Skin
=
"Office2007"
OnClientClicking
=
"OnClientClickingGrid"
AutoPostBack
=
"false"
ButtonType
=
"StandardButton"
Width
=
"10px"
>
</
telerik:RadButton
>
</
ItemTemplate
>
<
HeaderStyle
Wrap
=
"false"
HorizontalAlign
=
"Right"
Width
=
"130"
/>
<
ItemStyle
Wrap
=
"false"
HorizontalAlign
=
"Right"
Width
=
"130"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Cost Markup %"
SortExpression
=
""
UniqueName
=
"tmpcolCost_Markup_Percent"
FilterControlAltText
=
"Filter tmpcolCost_Markup_Percent column"
Groupable
=
"false"
>
<
ItemTemplate
>
<
telerik:RadNumericTextBox
ID
=
"_radnumCost_Markup_Percent"
runat
=
"server"
EmptyMessage
=
""
ShowSpinButtons
=
"false"
Type
=
"Number"
Width
=
"90%"
InvalidStyleDuration
=
"300"
Value='<%# Convert.ToDecimal(DataBinder.Eval(Container.DataItem, "Cost_Markup_Percent")) %>'
BorderStyle="None" Height="13px" EnableOldBoxModel="true" EnabledStyle-HorizontalAlign="Right"
IncrementSettings-InterceptArrowKeys="false">
<
NumberFormat
AllowRounding
=
"true"
KeepNotRoundedValue
=
"False"
/>
</
telerik:RadNumericTextBox
>
</
ItemTemplate
>
<
HeaderStyle
Wrap
=
"false"
HorizontalAlign
=
"Right"
Width
=
"130"
/>
<
ItemStyle
Wrap
=
"false"
HorizontalAlign
=
"Right"
Width
=
"130"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Unit Price"
SortExpression
=
""
UniqueName
=
"tmpcolUnit_Price"
FilterControlAltText
=
"Filter tmpcolUnit_Price column"
Groupable
=
"false"
>
<
ItemTemplate
>
<
telerik:RadNumericTextBox
ID
=
"_radnumUnit_Price"
runat
=
"server"
EmptyMessage
=
""
ShowSpinButtons
=
"false"
Type
=
"Number"
Width
=
"90%"
InvalidStyleDuration
=
"300"
Value='<%# Convert.ToDecimal(DataBinder.Eval(Container.DataItem, "Unit_Price")) %>'
BorderStyle="None" EnableEmbeddedSkins="false" Skin="None" Height="13px" EnableOldBoxModel="true"
EnabledStyle-HorizontalAlign="Right" IncrementSettings-InterceptArrowKeys="false">
<
NumberFormat
AllowRounding
=
"true"
KeepNotRoundedValue
=
"False"
/>
</
telerik:RadNumericTextBox
>
</
ItemTemplate
>
<
HeaderStyle
Wrap
=
"false"
HorizontalAlign
=
"Right"
Width
=
"130"
/>
<
ItemStyle
Wrap
=
"false"
HorizontalAlign
=
"Right"
Width
=
"130"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridNumericColumn
DataField
=
"LineAmountText"
DataType
=
"System.Decimal"
FilterControlAltText
=
"Filter LineAmountText column"
HeaderText
=
"Line Amount"
SortExpression
=
"LineAmountText"
UniqueName
=
"LineAmountText"
DataFormatString
=
"{0:#,0.#0;-#,0.#0; }"
>
<
HeaderStyle
HorizontalAlign
=
"right"
Width
=
"120"
/>
<
ItemStyle
HorizontalAlign
=
"right"
/>
</
telerik:GridNumericColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Vendor"
SortExpression
=
""
UniqueName
=
"tmpcolVendor"
FilterControlAltText
=
"Filter tmpcolVendor column"
Groupable
=
"false"
>
<
ItemTemplate
>
<
telerik:RadTextBox
runat
=
"server"
ID
=
"_radtxtVendor"
Text='<%# DataBinder.Eval(Container.DataItem, "Vendor") %>'
MaxLength="50" TextMode="SingleLine" BorderStyle="none" Width="335">
</
telerik:RadTextBox
>
</
ItemTemplate
>
<
HeaderStyle
Wrap
=
"false"
HorizontalAlign
=
"Left"
Width
=
"350"
/>
<
ItemStyle
Wrap
=
"false"
HorizontalAlign
=
"Left"
Width
=
"350"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Remarks"
SortExpression
=
""
UniqueName
=
"tmpcolRemarks"
FilterControlAltText
=
"Filter tmpcolRemarks column"
Groupable
=
"false"
>
<
ItemTemplate
>
<
telerik:RadTextBox
runat
=
"server"
ID
=
"_radtxtRemarks"
Text='<%# DataBinder.Eval(Container.DataItem, "Remarks") %>'
MaxLength="50" TextMode="SingleLine" BorderStyle="none" Width="335">
</
telerik:RadTextBox
>
</
ItemTemplate
>
<
HeaderStyle
Wrap
=
"false"
HorizontalAlign
=
"Left"
Width
=
"350"
/>
<
ItemStyle
Wrap
=
"false"
HorizontalAlign
=
"Left"
Width
=
"350"
/>
</
telerik:GridTemplateColumn
>
</
Columns
>
<
EditFormSettings
UserControlName
=
"../controls/project/costing_lines.ascx"
EditFormType
=
"WebUserControl"
InsertCaption
=
"Add new item"
CaptionFormatString="Edit Item No.:<span
style
=
'font-weight:bold'
> {0} </
span
>"
CaptionDataField="No">
<
PopUpSettings
Width
=
"870"
Modal
=
"true"
CloseButtonToolTip
=
"Close"
/>
</
EditFormSettings
>
<
CommandItemSettings
ShowAddNewRecordButton
=
"false"
/>
<
CommandItemTemplate
>
<
div
style
=
"text-align: left; vertical-align: middle; padding-left: 30px; table-layout: fixed"
>
<
telerik:RadButton
ID
=
"_btnUpdateAll"
runat
=
"server"
Text
=
"Update All..."
EnableEmbeddedSkins
=
"false"
Skin
=
"mscSkinOffice"
OnClientClicking
=
"OnClientClicking"
AutoPostBack
=
"false"
ButtonType
=
"StandardButton"
>
<
Icon
PrimaryIconUrl
=
"../site_images/_right_arrow.png"
PrimaryIconTop
=
"5px"
PrimaryIconLeft
=
"7px"
PrimaryHoveredIconUrl
=
"../site_images/_right_arrow.png"
SecondaryIconTop
=
"5px"
SecondaryIconRight
=
"7px"
SecondaryIconUrl
=
"../site_images/_left_arrow.png"
SecondaryHoveredIconUrl
=
"../site_images/_left_arrow.png"
/>
</
telerik:RadButton
>
</
div
>
</
CommandItemTemplate
>
</
MasterTableView
>
<
ClientSettings
Scrolling-UseStaticHeaders
=
"true"
AllowDragToGroup
=
"false"
>
<
Selecting
AllowRowSelect
=
"false"
/>
<
Scrolling
AllowScroll
=
"true"
UseStaticHeaders
=
"true"
FrozenColumnsCount
=
"1"
SaveScrollPosition
=
"false"
/>
<
ClientEvents
OnPopUpShowing
=
"PopUpShowing"
/>
</
ClientSettings
>
<
HeaderStyle
/>
<
AlternatingItemStyle
/>
<
ItemStyle
/>
<
PagerStyle
Mode
=
"NextPrev"
PagerTextFormat="{4} Page <strong>{0}</
strong
> of <
strong
>{1}</
strong
>." />
</
telerik:RadGrid
>
<
telerik:RadAjaxManager
ID
=
"AjaxManager"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"btnSearch"
>
<
UpdatedControls
> <
telerik:AjaxUpdatedControl
ControlID
=
"rtlSearchResult"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
></
telerik:AjaxUpdatedControl
>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
asp:Button
ID
=
"btnSearch"
OnClick
=
"btnSearchClick"
runat
=
"server"
/>
<
telerik:RadTreeList
runat
=
"server"
ID
=
"rtlSearchResult"
EnableNoRecordsTemplate
=
"true"
AllowPaging
=
"false"
PageSize
=
"5"
DataKeyNames
=
"_ID"
ParentDataKeyNames
=
"_ID_FOLDER"
Height
=
"250"
AllowLoadOnDemand
=
"false"
OnItemCommand
=
"rtlSearchResult_ItemCommand"
AutoGenerateColumns
=
"false"
Visible
=
"true"
>
<
Columns
>
<
telerik:TreeListBoundColumn
DataField
=
"_ID"
UniqueName
=
"_ID"
HeaderText
=
"ID"
></
telerik:TreeListBoundColumn
>
<
telerik:TreeListBoundColumn
DataField
=
"_NAME"
UniqueName
=
"_NAME"
HeaderText
=
"NAME"
></
telerik:TreeListBoundColumn
>
</
Columns
>
</
telerik:RadTreeList
>
CodeBehind
public
List<common.DOCUMENT_OBJECT_MAP> list;
protected
void
Page_Load(
object
sender, EventArgs e)
{
list =
new
List<common.DOCUMENT_OBJECT_MAP>();
list.Add(
new
common.DOCUMENT_OBJECT_MAP() { ID = 1, NAME =
"Obj1"
});
list.Add(
new
common.DOCUMENT_OBJECT_MAP() { ID = 11, ID_FOLDER = 1, NAME =
"Obj11"
});
list.Add(
new
common.DOCUMENT_OBJECT_MAP() { ID = 12, ID_FOLDER = 1, NAME =
"Obj12"
});
list.Add(
new
common.DOCUMENT_OBJECT_MAP() { ID = 13, ID_FOLDER = 1, NAME =
"Obj13"
});
list.Add(
new
common.DOCUMENT_OBJECT_MAP() { ID = 14, ID_FOLDER = 13, NAME =
"Obj14"
});
list.Add(
new
common.DOCUMENT_OBJECT_MAP() { ID = 15, ID_FOLDER = 13, NAME =
"Obj15"
});
list.Add(
new
common.DOCUMENT_OBJECT_MAP() { ID = 16, ID_FOLDER = 14, NAME =
"Obj16"
});
list.Add(
new
common.DOCUMENT_OBJECT_MAP() { ID = 17, ID_FOLDER = 14, NAME =
"Obj17"
});
list.Add(
new
common.DOCUMENT_OBJECT_MAP() { ID = 18, ID_FOLDER = 14, NAME =
"Obj18"
});
list.Add(
new
common.DOCUMENT_OBJECT_MAP() { ID = 2, NAME =
"Obj2"
});
list.Add(
new
common.DOCUMENT_OBJECT_MAP() { ID = 3, NAME =
"Obj33"
});
if
(!IsPostBack)
{
rtlSearchResult.DataSource = list;
rtlSearchResult.DataBind();
}
}
protected
void
btnSearchClick(
object
sender, EventArgs e)
{
rtlSearchResult.DataSource = list;
rtlSearchResult.DataBind();
}
protected
void
rtlSearchResult_ItemCommand(
object
sender, TreeListCommandEventArgs e)
{
if
(e.CommandName == RadTreeList.ExpandCollapseCommandName)
{
rtlSearchResult.DataSource = list;
rtlSearchResult.DataBind();
}
}
When is no postback TreeList good work, exand and collapse nodes, but when I click to btnSearch I can't expand/collapse any node. Anybody could help me? Where is a bug?
Thanks!
Alexey