or
| <telerik:RadComboBox ID="RadComboBox1" runat="server" EmptyMessage="All Types" HighlightTemplatedItems="true" |
| AllowCustomText="true" Width="240px" OnClientDropDownClosed="onDropDownClosing"> |
| <ItemTemplate> |
| <div onclick="StopPropagation(event)" class="combo-item-template"> |
| <asp:CheckBox runat="server" ID="chk1" Checked="true" onclick="onCheckBoxClick(this)"/> |
| <asp:Label runat="server" ID="Label1" AssociatedControlID="chk1"> |
| <%# Eval("Description") %> |
| </asp:Label> |
| </div> |
| </ItemTemplate> |
| </telerik:RadComboBox> |
| <telerik:RadComboBox ID="RadComboBox2" Width="240px" Height="300px" |
| AllowCustomText="true" EmptyMessage="Showing all Credit Types" OnClientDropDownClosing="OnClientDropDownClosingHandler" |
| runat="server"> |
| <ItemTemplate> |
| <div onclick="StopPropagation(event)"> |
| <telerik:RadTreeView ID="RadTreeView1" runat="server" |
| OnClientNodeClicking="OnClientNodeClickingHandler"> |
| <DataBindings> |
| <telerik:RadTreeNodeBinding Depth="0" Category="Credit Type" /> |
| </DataBindings> |
| </telerik:RadTreeView> |
| </div> |
| </ItemTemplate> |
| <Items> |
| <telerik:RadComboBoxItem /> |
| </Items> |
| </telerik:RadComboBox> |
| <asp:LinkButton ID="Button1" runat="server" Text="Select" /> |
| <p /> |
| <asp:Label runat="server" ID="SelectedTypeLabel" /><br /> |
| <asp:Label runat="server" ID="SelectedCarLabel" /> |
| Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load |
| If Not IsPostBack Then |
| 'RadComboBox1.DataBind() |
| LoadStateFilter() |
| LoadCreditTypeFilter() |
| End If |
| End Sub |
| Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click |
| 'holds the text of the checked items |
| Dim checkedText As String = String.Empty |
| For Each item As RadComboBoxItem In RadComboBox1.Items |
| Dim chk As CheckBox = DirectCast(item.FindControl("chk1"), CheckBox) |
| If chk.Checked Then |
| checkedText += item.Text + ", " |
| End If |
| Next |
| SelectedTypeLabel.Text = checkedText.Trim().TrimEnd(","c) |
| 'find the treeview |
| Dim tree As RadTreeView = DirectCast(RadComboBox2.Items(0).FindControl("RadTreeView1"), RadTreeView) |
| If tree.SelectedNode IsNot Nothing Then |
| SelectedCarLabel.Text = tree.SelectedNode.Text |
| End If |
| End Sub |
| Private Sub LoadStateFilter() |
| Dim oState As New LextrovertBrain.State(Utility.AppConnString) |
| RadComboBox1.DataSource = oState.List |
| RadComboBox1.DataTextField = "Description" |
| RadComboBox1.DataValueField = "StateID" |
| RadComboBox1.DataBind() |
| 'RadComboBox1.Items.Insert(0, New RadComboBoxItem("- Select States -")) |
| oState = Nothing |
| 'Throw New NotImplementedException() |
| End Sub |
| Protected Sub LoadCreditTypeFilter() |
| 'Dim oCreditType As New LextrovertBrain.CreditType(Utility.AppConnString) |
| Dim oStateToCreditType As New LextrovertBrain.StateToCreditType(Utility.AppConnString) |
| Dim radTV As RadTreeView = DirectCast(RadComboBox2.Items(0).FindControl("RadTreeView1"), RadTreeView) |
| radTV.DataSource = oStateToCreditType.List(True) |
| radTV.DataTextField = "CreditTypeDescription" |
| radTV.DataValueField = "StateID" |
| radTV.DataFieldID = "CreditTypeID" |
| 'radTV.DataFieldParentID = "CreditTypeID" |
| radTV.DataBind() |
| 'RadComboBox2.DataSource = oCreditType.List |
| 'RadComboBox2.DataTextField = "Description" |
| 'RadComboBox2.DataValueField = "CreditTypeID" |
| 'RadComboBox2.DataBind() |
| 'RadComboBox2.Items.Insert(0, New RadComboBoxItem("- Select Credit Types -")) |
| oStateToCreditType = Nothing |
| End Sub |
| .RadWindow.RadWindow_MyCustomSkin.rwNormalWindow.rwTransparentWindow div |
| { |
| width: 600px; |
| height: 400px; |
| } |
It looks horrible. I have screen shots of the before and after which I can send if it would help.
Hello,
Is there a way to bind a RadToolbar programmatically in the code behind to a RadGrid?.
The reason I need this is because I have created a three tier Hierarchy grid in the page init, which I want to eventually edit with the radtoolbar.
I know that I can do RadGrid1.MasterTableView.CommandItemDisplay = ?? but I am having problems finding out how to bind the radtoolbar itself.
Perhaps someone can guide me to a document or the steps I need to do?
Thanks.
| function onSuccess(result) { |
| var grid = $('#<%= RadGrid1.ClientID %>'); |
| var tableView = grid.get_masterTableView(); |
| tableView.set_dataSource(result); |
| tableView.dataBind(); |
| $('#<%= RadAjaxLoadingPanel1.ClientID %>').hide("<%= RadGrid1.ClientID %>"); |
| } |