or


Protected Sub Test_TestOrgChart_Load(sender As Object, e As System.EventArgs) Handles Me.Load BindOrgChart() End Sub Private Sub BindOrgChart(Optional ByVal ExpandAll As Boolean = True) Dim employees = CreateEmployees() RadOrgChartEmployees.DataFieldID = "EmployeeID" RadOrgChartEmployees.DataTextField = "EmployeeName" RadOrgChartEmployees.DataFieldParentID = "ManagerID" RadOrgChartEmployees.DataSource = employees RadOrgChartEmployees.DataBind() If ExpandAll Then RadOrgChartEmployees.ExpandAllNodes() Else RadOrgChartEmployees.CollapseAllNodes() End If End Sub Private Function CreateEmployees() As DataTable Dim employees = New DataTable() employees.Columns.Add("EmployeeID") employees.Columns.Add("ManagerID") employees.Columns.Add("EmployeeName") employees.Columns.Add("JobTitle") employees.Rows.Add(New String() {"1", Nothing, "Emp CEO", "CE0"}) employees.Rows.Add(New String() {"2", "1", "Emp President BSS", "President BSS"}) employees.Rows.Add(New String() {"3", "1", "Emp COO", "COO"}) employees.Rows.Add(New String() {"4", "2", "Emp VP ST", "VP Software Tech"}) employees.Rows.Add(New String() {"5", "2", "EMP Director SD", "Director Software Development"}) employees.Rows.Add(New String() {"6", "5", "EMP Developer", "Developer"}) employees.Rows.Add(New String() {"7", Nothing, "EMP CFO", "CFO"}) employees.Rows.Add(New String() {"8", "7", "EMP President IT", "President IT"}) Return employees End Function
I have a radlistbox having an item template .I want to bind it with JSON data when
user types some value in name textbox so as to behave it like search result listing in client side.
Here is my code
<telerik:RadListBox ID="rlbControl" runat="server" SelectionMode="Multiple">
<ItemTemplate>
<table>
<tr>
<td>
<asp:Label ID="lblName" runat="server" Text='<%# Eval("Name") %>' ></asp:Label>
</td>
<td style="width:20px"></td>
<td >
<asp:Label ID="lblAge" runat="server" Text='<%# Eval("Age") %>' ></asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
</telerik:RadListBox>
Name : <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
Age : <asp:TextBox ID="txtAge" runat="server" ></asp:TextBox>

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" CellSpacing="0" GridLines="None" AllowPaging="True" OnNeedDataSource="RadGrid1_NeedDataSource" Skin="WebBlue" OnDeleteCommand="RadGrid1_DeleteCommand" OnInsertCommand="RadGrid1_InsertCommand" OnUpdateCommand="RadGrid1_UpdateCommand" ShowFooter="True" OnItemDataBound="RadGrid1_ItemDataBound" Culture="es-MX" OnItemCommand="RadGrid1_ItemCommand"> <MasterTableView CommandItemSettings-AddNewRecordText="Agregar registro" CommandItemDisplay="None" Caption="Cierre de Nóminas" DataKeyNames="fiEjercicio,fiQnaPago" AllowMultiColumnSorting="False" NoMasterRecordsText="No hay registros para mostrar"> <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings> <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"> <HeaderStyle Width="20px"></HeaderStyle> </RowIndicatorColumn> <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"> <HeaderStyle Width="20px"></HeaderStyle> </ExpandCollapseColumn> <Columns> <telerik:GridNumericColumn DataField="fiEjercicio" DecimalDigits="2" FilterControlAltText="Filter fiEjercicio column" HeaderText="Ejercicio" UniqueName="fiEjercicio"> </telerik:GridNumericColumn> <telerik:GridNumericColumn DataField="fiQnaPago" DecimalDigits="2" FilterControlAltText="Filter fiQuincena column" HeaderText="Quincena" UniqueName="fiQnaPago"> </telerik:GridNumericColumn> <telerik:GridNumericColumn DataField="nom_edo" DecimalDigits="2" FilterControlAltText="Filter nom_edo column" HeaderText="Estado" UniqueName="nom_edo"> </telerik:GridNumericColumn> <telerik:GridNumericColumn DataField="nom_cd" DecimalDigits="2" FilterControlAltText="Filter nom_cd column" HeaderText="Ciudad" UniqueName="nom_cd"> </telerik:GridNumericColumn> <telerik:GridNumericColumn DataField="expedientes" DecimalDigits="2" FilterControlAltText="Filter expedientes column" HeaderText="# de Servidores Públicos" UniqueName="expedientes"> </telerik:GridNumericColumn> <telerik:GridNumericColumn DataField="percecpciones" DecimalDigits="2" FilterControlAltText="Filter percecpciones column" HeaderText="Total Percepciones" UniqueName="percecpciones"> </telerik:GridNumericColumn> <telerik:GridNumericColumn DataField="deducciones" DecimalDigits="2" FilterControlAltText="Filter deducciones column" HeaderText="Total Deducciones" UniqueName="deducciones" > </telerik:GridNumericColumn> <telerik:GridNumericColumn DataField="liquido" DecimalDigits="2" FilterControlAltText="Filter liquido column" HeaderText="Total Liquido" UniqueName="liquido"> </telerik:GridNumericColumn> <telerik:GridBoundColumn FilterControlAltText="Filter column column" UniqueName="estatus" HeaderText="Estatus" DataField="fcDescEdo"> </telerik:GridBoundColumn> <telerik:GridBoundColumn FilterControlAltText="Filter column column" UniqueName="estatusCalc" HeaderText="EstatusCalc" Visible="False" DataField="fcDescEdoCalc"> </telerik:GridBoundColumn> <telerik:GridButtonColumn ButtonType="ImageButton" FilterControlAltText="Filter detalle column" HeaderText="Ver Detalle" UniqueName="detalle" CommandName="detalle" ImageUrl="~/_images/iconos/detalle.png"> </telerik:GridButtonColumn> <telerik:GridButtonColumn ButtonType="ImageButton" FilterControlAltText="Filter cierre column" HeaderText="Cierre" UniqueName="cierre" CommandName="cierre" ImageUrl="~/_images/iconos/lock.png"> </telerik:GridButtonColumn> <telerik:GridButtonColumn ButtonType="ImageButton" FilterControlAltText="Filter cierre column" HeaderText="Generar Acumulados" UniqueName="acumulados" CommandName="acumulados" ImageUrl="~/_images/iconos/acumulados.png"> <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" /> <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" /> </telerik:GridButtonColumn> </Columns> <EditFormSettings UserControlName="ucEditaCalendario.ascx" EditFormType="WebUserControl"> <EditColumn UniqueName="EditCommandColumn1"> </EditColumn> </EditFormSettings> </MasterTableView> <StatusBarSettings LoadingText="Cargando..." /> <FilterMenu EnableImageSprites="False"> </FilterMenu> <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"> </HeaderContextMenu> </telerik:RadGrid>