Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
160 views

Hello everyone,

I need your help, i have 2 RadGrid which each depend on other grid.
Each grid can sort. But if i sort the first grid i lost the first row selected item and the second grid give me error of grid1 cant be null

So, i would like to know how i can set the focus on the last selected item or just focus on the first row?
I use VB.NET

I have tried sample i found here, and nothing change like 

RadGrid1.MasterTableView.Items(0).Selected = True

for now in my Page_Load to get the focus i use radgrod1.items(0).focus()
but it doesn't work on the SortCommand sub, i get a javascript error message

In this sub, i get a new DataSource and i rebind the radgrid.
I have tried RadGrid1.SelectedIndexes.Add(0) with my .focus and same JS error.

Thanks for your help.

Pavlina
Telerik team
 answered on 17 Oct 2012
1 answer
68 views
Hi,
I want to create a component with the following setup

  • RadGrid: In the FormTemplate I have multiple components:
  • RadTextBox: Allows to search a tree in search-as-you-type manner (via AJAX), continuously updating a 
  • RadTreeView: As soon as I click there I want to put the selected item (via AJAX) into a 
  • asp:Label (inside an asp:UpdatePanel) and return it to the RadGrid
  • There are other RadTextBox and RadTreeView elements in the form as well, allowing search-as-you type on different trees as well.

I've got the latter four working in a separate page, but have not yet succeeded to integrate with the RadGrid.

It seems that there is a problem with Ajaxified controls within all RadGrid FormTemplates: According to this post it is not possible to put individual AJAX-enabled components into any RadGrid form, right? (I am afraid it is no option for me to put all of these components into a combined AJAX control as I have to update all the contained components individually).

Is there any workaround for me?
Is the problem the same in RadComboBox popups?

Thanks for your help,
Jürgen
Pavlina
Telerik team
 answered on 17 Oct 2012
2 answers
786 views
I'm trying to get the ClientID of a RadGrid from a sender object in a javascript event.   I need to get the RadGrid from a filteritem keypress event.  How do I get that?

This is crude but I can get it like this:

                var RadGrid1 = $find(sender.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.id);

Anybody got any idea how to get the uniquename from the sender object?
Darren
Top achievements
Rank 1
 answered on 17 Oct 2012
13 answers
275 views
Hi,

I am forming my grid cells by merging multiple rows as shown here :
http://www.telerik.com/community/forums/aspnet-ajax/grid/can-i-use-html-code-like-lt-td-rowsapn-2-gt-in-grid.aspx#1144543

I have different color for my alternate rows. But with the merged cell functionality the css is all mixed up as shown in the screen shot. Could you suggest how to put have the non-merged cells as the alternate row?
Galin
Telerik team
 answered on 17 Oct 2012
0 answers
96 views
I'm working with a simple handler derived from AsyncUpload handler, whose entire code is below. In this code, the attempt to read the temp file created by the call to base.Process() as an image fails intermittently. When this fails, the file exists, the file stream can be opened, but the FileStream.Length is 0. Is there any way to work around this? I would expect the temp file to be accessible after the call to base.Process(). If it helps, this appears to only happen after I have already uploaded a file within the last few minutes.

public class MyAsyncImageUpload : AsyncUploadHandler
{
    protected override IAsyncUploadResult Process(UploadedFile file, HttpContext context, IAsyncUploadConfiguration configuration, string tempFileName)
    {
        var result =base.Process(file, context, configuration, tempFileName);
         
        int imageWidth = 0;
        int imageHeight = 0;
        var imageExists = File.Exists(context.Server.MapPath("~/App_Data/RadUploadTemp" + "/" + tempFileName));
        using (var fs = new FileStream(context.Server.MapPath("~/App_Data/RadUploadTemp" + "/" + tempFileName), FileMode.Open, FileAccess.Read))
        {
            var imageByteSize = fs.Length;
            using (var image = Image.FromStream(fs))
            {
                imageWidth = image.Size.Width;
                imageHeight = image.Size.Height;
            }
        }
 
           return result;
    }
}
  
JohnH
Top achievements
Rank 1
 asked on 17 Oct 2012
4 answers
210 views
Hello All, 

I am using a grid with 'GridClientSelectColumn' to display a column of checkboxes. Also this displays a checkbox on the header which is again useful to me. I want to call a javascript function on the individual checkboxes . I would also like to call another javascript function when the checkbox in header is checked\unchecked. 

I could not find any help about how to do this. It might be an easy thing and I am missing something .

Please advise.
Thanks in advance. 

Regards
Yogendra
Yogendra
Top achievements
Rank 1
 answered on 17 Oct 2012
5 answers
252 views

Hi,

I'm attempting to show the end user some feedback on the items they've checked in a combobox and I want to send the checkedItems to a ListBox underneath showing what the user has checked. I'm having no luck with what I am trying.

Something like this:

ListBox1.Items.Add(ComboBox.CheckedItems.ToString());
Nencho
Telerik team
 answered on 17 Oct 2012
1 answer
157 views
Hi, 

I use following combobox

<telerik:RadComboBox ID="rcbDaysOfWeek" runat="server" Width="150px"
    CheckBoxes="true" EnableCheckAllItemsCheckBox="true"
    EmptyMessage="No day selected">
    <Localization AllItemsCheckedString="All days" CheckAllString="Select all"  />
    <Items>
        <telerik:RadComboBoxItem Text="Monday" Value="1" Checked="true" />
        <telerik:RadComboBoxItem Text="Tuesday" Value="2" Checked="true" />
        <telerik:RadComboBoxItem Text="Wednesday" Value="3" Checked="true" />
        <telerik:RadComboBoxItem Text="Thursday" Value="4" Checked="true" />
        <telerik:RadComboBoxItem Text="Friday" Value="5" Checked="true" />
        <telerik:RadComboBoxItem Text="Saturday" Value="6" Checked="true" />
        <telerik:RadComboBoxItem Text="Sunday" Value="7" Checked="true" />
    </Items>
</telerik:RadComboBox>

Could you advice me how can I manage to have my custom message if I select 4 days - I want to have "1347" instead of "4 items checked". I want to have values of those selected checkboxed written in the message... 

Thanks a lot... 
Kalina
Telerik team
 answered on 17 Oct 2012
4 answers
132 views
I have created and added tabs in code behind, yet the javascript on tab selected does not show the attribute.

Here is my code:
            var tabPanel = new RadTabStrip();
            tabPanel.OnClientTabSelected = "onTabSelected";
            var newTab = new RadTab() {Text = "All", Selected = true};
            newTab.Attributes["type"] =  "0";
            tabPanel.Tabs.Add(newTab);
 
....
....
            foreach (var department in deparmentsDt)
            {
                var newTab = new RadTab() {Text = department.strDepartmentGroup_Name};
                newTab.Attributes["type"] = department.intDepartmentGroup_ID.ToString();
                tabPanel.Tabs.Add(newTab);
            }


And then my javascript is simply:
function onTabSelected(sender, args) {
    var tab = args.get_tab();
    var attr = tab.get_attributes();
    alert(attr.get_count()+" - " +attr.getAttribute("type") + " - " + tab.get_text());
}


count is always 0 and getattribute is always undefined.

Any help would be appreciated.

Thanks
Loren 
Kate
Telerik team
 answered on 17 Oct 2012
0 answers
60 views
wouh sexy :p

Very nice job
arnaud
Top achievements
Rank 1
 asked on 17 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?