Telerik Forums
UI for ASP.NET AJAX Forum
16 answers
1.7K+ views
Hi,

I need to show confirmation before performing action when i click on RadButton.

Please help me...

Thanks in advance...
Danail Vasilev
Telerik team
 answered on 22 May 2015
12 answers
242 views
I'm on my last good nerve trying to get going with telerik ajax development.  My issue is everything seems to be going find and then get back into visual studio later and get a ton of design time errors rendering the controls (see attached image).

Error Rendering Control - RadScriptManager1
An unhandled exception has occurred...

Error Rendering Control - RadAjaxManager1
An unhandled exception has occurred...

Error Rendering Control - RadSkinManager1
An unhandled exception has occurred...

I know this is probably caused by some of the other attempts I took at using these controls and there is somehow some cruft left from a previous install.  But here are my questions:

1.  How the heck do I get my system clean of any of the older cruft?

2. This begs the question of how would one ever be able to develop under a newer version (or 2 different versions at one time)

I have 20 years industry experience and I have been doing .NET development every single day for the last 2 years and your products DRIVE ME CRAZY!!!  They are often harder to get set up than open source software.  This is very upsetting after dropping 1000 bucks on this stuff!!!





Marin Bratanov
Telerik team
 answered on 22 May 2015
6 answers
236 views
Hi
I'm troubled a lot with this strange problem in one of my ASPX page. Background, in all pages including this one, the columns are resizable and reorderable and I have got this GridSettingsPersister.SaveSettings() for all pages to retain the user preferences.In all these pages I'm using inbuilt GridEditCommandColumn. In problem page, I'm using GridTemplateColumn as first column that has a link to open custom edit pop up. Now the problem is that when I reorder the column and save setting by gsPersister and redirect and then come back to the page; that GridTemplateColumn with edit link is gone, like it did not existed at all. I cannot figure out why my Custom(TemplateColumn) Edit Column is lost when I save the Grid Settings and revisit the page. I have other custom Template Columns as well with hyperlinks, which stay intact.
Please help.

The aspx code:
 
<div id="divlistInUsers">
                            <telerik:RadGrid ID="RGSiteConfig" runat="server" AllowPaging="True" AllowSorting="True"
                                AutoGenerateColumns="False"
                                OnNeedDataSource="RGSiteConfig_NeedDataSource" OnInsertCommand="RGSiteConfig_InsertCommand"
                                OnItemDataBound="RGSiteConfig_ItemDataBound" OnItemCommand="RGSiteConfig_ItemCommand"
                                OnPreRender="RGSiteConfig_PreRender"
                                AllowFilteringByColumn="true" EnableLinqExpressions="false"
                                Skin="Silk"
                                PageSize="10" Width=""
                                HeaderStyle-Font-Bold="true"
                                AlternatingItemStyle-BackColor="#f0f0f0">
                                <GroupingSettings CaseSensitive="false" />
                                <PagerStyle Mode="NextPrevAndNumeric" />
                                <MasterTableView CommandItemDisplay="Top" DataKeyNames="SiteID" InsertItemPageIndexAction="ShowItemOnFirstPage" CommandItemSettings-ShowRefreshButton="false">
                                    <Columns>
<%--<telerik:GridTemplateColumn HeaderStyle-Width="10px" AllowFiltering="false" AllowSorting="false" Resizable="true" Reorderable="false">
                                            <ItemTemplate>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
<telerik:GridEditCommandColumn UniqueName="EditCommandColumn" HeaderStyle-Width="40px" Resizable="false" Reorderable="false" />--%>
                                        <telerik:GridTemplateColumn HeaderStyle-Width="40px" AllowFiltering="false" AllowSorting="false" Resizable="true" Reorderable="false">
                                            <ItemTemplate>
                                                <asp:LinkButton ID="lnkEdit" runat="server" Text="Edit"
CommandArgument='<%# Eval("SiteID").ToString() + "," +
Eval("ContractorID").ToString() + "," +
Eval("CountryOfOrigin").ToString() + "," +
Eval("SiteIsActive").ToString() + "," +
Eval("ContractorIsActive").ToString() + "," +
Eval("CSIEnabled").ToString() + "," +
Eval("MCSInstalled").ToString() + "," + Eval("IsCM").ToString()%>'
                                                    CommandName="EditSiteConfig" CausesValidation="false" />
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridBoundColumn SortExpression="SiteName" DataField="SiteName" HeaderText="MCS Site Name" HeaderStyle-Width="150" />
                                        <telerik:GridTemplateColumn HeaderText="Mapped PSA Companies" AllowFiltering="false" AllowSorting="false" HeaderStyle-Width="150">
                                            <ItemTemplate>
                                                <asp:Label ID="lblAssignTCACompanies" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "NoOfTCAs")%>' />
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn SortExpression="Total" HeaderText="Users(UPM/CP)" Visible="true" AllowFiltering="false" HeaderStyle-Width="100">
                                            <ItemTemplate>
                                                <asp:Label ID="lblAssignOperatorsToSite" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "NoOfOperators") + "/" + DataBinder.Eval(Container.DataItem, "NoOfCPUsers")%>' />
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn SortExpression="NoOfPermissions" HeaderText="Permissions" DataField="NoOfPermissions" AllowFiltering="false" HeaderStyle-Width="100">
                                            <ItemTemplate>
                                                <asp:Label ID="lblAssignPermissionsToSite" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "NoOfPermissions")%>' />
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderStyle-Width="145px" AllowFiltering="false" AllowSorting="false"
                                            Resizable="false" Reorderable="false" HeaderText="Export CM Details">
                                            <ItemTemplate>
                                                <asp:HyperLink ID="lnkExportInGrid" runat="server" Text="Export CM Details" NavigateUrl='<%# Eval("SiteID", "~/DownloadFile.aspx?SiteID={0}")%>' Target="_blank" />
                                                <input runat="server" type="hidden" id="hdTotal" value='<%# DataBinder.Eval(Container.DataItem, "Total")%>' />
                                                <input runat="server" type="hidden" id="hdNoOfIPs" value='<%# DataBinder.Eval(Container.DataItem, "NoOfIPs")%>' />
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                    </Columns>
                                    <EditFormSettings EditFormType="Template" CaptionFormatString="Add/Edit Site" FormCaptionStyle-Font-Bold="true">
                                        <PopUpSettings Width="555px" Modal="true" />
                                        <FormTemplate>
                                            <table cellpadding="2" cellspacing="5" border="0" width="100%" rules="none"
                                                style="border-collapse: collapse;">
                                                <tr>
                                                    <td>Site ID</td>
                                                    <td>
                                                        <asp:Label ID="lblSiteID" runat="server" Text='<%# Bind("SiteID")%>' />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>Contractor ID</td>
                                                    <td>
                                                        <asp:Label ID="lblContractorID" runat="server" Text='<%# Bind("ContractorID")%>' />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>MCS Site Name</td>
                                                    <td>
                                                        <asp:TextBox ID="txtSiteName" runat="server" Text='<%# Bind("SiteName")%>'
                                                            MaxLength="50" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>Country</td>
                                                    <td>
                                                        <asp:DropDownList ID="lbCountryCode" runat="server" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>Uses LS Web</td>
                                                    <td>
                                                        <asp:CheckBox ID="chkContractorActive" runat="server" Enabled="false" Checked='<%# (DataBinder.Eval(Container.DataItem,
"ContractorIsActive") == DBNull.Value ? true : Eval("ContractorIsActive"))%>' />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>Uses CSI App</td>
                                                    <td>
                                                        <asp:CheckBox ID="chkCSIEnabled" runat="server" Checked='<%# (DataBinder.Eval(Container.DataItem, "CSIEnabled").ToString() == "True" ? true : false)%>' />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <input runat="server" type="hidden" id="hdSiteName" value='<%# Bind("SiteName")%>' />
                                                        <input runat="server" type="hidden" id="hdCountry" value='<%# Bind("CountryOfOrigin")%>' />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td></td>
                                                    <td>
                                                        <asp:Button ID="btnUpdate" Text="Insert" runat="server" CommandName="PerformInsert"
                                                            CausesValidation="false" CssClass="button"></asp:Button>
                                                        <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="false"
                                                            CommandName="Cancel" CssClass="button"></asp:Button>
                                                    </td>
                                                </tr>
                                            </table>
                                        </FormTemplate>
                                    </EditFormSettings>
                                </MasterTableView>
                                <ClientSettings AllowColumnsReorder="true" ColumnsReorderMethod="Reorder" ReorderColumnsOnClient="true">
                                    <ClientEvents OnRowDblClick="" OnPopUpShowing="onPopUpShowing" />
                                    <Resizing AllowRowResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="True" AllowColumnResize="True" />
                                </ClientSettings>
                            </telerik:RadGrid>
                        </div>
Kostadin
Telerik team
 answered on 22 May 2015
1 answer
40 views

I have been unable to figure out an appropriate column type for my situation. What I need is to on Item data bound check if there is a string in the column. If there is I need to display an image. When the user clicks the image I need to fire a command event which I will then download a file for the user. The issue is that when I use Grid Bound Column and add an Image Button on item data bound to the control the command event does not fire. If I click the cell the image disappears and the text shows. If I then click on the text the event fires. If i use the Image Column then I have no way to fire the command event on click. There has to be a way to do this. Any suggestions would be appreciated. Thank you.

 

Eyup
Telerik team
 answered on 22 May 2015
1 answer
78 views

Hi,

 

I am trying to implement RadCompression in my project.

I have followed the steps listed at http://www.telerik.com/help/aspnet-ajax/compression.html for Rad Compression as well as Viewstate compression.

I was able to add the code changes and build my solution.

Then I generated a report using Fiddler to capture Viewstate size, % of Uncompressed page size and File size but could not see any difference in the metrics pre and post implementation.

 

Is there anything else we should include in the code to make it work?

 

 

Maria Ilieva
Telerik team
 answered on 22 May 2015
3 answers
162 views

I have a RadMenu within a rather complex arrangement of RadPanes and RadSplitters.  

The problem is that sometimes the area which contains the RadMenu has an active horizontal scrollbar and when the RadMenu expands, the expansion is hidden.  This is an especially big problem in low-res screens.

I've found an assortment of references that refer to setting the z-index of the Radmenu in a variety of ways but these appear to be obsolete. (Such as switching style settings in and out using client side calls that no longer exist?)

Is there any way to insure the current RadMenu is always on top?

Magdalena
Telerik team
 answered on 22 May 2015
2 answers
241 views
It seems like I've run into a bug in my radgrid that does not allow me to select multiple rows.  Basically, if I click the checkboxes then I can select multiple rows.  However, if I click the row anywhere except the checkbox it selects that row but deselects all the other selected rows.  It looks like my only option right now is to forego row selecting and just implement my own custom checkbox column.  I'd rather not do this since it will require a lot of code changes (validation etc...) so I wanted to check here to see if anyone has any ideas.
My current Telerik version according to the DLL is 2011.3.1305.35.  My code is below.

<telerik:radgrid id="rgItems" runat="server" autogeneratecolumns="false" enableembeddedskins="false" onneeddatasource="rgItems_NeedDataSource" onitemdatabound="rgItems_ItemDataBound" allowmultirowselection="true">
  <clientsettings enablerowhoverstyle="true">
    <selecting allowrowselect="true" />
  </clientsettings>
  <mastertableview datakeynames="itemID,subItemID" allowsorting="true">
    <columns>
      <telerik:gridclientselectcolumn uniquename="clientSelectColumn" itemstyle-width="30px" headerstyle-width="30px" headerstyle-horizontalalign="Center" itemstyle-horizontalalign="Center" />
      <telerik:gridboundcolumn datafield="itemName" sortexpression="itemName" headertext="Item Name" />
    </columns>
  </mastertableview>
</telerik:radgrid>


Ravindra
Top achievements
Rank 1
 answered on 22 May 2015
1 answer
75 views

Hello,

i have implemented a RadGrid with DetailItemTemplate, which works fine,

but the DetailItemTemplate isn't exported to Excel / PDF.

Is this behaviour by design or am I doing anything wrong ?

 

Thanks in advance.

 

 

 

Kostadin
Telerik team
 answered on 22 May 2015
3 answers
224 views
Is there a way to assign multiple column headers in the timelineview?

For instance, I'd like  a column header indicating date, then just below it, a sub column showing the time.  

See attached images.
Nencho
Telerik team
 answered on 22 May 2015
3 answers
188 views

Hello,

I am trying to print just my RadHtmlChart using JavaScript but when I press the event button to activate the script the chart disappears, the components I want to hide successfully hide. I specifically state in my JavaScript code to only hide 2 other components but keep the chart. Also, when I cancel the prompt to print all of the components stay hidden, instead of being shown. Here is my code:

 

01.<script type="text/javascript">
02.     function printChart() {
03.          //Hide components but show chart
04.          document.getElementById("divGrid").style.display = 'none';
05.          document.getElementById("divOptions").style.display = 'none';
06.          document.getElementById("divChart").style.display = 'block';
07. 
08.          //Call the browser print method
09.          window.print();
10. 
11.          //Show components
12.          document.getElementById("divGrid").style.display = 'block';
13.          document.getElementById("divOptions").style.display = 'block';
14.          document.getElementById("divChart").style.display = 'block';
15.</script>

 

Thank you in advance!

Vessy
Telerik team
 answered on 22 May 2015
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?