Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
47 views
The more items you add to a grid the longer it takes to invoke a GridButtonColumn event is there some means to ensure that the button does a postback without posting back the entire grid??
Timothy
Top achievements
Rank 1
 answered on 05 Jan 2012
3 answers
284 views
Running VS2010 (SP1) using the latest Telerix Q3 2011 controls, ASP.NET version 4, AjaxControltoolkit version 4 on a Windows 2008 R2 installation.
I am using a web service:-
   [ScriptService]
   [WebService(Namespace = "http://tempuri.org/")]
   [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
   public class PS_AdminWebInterface : System.Web.Services.WebService
   {
      [WebMethod(EnableSession = true)]
      public string[] GetSessionString(string sessionKey)
      {
         string[] results = new string[2];
         results[0] = sessionKey;
         try
         {
            if (Session["ClientID"].ToString() == "0")            //Logged in users only
            {
               results[1] = "";
               Session["ErrorOccurred"] = true;
            }
            else if (Session[sessionKey] == null)       //Does key exist
            {
               results[1] = "";
               Session["ErrorOccurred"] = true;
            }
            else
               results[1] = Session[sessionKey].ToString();
         }
         catch
         {
            results[1] = "";
         }
         return results;
      }
}

I have debugged the web service call and it is definitely being called and no exception is raised - however the javascript call :-
PlumSoftware.PS_AdminWebInterface.GetSessionString(ps_interface_sessionKey, GetSessionString, OnTimeOut, OnServiceError);

fails in the following function:-
function GetSessionString(result)
{
   if (result[1] != "0")
   {          //Data changed
      ps_interface_keepalive = 0; //Reset keepalive
      __doPostBack(ps_interface_postbackcontrol.value, result[1]);
   }
}

the result returned is always null

I have spent a few hours looking through your forums but have found no clues as to why this would be happening.
Timothy
Top achievements
Rank 1
 answered on 05 Jan 2012
2 answers
78 views
I have 2 VB projects one for the web application and the second is a library class project that include embb resources.

I have created a composite control which combine RadControls and ASP controls. This control finds the RadScriptManager and add a script reference of java script file using its assembly name and file name (i.e. assembleyname.filename.js). As long the JS file in located in the project's root directory, it works well, but when I move the JS file ot another directory (and update the AssemplyInfo file as well i.e. assemblyname.directoryZ.directoryY.filename.js ) the RadScriptManager cannot find it.


BTW, it work fine when I have a composite control of ASP server controls use ASP Script Manager to upload embb javascripts

Any idea what is the problem ?




Avidan
Top achievements
Rank 1
 answered on 04 Jan 2012
1 answer
116 views
Made a mistake in the title, I meant CheckBox


Hello. 

I have a boolean value in a table that I would like to have the user edit by clicking a checkbox in a row of data. The GridCheckBoxColumn would be perfect but for some reason it cannot be edited. 

I made a checkbox in a template column and I can databind it to show the existing value, but I am struggling with having the value save back do the database when changed. What is the most simple way to achieve this, while using AJAX so the page does not reload? 

Is there any way to put the GridCheckBoxColumn in edit mode like when the EditCommand button is clicked? 

Thanks
Michael
Top achievements
Rank 1
 answered on 04 Jan 2012
5 answers
390 views
Hello,

I am using the below statement to bind a column of rad grid.

dr["Options"] = string.Join("<br />", item.SelectedOptions.Where(q => item.ItemOptions.Select(u => u.FirstOrDefault().Key).Contains(q.Key)).Select(x => string.Format("{0} : {1}", x.Key, x.Value)).ToList());

GridBoundColumn: 
<telerik:GridBoundColumn DataField="Options" UniqueName="Options" HeaderText="<%$ Resources:Options %>"><HeaderStyle Width="113px" /></telerik:GridBoundColumn>

'x.Value' is supposed to be not more than 26 characters. The problem is, if the value is more than 22 or 23 characters, the remaining characters are shrinked out. I cannot increase the width of the column, due to lots of other stuff on the page. All I could think of is to have line-break styling. But I don't know how that is possible. Any help would be appreciated... 

Thank you
Saquib.
Saquib
Top achievements
Rank 1
 answered on 04 Jan 2012
1 answer
439 views
Currently I have a grid with multiple rows. The last column of the grid is an imagebutton inside a GridTemplateColumn to "remove" the row. What i mean by remove is actually change the value of another column in a GridBoundColumn and hide the desired row. 

I currently have an itemcommand and commandname on the imagebutton.
<asp:ImageButton runat="server" ID="imgRemoveCostCenter" ImageUrl="~/Images/Remove.png" OnItemCommand="rad_CostCenters_ItemCommand" CommandName="HideCostCenter" />

The grid itself has the OnItemCommand event bound.
<telerik:RadGrid ID="rad_CostCenters" OnItemCommand="rad_CostCenters_ItemCommand" AllowMultiRowEdit="true" AutoGenerateColumns="false" EnableTheming="true" Skin="Default" AllowSorting="false" runat="server" ShowHeader="true" OnItemDataBound="Rad_ManagersList_ItemDataBound">

Have a GridTemplateColumn to hold the "ActionID"
<telerik:GridBoundColumn UniqueName="ActionID" DataField="ActionID" Visible="false" />

and finally have the function in the code-behind:
protected void rad_CostCenters_ItemCommand(object sender, GridCommandEventArgs e)
{
    GridDataItem item = (GridDataItem)e.Item;
 
    int _ActionID = Convert.ToInt16(item["ActionID"].Text);
 
    if (e.CommandName == "HideCostCenter")
    {
        _ActionID = -1;
    }
    rad_CostCenters.Rebind();
}
protected void Rad_ManagersList_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridDataItem)
    {
        GridDataItem item = (GridDataItem)e.Item;
        DataRowView drv = (DataRowView)e.Item.DataItem;
 
        int _ActionID = Convert.ToInt16(item["ActionID"].Text);
 
        if (_ActionID == -1)
        { item.Display = false; }
    }
}

How can I get this to set the actionID so it can be rebound?
Jayesh Goyani
Top achievements
Rank 2
 answered on 04 Jan 2012
2 answers
63 views
I have a horizontal menu that works perfectly and looks exactly as intended in 2011 version of Firefox, Chrome, and Safari.
But - surprise - does look right in IE 9.   What happens is that the height of the menu is squeezed by about 5 pixels, so that it is less than the divider images. On mouseover the height of the buttons is correct. 

I am using Q3 2010 and don't want to pay for a version upgrade just for this issue on this site.
Is there a css hack that can be applied to correct the button height for the case of IE9 browser?

See attached screen shot

Thanks

Clive
Clive Hoggar
Top achievements
Rank 1
 answered on 04 Jan 2012
0 answers
70 views
Hello,

I am trying to design a recursive Search to allow people to search for files and folders, but need some help from the community and possibly telerik support staff if they so choose.

I was thinking of a pop-up window that as the users types into the textbox it performs ajax to get a list of all folders and files found within the current folder.

There would be an options to search Folders, Files or both. The would display a list and when a item from the list is clicked it will navigate to that item. If its a directory then load the directory, if its a file load the parent directory and select the file.
I have a sample that has a custom search button and when clicked I can manually load a given folder.

Any help would be appreciated.
David Beck
Top achievements
Rank 1
 asked on 04 Jan 2012
4 answers
315 views
Hello!

I´m trying to upgrade my code to the RadControls for ASP.NET AJAX. but get the error Unable to create type 'rad:RadSplitter'. Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

The error fires at the row declaring radsplitter.

I´m working in a web solution and the only extern dll I´ve included into reference is Telerik.Web.UI.

I´ve installed net3.5, but the code worked before with the old radcontrols.

<%

@ Register TagPrefix="rad" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<rad:RadSplitter id="rs_Content" runat="server" width="100%" Height="1000px" Orientation="Vertical" Skin="Default">
<rad:RadPane id="rp_Menu" runat="server" scrolling="none" Width="205px">
<div id="masterpage_div_moduledropdown">
<rad:RadComboBox ID="ddModules" runat="server" Width="200px" Skin="Vista" MarkFirstMatch="false" HighlightTemplatedItems="True" ShowToggleImage="True" AllowCustomText="false" EnableLoadOnDemand="false" AutoPostBack="true" onselectedindexchanged="ddModules_SelectedIndexChanged">

Dobromir
Telerik team
 answered on 04 Jan 2012
8 answers
215 views
Is there a way to get uploading files in server side?

I know I can get uploaded files thru AsyncUpload1.UploadedFiles, but I want the currently uploading files.

Thanks,
MTs
Bozhidar
Telerik team
 answered on 04 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?