Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
616 views
Hi,

Anyone have any idea to retain the focus on the column header itself after sorting the column by pressing enter key in the column header.

1. Tab to grid and select one column by pressing tab key itself.
2. Press enter will sort the column
3. After the sort done, focus has to retain on the sorted column.

any help is appreciated.

Thanks
Rajeev
 
Viktor Tachev
Telerik team
 answered on 23 Jan 2014
1 answer
142 views
Hi,
I am using Telerik.Web.UI version 2012.1.501.40
And i am trying to use <ColumnGroups>
                              </ColumnGroups> 

But i am getting following error
Type 'Telerik.Web.UI.GridTableView' does not have a public property named 'ColumnGroups'
am i missing Anything?
Shinu
Top achievements
Rank 2
 answered on 23 Jan 2014
3 answers
104 views
Hello,

On my Website i have two RadGrids. One for Servers and one for Products. 
The ServerGrid got Columns like:
ID (PK)
CustomerID(FK)
Name
Location
IP
...

The ProductsGrid got Columns like:
ID (PK)
CustomerID(FK)
Name
Version
Server (based on the Column IP from ServerGrid)
...

Each Customer can have multiple Servers and Products. So when the Customer have 4 Servers and want to insert a new Product with "Add new Record" i have a FormTemplate with an DropDownList. All avaiable Servers(IP) for the customer are shown in this List. I fill this List in the ItemDatabound Event from the ProductsGrid:

if (e.Item is GridEditFormInsertItem && e.Item.OwnerTableView.IsItemInserted)
  {
    GridEditableItem item = e.Item as GridEditableItem;
    DropDownList ServerDDL = (DropDownList)item.FindControl("ddlServer");
    // Code to filter and get all ServerIP avaible for this Customer
    ServerDDL.Item.Add(Item);
  }


Code from the DropDownList in the FormTemplate:
<td>
  <asp:DropDownList ID="ddlServer" runat="server" SelectedValue='<%# Bind("Server") %>' TabIndex="5"   AppendDataBoundItems="True">
    <asp:ListItem Selected="True" Text="Select" Value="">
    </asp:ListItem>
  </asp:DropDownList>
</td>

This works perfekt for inserting a new Product. But when i want to Edit an Product i can´t fill the DropDownList with the required Items before the SelectedValue are set wich cause an RunTimeError in JavaScript saying that the DropDownList got an invalid SelectedValue because it is not avaible in the ElementList.

So my question is, how can i set the Items for this DropdownList before the Grid want to set the SelectedValue?

Kind regards
Lukas
Princy
Top achievements
Rank 2
 answered on 23 Jan 2014
1 answer
223 views
Is it possible to save the last selection of a radcombobox into a session , so when the user comes back to this page that the radcombobox is "pre selected" ? 

What I'm dooing now is this : 
protected void Page_Load(object sender, EventArgs e)
{
if (!this.Page.IsPostBack)
{
this.parameterBuId = this.Request["buId"];
 
 
if (string.IsNullOrEmpty(parameterBuId))
  {
 parameterBuId = Session["BusinessUnnitId"].ToString();
   }
   this.LoadBU(parameterBuId);
  this.UserGrid.DataBind();
}
protected void LoadBU(string buId)
{
    IEnumerable<HtBusinessUnit> businessUnits = null;
    businessUnits = HtBusinessUnit.GetAll();
    this.rcbBusinessUnits.DataTextField = "Name";
    this.rcbBusinessUnits.DataValueField = "BusinessUnitId";
    this.rcbBusinessUnits.DataSource = businessUnits;
    this.rcbBusinessUnits.DataBind();
    this.rcbBusinessUnits.Items.Insert(0, new RadComboBoxItem("-BU-"));
     
    if (buId != null && buId != "")
    {
        int index = this.rcbBusinessUnits.Items.IndexOf(this.rcbBusinessUnits.Items.Where(i => i.Value == buId).SingleOrDefault());
        this.rcbBusinessUnits.Items[index].Selected = true;
        this.selectedBu = businessUnits.Where(i => i.BusinessUnitId == int.Parse(buId)).SingleOrDefault();
     
        this.LoadDE(this.parameterDepId);
    }
}


Tanks for help and fast answer

Jayesh Goyani
Top achievements
Rank 2
 answered on 23 Jan 2014
1 answer
295 views
I want Root node , child node only  selected value's individual [ with out array format & check box] of Rad drop down tree  server said code
pleas help me...



Princy
Top achievements
Rank 2
 answered on 23 Jan 2014
4 answers
86 views
I modified a built-in skin. It works fine for other pager styles except GridPagerMode.Slider.  The slider doesn't show. I copied the slider images into my application.  But it didn't fix the problem.  Are there any special settings to use slider mode with custom skin?
Cesar
Top achievements
Rank 2
 answered on 22 Jan 2014
1 answer
85 views
Hello,
I m trying to filter the grid using
http://demos.telerik.com/aspnet-ajax/grid/examples/overview/defaultvb.aspx

but I m not able to get the grid to show the filtered list. I have followed the example all.
Only difference in code is that my combo box is using sqldatasource instead LinqDatasource.
Any suggestions?
Saqib
Top achievements
Rank 1
 answered on 22 Jan 2014
2 answers
198 views
How to clear RadTimePicker's value on submit of a button?
I am able to clear the RadDatePicker value by RadDatePicker.SelectedDate=null; But it doesnt work with timepicker. I tried all the below ones. None of them work.
RadTimePicker1.clear();
RadTimePicker1.DateInput.Clear();
RadTimePicker1.SelectedDate.Value =null;

Thanks

vvvv
Top achievements
Rank 1
 answered on 22 Jan 2014
9 answers
464 views
Greetings

I'm using the numericInput control inside an asp.net DetailsView template field.   I can insert and view record details fine, but when I try to edit a record I get an InvalidCastException error, specified cast is not valid.  The first thing listed in the troubleshooting tips below the error is "when casting from a number the value must be less than infinity".  This process works fine if I switch out the numericInput controls with plain textbox controls.

I've confirmed that my asp:parameters are all the same datatype for insert and edit, I've used the exact same control (drag-n-drop copy from insert template to edit template), and I've confirmed the values are valid and non-null in the database for that field.

Here's the template code:

<

asp:TemplateField HeaderText="Earned Income " SortExpression="earned_inc_total">

<EditItemTemplate>
        
<telerik:RadNumericTextBox ID="radEarnedIncTotal" runat="server" Culture="English (United States)" MinValue="0" Type="Currency" Value='<%# Bind("earned_inc_total") %>' Width="125px">
        
<NumberFormat AllowRounding="True" />
        
</telerik:RadNumericTextBox>
 
</EditItemTemplate>

<InsertItemTemplate>
    <telerik:RadNumericTextBox ID="radEarnedIncTotal" runat="server" Culture="English (United States)" MinValue="0" Type="Currency" Value='<%# Bind("earned_inc_total") %>' Width="125px">
    
<NumberFormat AllowRounding="True" />
    
</telerik:RadNumericTextBox>
</InsertItemTemplate>

Thanks
Mark

Vasil
Telerik team
 answered on 22 Jan 2014
6 answers
316 views
Hi,

I have a application where i created a custom RadFilter with Dropdown like explained in
http://www.telerik.com/help/aspnet-ajax/filter-custom-editors.html
I set the DataSource dynamically in the code be for each field it is different.
This was working perfectly fine under version 2013.1.417

Now i updated to a newer release and it is not working any more.
The dropdown lists are empty and it is looking like in the attached image.

In the new release there is a build-in RadFilterDropDownEditor class.
It is pretty nice but it seems that there is no functionality to set the DataSource dynamically.
There is just the option to specify the DataSourceID.

Can someone help me how to solve the problem?

Best regards
Angel Petrov
Telerik team
 answered on 22 Jan 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?