Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
193 views
RadToolBarButton is Clicked its shows Popupwindow or Customizer Dialog  window with ADD/Edit Button its possible in telerik


Thanks
Rahuman
Kate
Telerik team
 answered on 05 May 2011
1 answer
98 views
Hi All

I have a shopping cart grid which holds its data in a session and i show it inside a jquery colorbox.Everything was working fine when the shopping box was inside a div in page.Then i moved the grid standalone to a different page and in that page client events are working.
However when call them from another page inside a jquery colorbox, Clientside events are not firing, I thought maybe the problem is colorbox but i can call other javascripts on that page. Any idea why its not working?

Here is my code:
         <telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
        <script type="text/javascript"><br>
        <!--           <br>
            function calculate(price, quantity, kdvOran, araToplam, kdvToplam, toplam) {<br>
                var text2 = $find(quantity);<br>
                var text4 = $find(araToplam);<br>
                var text5 = $find(kdvToplam);<br>
                var text6 = $find(toplam);<br>
                var subtotal = price * text2.get_Value();<br>
                text4.set_value(subtotal);<br>
                var taxtotal = price * text2.get_Value() * kdvOran;<br>
                text5.set_value(taxtotal);<br>
                text6.set_value(subtotal + taxtotal);<br>
            }<br>
<br>
<br>
            function OnClientValueChanged(sender, args) {<br>
                alert('test');<br>
                var grid = $find("<%=grdShoppingList.ClientID %>");<br>
                var MasterTable = grid.get_masterTableView();<br>
                var length = MasterTable.get_dataItems().length;<br>
                for (var i = 0; i < length; i++) {<br>
                    var row = MasterTable.get_dataItems()[i];<br>
                    var quantity = row.findControl("Numeric1"); //access the Label control<br>
                    if (quantity.get_id() == sender.get_id()) {<br>
                        var cell = MasterTable.getCellByColumnUniqueName(row, "Price");<br>
                        var price = cell.innerHTML.replace(/\,/g, '.');<br>
                        var adet = quantity.get_value();<br>
                        var subtotal = price * adet;<br>
                        cell = MasterTable.getCellByColumnUniqueName(row, "TaxRate");<br>
                        var taxRate = cell.innerHTML.replace(/\,/g, '.');<br>
                        var taxTotal = subtotal * taxRate;<br>
                        taxRate = parseFloat(taxRate) + 1;<br>
<br>
                        var total = subtotal * taxRate;<br>
<br>
                        row.findElement("lblAraToplam").innerHTML = subtotal;<br>
<br>
                        row.findElement("lblKdvToplam").innerHTML = taxTotal;<br>
                        row.findElement("lblToplam").innerHTML = total;<br>
<br>
            }       <br>
            --><br>
            <br>
        </script>

    </telerik:RadCodeBlock>

<br>
 <telerik:RadScriptManager ID="RadScriptManager1" runat="server"><br>
    </telerik:RadScriptManager><br>
       <div id='shoppinglist' style='padding: 10px; background: #fff;'><br>
             <telerik:RadGrid ID="grdShoppingList" Culture="tr-TR" runat="server" <br>
                 AutoGenerateColumns="False" GridLines="None" <br>
                 onitemdatabound="grdShoppingList_ItemDataBound"><br>
<MasterTableView><br>
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings><br>
<br>
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"><br>
<HeaderStyle Width="20px"></HeaderStyle><br>
</RowIndicatorColumn><br>
<br>
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"><br>
<HeaderStyle Width="20px"></HeaderStyle><br>
</ExpandCollapseColumn><br>
<br>
    <Columns><br>
       <telerik:GridBoundColumn HeaderStyle-Width="25px" DataField="ProductID" DataType="System.Int32"<br>
                            FilterControlAltText="Filter ProductID column" HeaderText="Ürün Kodu" ReadOnly="True"<br>
                            SortExpression="ProductID" UniqueName="ProductID"><br>
                            <HeaderStyle Width="25px" /><br>
                        </telerik:GridBoundColumn><br>
                                <telerik:GridBoundColumn  DataField="BrandName" <br>
                            HeaderText="Marka" SortExpression="BrandName" UniqueName="BrandName"><br>
                            <HeaderStyle Width="300px" /><br>
                        </telerik:GridBoundColumn><br>
                        <telerik:GridBoundColumn HeaderStyle-Width="300px" DataField="ProductName" FilterControlAltText="Filter ProductName column"<br>
                            HeaderText="Ürün Adı" SortExpression="ProductName" UniqueName="ProductName"><br>
                            <HeaderStyle Width="300px" /><br>
                        </telerik:GridBoundColumn><br>
                          <telerik:GridTemplateColumn  HeaderText="Adet"<br>
                            UniqueName="Quantity"><br>
                            <ItemTemplate><br>
                              <telerik:RadNumericTextBox Width="50px"  NumberFormat-DecimalDigits="0" ShowSpinButtons="true" IncrementSettings-InterceptArrowKeys="true" Text='<%#Eval("Quantity").ToString() %>'<br>
                IncrementSettings-InterceptMouseWheel="true" runat="server"<br>
                ID="Numeric1" DataType="System.Int32"  MinValue="1"><br>
                        <ClientEvents  OnValueChanged="OnClientValueChanged" />          <br>
            </telerik:RadNumericTextBox><br>
                            </ItemTemplate><br>
                        </telerik:GridTemplateColumn><br>
                             <telerik:GridBoundColumn DataField="Price" DataType="System.Decimal" FilterControlAltText="Filter CompanyPrice column"<br>
                            HeaderText="Birim Fiyat" AllowFiltering="false" DataFormatString="{0:0.00}"<br>
                            ReadOnly="True" SortExpression="Price" UniqueName="Price"><br>
<br>
                        </telerik:GridBoundColumn><br>
                          <telerik:GridBoundColumn  DataField="TaxRate" DataType="System.Decimal"<br>
                            HeaderText="Kdv Oran" AllowFiltering="false" DataFormatString="{0:0.00}"<br>
                            ReadOnly="True" SortExpression="TaxRate" UniqueName="TaxRate"><br>
<br>
                        </telerik:GridBoundColumn><br>
                <br>
                                             <telerik:GridTemplateColumn  HeaderText="Ara Toplam"<br>
                            UniqueName="SubTotal"><br>
                            <ItemTemplate><br>
                                <asp:Label ID="lblAraToplam" runat="server" Text=""></asp:Label><br>
                            </ItemTemplate><br>
                        </telerik:GridTemplateColumn><br>
                                                <telerik:GridTemplateColumn  HeaderText="KDV Toplam"<br>
                            UniqueName="TaxTotal"><br>
                            <ItemTemplate><br>
                                <asp:Label ID="lblKdvToplam" runat="server" Text="Label"></asp:Label><br>
                            </ItemTemplate><br>
                        </telerik:GridTemplateColumn><br>
                                             <telerik:GridTemplateColumn  HeaderText="Toplam"<br>
                            UniqueName="Total"><br>
                            <ItemTemplate><br>
                                <asp:Label ID="lblToplam" runat="server" Text=""></asp:Label><br>
                            </ItemTemplate><br>
                        </telerik:GridTemplateColumn><br>
<br>
<br>
<br>
    </Columns><br>
<br>
<EditFormSettings><br>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn><br>
</EditFormSettings><br>
</MasterTableView><br>
<br>
<FilterMenu EnableImageSprites="False"></FilterMenu><br>
<br>
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu><br>
             </telerik:RadGrid>   <br>
<br>

 
Marin
Telerik team
 answered on 05 May 2011
1 answer
114 views
I'm using a RadContextMenu that works fine except that it doesn't close completely when I click away from it.  When it closes, it slides back up into invisibility, except the bottom 9 or 10 pixels remain visible.

This RadContextMenu is invoked when the user clicks on an imagebutton that is within a radgrid.
                                    <telerik:GridTemplateColumn UniqueName="Actions" ItemStyle-Width="10%">
                                        <ItemTemplate>
                                            <oscarcontrols:OscarImageButton runat="server" ID="imgSetting" ImageUrl="~/images/bg_btn_setting.png" OnClientClick='<%# "showMenu(event, " + DataBinder.Eval(Container.DataItem, "OrdID") + ")" %>' /> 
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
  
...
  
        <Telerik:RadContextMenu id="RadContextMenu1" runat="server"
            EnableRoundedCorners="true" EnableShadows="true" OnItemClick="RadContextMenu1_ItemClick">
            <Items>
                <Telerik:RadMenuItem Text="Approve" />
                <Telerik:RadMenuItem Text="Decline" />
                <Telerik:RadMenuItem Text="Info Request" />
            </Items>
        </Telerik:RadContextMenu>
Kate
Telerik team
 answered on 05 May 2011
46 answers
412 views
Hi,

I've read in a few places that the reusable content functionality found in MOSS WCM doesn't work correctly when using the Telerik RAD Editor.

We're looking to purchase the RAD Editor for our SharePoint WCM offering, but would like clarification around what exactly does and doesn't work regarding reusable content.

A lot of the postings I've found were from last year - I wondered what the current state of play is regarding this - have the issues been fixed ?

Any help appreciated.

Kind Regards,

Chris
Stanimir
Telerik team
 answered on 05 May 2011
2 answers
100 views
Hi,

I have two RadDock on my page, I want to customize the css of only second dock.
Basically I need to give margins only to the second Dock (rssbottom) only, how can I achieve this?

I tried to override the .RadDock css class but this one is applied on all the Docks on page.
I also tried .RadDock rssbottom but no success with this also.
Ajay
Top achievements
Rank 1
 answered on 05 May 2011
4 answers
140 views
Hi,

I seem to have a simple issue that I can't fix!

I have a RadToolBar within a RadGrid CommandItemTemplate.
When clicking any tool bar button, the functionality works fine but the state (ie: Checked) is lost.

When the button is clicked, the datatable is filtered, then I recall DataBind() then the tool bar button resets to the 'off' state.
Snippet below,

Any ideas for a quick fix?

Thanks,
Harry

  <CommandItemTemplate>
           <div class="filterEvents1">
<telerik:RadToolBar ID="tbButtons" runat="server" EnableEmbeddedBaseStylesheet="false" EnableEmbeddedSkins="false"   OnButtonClick="RadToolBar1_ButtonClick" EnableViewState="true" AutoPostBack="false" >
<Items>
<telerik:RadToolBarButton  CheckOnClick="true" ImageUrl="~/images/ico-all-inactive.png" Group="showAll"
CheckedImageUrl="~/images/ico-all-active.png" height="19px" Checked="false"  CommandName="showAll"  />
Maria Ilieva
Telerik team
 answered on 05 May 2011
4 answers
226 views
Hi, I'm using your example from http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/clienteditbatchupdates/defaultcs.aspx.  Everything works great except the update and I've spent too long trying to get it to work.

I have a 3 part column key (DataKeyNames="Col1,Col2,Col3").  In the RadAjaxManager_AjaxRequest I'm passing back the values of the keys, but what is the proper syntax (or method) to retrieve the GridDataItem object. 

RadGrid1.MasterTableView.FindItemByKeyValue(keyname, keyvalue); ????

Thanks.

Vasil
Telerik team
 answered on 05 May 2011
3 answers
93 views
I am using Auto-Generated columns for Edit/Delete on my grid.  How do I set them to imagebutton rather than linkbutton?


I am sure this is simple, but I can find it.
Martin
Telerik team
 answered on 05 May 2011
1 answer
70 views
Hello,

I have 2 custom commands and 1 close command. Though all the images are of same size they are not aligned and their size changes automaticaly. Plz see attached image.

CSS used:
.CustomCommandRefresh
    {
        top:1px !important;
        height:16px !important;
        padding-bottom:0px !important;
        margin-bottom: 0px !important;
        background: url(/Images/arrow_rotate_clockwise.png) no-repeat !important;
    }
    .CustomCommandEdit
    {
        top:1px !important;
        height:16px !important;
        padding-bottom:0px !important;
        margin-bottom: 0px !important;
        background: url(/Images/cog_edit.png) no-repeat !important;  
    }
    .CustomCommandClose .rdClose
    {
        top:1px !important;
        height:16px !important;
        padding-bottom:0px !important;
        margin-bottom: 0px !important;
        background: url(/Images/cross.png) no-repeat !important;  
    }
 .rdCommands
    {
        position: absolute !important;
        right: 0px;
        top: 1px;
        height:100%;
    }


Can you please suggest me css where it can be corrected each of size 16px and aligned in one line ?
Bozhidar
Telerik team
 answered on 05 May 2011
10 answers
158 views
Hello,

I've been working on installing a pre-existing and functioning Telerik-using Sharepoint site from another machine onto a fresh machine, as well as updating from .NET 2.0 to .NET 3.5 Telerik versions.  As it would turn out, things went terribly wrong.

I will attach a bunch of screenshots and code files so anyone who attempts to assist me with this issue will at least be armed with a visual depiction of the chaos I'm attempting to reconcile.  I have taken the following steps and tutorials in my attempts to make this work:

  • Adding various Assembly and Register commands into the .ascx/.aspx files in attempts to have it recognize tags and assemblies required
  • Multiple Google search results of similar issues, none of which seemed to have a beneficial effect
  • Heavily modifying the web.config based on tutorials and other help issues
  • Tutorial: ASP.NET AJAX 1.0 as a precursor to
  • Tutorial: ASP.NET AJAX 3.5
  • Conferred with multiple other developers on this issue.

Since I began writing this post, I've been attempting to rebuild and deploy the different modifications of the code for screenshot purposes and I am now receiving another error, which is most likely related to and/or caused directly by the web.config modifications I made based off posts and tutorials.  So I will have to explain using words.

Phase 1
Initially, the webparts were automatically implemented into the page by the code prior to loading the page, and would display a single line of text error which I can no longer re-create...but said something along the lines of the webpart encountered an error and cannot be displayed.  Eventually we remedied this by removing all automatic adding of the webpart, and ended up with a blank page on the initial load as is in the screenshots.

Phase 2
Now that we had the page loading and were just missing the webpart, we would add it manually via the Site Actions > Edit Page and Add a webpart options as are also shown in the screenshots.  This would result in one of two errors depending on the code.  
  • If the Telerik tags were not labelled correctly, (ex. rad:RadTab was called rad:Tab at one deploy) the webpart was added correctly and had a single line of text which stated "Data Not Available:Unknown server tag 'rad:Tab'."
  • The other error seemed to occur if all the spelling was correct and everything in the code was correct.  That was the generic Sharepoint error as shown in the screenshots.  "An Unexpected Error Occurred." which is of course informative and helpful.  And yes, the web.config had the settings set such that errors should be very verbose (customErrors=Off, debug=true, etc.)
So it would seem that I was very close to achieving the goal of getting the webpart added correctly... or perhaps not, because as of this morning when I was running through the AJAX tutorials which I had previously not gone through, I encountered something new

Phase 3
Currently upon attempting to add the webpart to the page, I receive an error I've never seen until today which likely means it's related to the web.config modifications I've made based off the noted tutorials.  This error is also shown in the screenshots; the dialog about the webpart not being 'safe' ...

So that's the basic story of my last week.  I will attach the current .ascx and associated .aspx pages, the web.config... anything else someone needs to see to help with this?

Thanks in advance should you attempt to aid me,
Jon

p.s. Apparently the attachments can only be images... how helpful.  Here's a link to the zip to download the files I wanted to attach to this post...

p.s.s. I will continue on my time to work on this as well and post if I find anything of interest / make progress...
Tsvetoslav
Telerik team
 answered on 05 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?