Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
153 views
Is there a way to get FormDecorator to style custom controls i have on my page? They are just modified DropDownList controls but the FormDecorator doesn't pick them up.
Danail Vasilev
Telerik team
 answered on 31 Jan 2013
3 answers
148 views
Hello,

I have a search function on every page. The way this works is that a button is pressed the Master page catches the button press and then redirects to a "suche.aspx" page.

On updating the Telerik dll this has stopped working in IE8. IE8 tries to download a file.

What I think causes the problem is at some point an extra "Response header" is added, "Content-encoding: gzip", so that there are now two, which confuses the browser (but not IE9 or Firefox -- FF renders the header as "Content-encoding: gzip, gzip" but accepts it).

The answer seems to be to use Response.ClearHeaders() before the redirect (or turning off postback compression, which worked when this problem was confined to a couple of pages and I could use the "excludeHandler" for those) .

I am hesitant, however, as a previous DLL required the removing of Response.ClearHeaders() for IE8 to work and I thought it best to get clarification as to the best practice here.

Thank you

Paul Herzberg
Martin
Telerik team
 answered on 31 Jan 2013
1 answer
108 views

I output RadGrid to Excel <Excel Format="Html"></Excel>

Here are my issues; (I have attached a picture to help illustrate my questions)

 

  1. Is there a way to know what row the Grid is currently writing to in Excel? Something like "Excel.CurrentRowNumber"?

Reason: I'm writing formulas to various cells during RadGrid1_ExcelExportCellFormatting but the first row of data it encounters gets written to Excel row 4 (because of the Grid Header). I tried using item.ItemIndex but that starts off at 0 (or 1 maybe, i don't recall). So my formulas are all messed up since I don't know what the current row in Excel is. I need to write out formulas like C4+D4 but I end up with C1+D1.
The problem gets worse as  GroupByExpressions are encountered. Each time my data is grouped another 2 rows get written to Excel and now my current row is off by even more.

2. Is there a way to interact with the output to Excel when GroupByExpressions are encountered? I'd like to adjust the cells during that time such as inserting formulas to sum up all the rows in a section for each column. Same question regarding the GridFooterItem..? I'd like to put "grand total formulas" in those various columns.

3. I can't get rid of column A. There is a blank column that gets written out (see my picture). It seems to be known as "column" so I tried hiding it such as:

RadGrid1.MasterTableView.GetColumn("column").Display = false;

but no luck. This is only a minor annoyance, I could live with this as the formula questions above are the more important showstoppers.

Thank you!!

Daniel
Telerik team
 answered on 31 Jan 2013
1 answer
92 views
I have a menu that has background images.  The menu is the appropriate width (lining up with other items within the div container) when zoom is set to 100% in IE, Chrome and Firefox.  However, when I zoom in the width varies in relation to the other items on the page.  Sometimes the overall width is narrower than it should be.  Other times it is wider than the container, which causes it to wrap.

Any insight into what the cause might be would be greatly appreciated!

Thank you,
--Larry--
Ivan Zhekov
Telerik team
 answered on 31 Jan 2013
1 answer
195 views
I have a RadTabStrip + RadMultiPageView + RadPageView + RadWindow on mainpage.aspx

RadPageView  I am utilizing contenturl='contentpage.aspx'

I am wanting to do the following call on contentpage.aspx

var w = radopen('dialogpage.aspx', null);

w.maximize();

w.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close);


But this only sets it to full screen within the bounds of RadPageView.

I cant do
var w = parent.radopen('dialogpage.aspx', null);

w.maximize();

w.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close);


as I loose the ability to send requests back to the opening page utilizing:
function GetRadWindow()
{
var oWindow = null;
if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;//IE (and Moz as well)
return oWindow;
};
function CloseAndRebind()
{
GetRadWindow().Close();
GetRadWindow().BrowserWindow.UpdateFromPopup('information being passed back');
};

UpdateFromPopup would be called on mainpage.aspx instead of contentpage.aspx
any ideas on how to get the radwindow to maximize??
Marin Bratanov
Telerik team
 answered on 31 Jan 2013
1 answer
101 views
Hello,

While working with the TreeList Drag and Drop example, I've noticed that there doesn't appear to be a way to drag child nodes to the top-most level. Given that it is possible to drag root nodes beneath their peers to create child nodes, and since this functionality can be seen in the TreeView Drag and Drop example, I would expect that the control also supports the aforementioned scenario.

So, is there a property or setting that I must set to enable this behavior on the TreeList, or if the implementation is more complex, may I request an example showing how to achieve this?

UPDATE: I've managed to implement this functionality using a custom "ItemDrop" event handler. I'm still interested in identifying a simpler solution though.
Andrey
Telerik team
 answered on 31 Jan 2013
3 answers
79 views
Why have none of the latest webinars been posted online?
Most of us are not able to attend the webinars live due to time differences.

Are those of us who do not live in the US now no longer allowed to watch them?
Rumen
Telerik team
 answered on 31 Jan 2013
1 answer
138 views
Hi ,

I am strange issue in particular page.
I am using client side binding using following tag
        <DataBinding Location="~/ReportManagement/ReportDesigner.aspx" SelectMethod="wmBindSecurity" />
After page load 10 records display properly, but in pagination bar page number is missing ,and also it is written 0 items in 0 pages.
and page size changing works perfectly.


On change of next or prev request is not going to server side.

Please help me .
I am using following code.

ASPX
<telerik:RadGrid ID="rgSecurity" runat="server" AllowPaging="true" AllowMultiRowSelection="True"
                           GridLines="None" AllowSorting="true" Width="99%">
                           <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" />
                           <ItemStyle Wrap="false" />
                           <HeaderStyle Wrap="false" />
                           <ClientSettings EnableRowHoverStyle="true" AllowColumnsReorder="true" AllowColumnHide="true"
                               Resizing-AllowColumnResize="true" Resizing-EnableRealTimeResize="true" ReorderColumnsOnClient="true">
                               <Resizing ResizeGridOnColumnResize="true" ClipCellContentOnResize="false" />
                               <DataBinding Location="~/ReportManagement/ReportDesigner.aspx" SelectMethod="wmBindSecurity" />
                               <Selecting AllowRowSelect="true" />
                               <ClientEvents OnRowSelected="RowSelected" OnRowDeselected="RowSelected" OnDataBindingFailed="rgSecurity_OnDataBindingFailed">
                               </ClientEvents>
                           </ClientSettings>
                           <MasterTableView AutoGenerateColumns="false" AllowNaturalSort="false" ClientDataKeyNames="Id"
                               CommandItemDisplay="Top">
                               <CommandItemTemplate>
                                   <telerik:RadToolBar ID="rtbSecurity" runat="server" Height="26px" Width="100%" ClientIDMode="Static"
                                       OnClientButtonClicking="rtbSecurity_onToolBarClientButtonClicking">
                                       <Items>
                                           <telerik:RadToolBarButton Text="Add" ImageUrl="~/Images/NewEnable2.png" runat="server"
                                               ClientIDMode="Static" Value="Add" CommandName="Add" CssClass="RadToolBar">
                                           </telerik:RadToolBarButton>
                                           <telerik:RadToolBarButton Text="Remove" ImageUrl="~/Images/imgDelBtnEnable.png" runat="server"
                                               ClientIDMode="Static" Value="Delete" CommandName="Delete" CssClass="RadToolBar"
                                               Enabled="false">
                                           </telerik:RadToolBarButton>
                                       </Items>
                                   </telerik:RadToolBar>
                               </CommandItemTemplate>
                               <Columns>
                                   <telerik:GridClientSelectColumn UniqueName="column" HeaderStyle-Width="35px" ItemStyle-Width="35px"
                                       Resizable="false">
                                   </telerik:GridClientSelectColumn>
                                   <telerik:GridTemplateColumn UniqueName="Name" HeaderText="Name" SortExpression="Name"
                                       ShowSortIcon="true" ItemStyle-Wrap="false">
                                       <ClientItemTemplate>
                                           <label id="aName_#=Id#" border="0"  #=Type == 0 ? "style='background: url(../Images/usersetting.png) top left no-repeat !important;padding-left:18px'" :  "style='background: url(../Images/user-groups.png) top left no-repeat !important;padding-left:18px'"#>#=Name#</label>
                                       </ClientItemTemplate>
                                       <ItemStyle Wrap="false" />
                                       <HeaderStyle Wrap="false" />
                                   </telerik:GridTemplateColumn>
                                   <telerik:GridTemplateColumn UniqueName="AllowRead" HeaderText="Read" SortExpression="AllowRead"
                                       ShowSortIcon="true" HeaderStyle-Width="10%" ItemStyle-Width="10%">
                                       <ClientItemTemplate>
                                           <input type="checkbox" id="chk_read_#=Id#" #=AllowRead == true ? "checked" : "" # #=AllowWrite == true ? "disabled" : "" # onclick="javascript:OnChangeSecurity('#=Id#','#=Type#')"/>
                                       </ClientItemTemplate>
                                   </telerik:GridTemplateColumn>
                                   <telerik:GridTemplateColumn UniqueName="AllowWrite" HeaderText="Write" SortExpression="AllowWrite"
                                       ShowSortIcon="true" HeaderStyle-Width="15%" ItemStyle-Width="15%">
                                       <ClientItemTemplate>
                                             <input type="checkbox" id="chk_write_#=Id#" #=AllowWrite == true ? "checked" : "" # onclick="javascript:OnChangeSecurity('#=Id#','#=Type#')"/>
                                       </ClientItemTemplate>
                                   </telerik:GridTemplateColumn>
                               </Columns>
                           </MasterTableView>
                       </telerik:RadGrid>


JS

function RowSelected(rowObject, args) {

            if (args != null)
                gridEventArg = args;

            var length = $find(rgSecurity_id).get_selectedItems().length;
            var radGrid = $get(rgSecurity_id);
            var radToolBar = $telerik.findControl(radGrid, "rtbSecurity");
            var addButton = radToolBar.get_items().getItem(0);
            var removeButton = radToolBar.get_items().getItem(1);
            switch (parseInt(length)) {
                case 0:
                    addButton.set_enabled(true);
                    removeButton.set_enabled(false);
                    break;
                case 1:
                    addButton.set_enabled(false);
                    removeButton.set_enabled(true);
                    break;
                default:
                    addButton.set_enabled(false);
                    removeButton.set_enabled(true);
                    break;
            }
        }
[WebMethod]
       public static Dictionary<string, object> wmBindSecurity(int startRowIndex, int maximumRows, List<GridSortExpression> sortExpression, List<GridFilterExpression> filterExpression)
       {
           if (HttpContext.Current.Session["UserName"] == null)
               throw new Exception("SESSION_TIMEOUT");
 
           Dictionary<string, object> data = new Dictionary<string, object>();
 
           if (HttpContext.Current.Session["AnalystFile"] == null)
               throw new Exception("SESSION_TIMEOUT");
 
           List<SQCUser> allUsers = SQCUserList.GetUserList();
 
           List<SQCUserGroup> allGroups = SQCUserGroupList.GetGroupList();
 
           List<SQCUserGroupResourceMapping> lstUserGroupResourceMapping = ((SQWAnalystFile)HttpContext.Current.Session["AnalystFile"]).UserGroupReportMapping;
 
           List<SQCUserResourceMapping> lstUserResourceMapping = ((SQWAnalystFile)HttpContext.Current.Session["AnalystFile"]).UserReportMapping;
 
           List<SQCUser> oUsers = SQCUserList.GetUserList();
 
           var oData = lstUserGroupResourceMapping.Select(o => new
           {
               Id = o.GroupId,
               Name = allGroups.Find(g => g.GroupId == o.GroupId).GroupName,
               Type = "User Group",
               AllowRead = o.AllowRead,
               AllowWrite = o.AllowWrite
           }).ToList();
 
           oData.AddRange(lstUserResourceMapping.Select(p => new
           {
               Id = p.UserId,
               Name = SQCUserList.GetUserByUserID(p.UserId).UserName,
               Type = "User",
               AllowRead = p.AllowRead,
               AllowWrite = p.AllowWrite
           }).ToList());
 
           if (oData.Count > 0)
                data.Add("Data", oData.Skip(startRowIndex).Take(maximumRows));              
           else
               data.Add("Data", new List<SQCUserGroupResourceMapping>());
           data.Add("Count", 0);
           return data;
 
       }

Thanks & Regards ,
Somnath 
Antonio Stoilkov
Telerik team
 answered on 31 Jan 2013
1 answer
179 views
Hi,

How can I make  RadDatePicker's default date to today's date when it opens? My RadDatePicker is one of the column in the radgrid, when I do filter, I like to open the RadDatePicker with today's date highlighted.

Thanks,
Sigma
Shinu
Top achievements
Rank 2
 answered on 31 Jan 2013
1 answer
335 views
Hi,

I have a RadDatePicker in the EditItemTemplate of RadGRid. How to make the datepicker readonly in edit mode?

<EditItemTemplate>
   <telerik:RadDatePicker ID="RadDatePicker1" runat="server" ></telerik:RadDatePicker>
</EditItemTemplate>

Thanks,
Sigma
Shinu
Top achievements
Rank 2
 answered on 31 Jan 2013
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?