Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
147 views
Hi,
     I have a radlistview in my page. How can I remove its border. Your help is appreciated
thanks
Savyo
Savyo
Top achievements
Rank 1
 answered on 24 Apr 2013
1 answer
132 views
Hi
I hava a radbarcode in my radgrid. I want to export this. Please help me with this. A sample export would help.

thanx
RT
Princy
Top achievements
Rank 2
 answered on 24 Apr 2013
1 answer
111 views
I've got this as my code for the ComboBox opened client-side event...
function DropdownOpened(sender, e)
{
    var treeView = sender.get_items().getItem(0).findControl("RadTreeView1");
    treeView.get_element().focus();
    var node = treeView.get_selectedNode();
    if (node)
    {
        while (node.get_parent() && node.get_parent() instanceof Telerik.Web.UI.RadTreeNode)
        {
            node.set_expanded(true);
            node = node.get_parent();
        }
        treeView.get_selectedNode().scrollIntoView();
    }
}

The code works but the scrollIntoView call doesn't have any impact.

FWIW, I've tried wrapping the scrollIntoView call in a timeout call but to no avail.

Am I doing it wrong or are my expectations too high?

Shinu
Top achievements
Rank 2
 answered on 24 Apr 2013
1 answer
71 views
Hi,

Just starting to use the scheduler and have tried to create a test program based on the 'overview' demo.  This has a RadCalendar and a RadScheduler and it looks to be working correctly to start with but my problem is that when I click on a date in the calendar the scheduler is not refreshing to pick up the change.  I have checked my code and other than changing the data source for the scheduler to read from an object list I cannot see what I have changed yet it doesn't work.  I have checked that the OnCalendar1DateSelected event is being called when I click on the calendar and this is calling the set_selectedDate method of the scheduler but the scheduler itself stays on the original date.  Any suggestions most welcome as I have been looking at this for a while now and cannot see why my test is different from the sample.
Plamen
Telerik team
 answered on 24 Apr 2013
1 answer
178 views
Hi,

Just starting to use the scheduler and have tried to create a test program based on the 'overview' demo.  This has a RadCalendar and a RadScheduler and it looks to be working correctly to start with but my problem is that when I click on a date in the calendar the scheduler is not refreshing to pick up the change.  I have checked my code and other than changing the data source for the scheduler to read from an objcet list I cannot see what I have changed yet it doesn't work.  I have checked that the OnCalendar1DateSelected event is being called when I click on the calendar and this is calling the set_selectedDate method of the scheduler but the scheduler itself stays on the original date.  Any suggestions most welcome as I have been looking at this for a while now and cannot see why my test is different from the sample.
Plamen
Telerik team
 answered on 24 Apr 2013
1 answer
126 views
Hi
     How can I limit the number of characters to type inside filtertextbox. Please provide a solution from server-side.

thanks in advance
Allen
Shinu
Top achievements
Rank 2
 answered on 24 Apr 2013
0 answers
46 views
Hi,

I am using AutoComplete filter text for a template column in RadGrid. I am saving the custom Filter for future use. when I am saving for a single token it is  saving the filterexpression as    <FilterExpression>iif(ClientName == null, "", ClientName).ToString() = "ACLU") </FilterExpression>  but when I am trying to save with multiple tokens in AutoCompleteFilter the grid is filtering but on saing the current filter the filter expression becomes   <FilterExpression> </FilterExpression> which leades loading all the grid that . 
Please suggest .

Srimanta
Top achievements
Rank 1
 asked on 24 Apr 2013
6 answers
1.5K+ views
Hi,

Is there any way to check the length of filename before uploading process? If the length is greater than 80 characters then cancel upload.
Currently the only way to cancel upload is OnClientFilesSelected event but I can not get filename from event argument.

Any help please?

Thanks,
Charlie

Plamen
Telerik team
 answered on 24 Apr 2013
1 answer
171 views
Hi,

I am currently developing RadGrid control in the web form (aspx) and also develop usercontrol (asxc) which has RadTreeView and two buttons (Add and Cancel).

How can I add new items to the RadGridView in the web form when I checked some boxes of the treeview and then clicked "Add" button in the usercontrol? 

I have source code below.

.ASPX 

<telerik:RadGrid ID="rgRequestLocations" runat="server" CellSpacing="0" GridLines="None" AutoGenerateColumns="False"
                                  OnNeedDataSource="rgRequestLocations_NeedDataSource" OnPreRender="rgRequestLocations_PreRender" OnItemInserted="rgRequestLocations_ItemInserted">
                                  <MasterTableView InsertItemDisplay="Top" CommandItemDisplay="Top" CommandItemSettings-AddNewRecordText="Add Locations to Request">
                                      <NoRecordsTemplate>
                                          <table>
                                              <tr>
                                                  <td>
                                                      <asp:Label ID="lblNoRecords" runat="server" Style="color: red; font-weight: bold" TabIndex="14">You have not added any locations to the request.</asp:Label></td>
                                              </tr>
                                          </table>
                                      </NoRecordsTemplate>
                                      <Columns>
                                          <telerik:GridEditCommandColumn UniqueName="EditCommandColumn">
                                          </telerik:GridEditCommandColumn>
                                          <telerik:GridBoundColumn SortExpression="location_pk" HeaderText="Location ID" HeaderButtonType="TextButton"
                                              DataField="location_pk" Visible="false">
                                          </telerik:GridBoundColumn>
                                          <telerik:GridBoundColumn HeaderText="Location Name" HeaderButtonType="TextButton"
                                              DataField="location_name">
                                          </telerik:GridBoundColumn>
                                          <telerik:GridEditCommandColumn ButtonType="PushButton" UniqueName="modify" EditText="Modify">
                                          </telerik:GridEditCommandColumn>
                                          <telerik:GridButtonColumn ButtonType="PushButton" CommandName="Delete" Text="Remove Location" UniqueName="removelocation">
                                          </telerik:GridButtonColumn>
                                      </Columns>
                                      <EditFormSettings EditFormType="WebUserControl" UserControlName="~/Registration/Controls/PO_Registration.ascx">
                                          <EditColumn UniqueName="EditCommandColumn1">
                                          </EditColumn>
                                      </EditFormSettings>
                                  </MasterTableView>
 
                              </telerik:RadGrid>

In the Code-Behind of ASPX

protected void rgRequestLocations_ItemInserted(object sender, GridInsertedEventArgs e)
{
    UserControl userControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID);
    //insert a new values
 
    Hashtable newVlaues = new Hashtable();
    newVlaues["Grid"] = (userControl.FindControl("rtvlocation") as RadTreeView).GetAllNodes();
 
}


ASCX
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="PO_Registration.ascx.cs" Inherits="Registration_Controls_PO_Registration" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<div style="padding: 10px">
    <telerik:RadDropDownList ID="ddlAdministrations" runat="server" AutoPostBack="true"
        OnSelectedIndexChanged="ddlAdministrations_SelectedIndexChanged">
    </telerik:RadDropDownList>
</div>
<div id="displayTreeViewAdmin" runat="server" visible="false" style="padding: 10px">
    <div>
        <telerik:RadTreeView ID="rtvLocations" runat="server" CheckBoxes="True"
            CausesValidation="False" TriStateCheckBoxes="False" DataFieldID="location_pk"
            DataFieldParentID="parent_fk" DataTextField="location_name" DataValueField="location_pk" />
    </div>
    <div style="padding: 10px">
        <telerik:RadButton ID="btnAddLocations" runat="server" Text="Request Checked Locations" CommandName="Add" Visible='<%# !(DataItem is Telerik.Web.UI.GridInsertionObject) %>' OnClick="btnAddLocations_Click"></telerik:RadButton>
        <telerik:RadButton ID="btnCancel" runat="server" Text="Cancel" OnClick="btnCancel_Click"></telerik:RadButton>
    </div>
 
</div>

In the code-behind of Ascx

private object _dataItem = null;
 
    public object DataItem
    {
        get
        {
            return this._dataItem;
        }
        set
        {
            this._dataItem = value;
        }
    }
 
#region Control Methods
    override protected void OnInit(EventArgs e)
    {
        InitializeComponent();
        base.OnInit(e);
    }
 
    private void InitializeComponent()
    {
        btnAddLocations.Visible = true;
        PopulateAdminstrations();
    }
    #endregion
 
 
 
#region Button Events
    protected void btnAddLocations_Click(object sender, EventArgs e)
    {
        /*loop through tree, create datatable with appropriate columns, and bind the datatable to radgrid*/
        //create new properties
        const string locationid = "location_id";
        const string locationname = "location_name";
 
        //initizlize new object of datatable level 1
        DataTable dt = new DataTable();
 
        dt.Clear();
 
        //create a new colum for table level 1
        DataColumn dcol = new DataColumn(locationid, typeof(System.Int32));
        dt.Columns.Add(dcol);
 
        dcol = new DataColumn(locationname, typeof(System.String));
        dt.Columns.Add(dcol);
 
        foreach (RadTreeNode row in rtvLocations.GetAllNodes())
        {
            if (row.Checkable)
            {
                if (row.Checked)
                {
                    //Create a new row
                    DataRow drow = dt.NewRow();
                    drow[locationid] = row.Value;
                    drow[locationname] = row.Text;
                    //add row to the datatable
                    dt.Rows.Add(drow);
                }
            }
        }
 
        Session["RequestAdded"] = dt;
 
         
 
    }
 
    protected void btnCancel_Click(object sender, EventArgs e)
    {
        /*Close radgrid edit form*/
    }
    #endregion


Your help is very appericated very well.

Thanks,
Chi Ming 
Kostadin
Telerik team
 answered on 24 Apr 2013
1 answer
118 views
Hi,

I have a list of countries and regions in an xml file and I want to bind Combobox to that xml file. Is it possible to set XmlDataSource to RadComboBox  ?
Kate
Telerik team
 answered on 24 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?