Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
102 views
Hi, i'm triying to hide all cells with cero value, i just wanto to see values greater than 0 (Cero),
thanks

Gino
Daniel
Telerik team
 answered on 27 Oct 2009
1 answer
155 views
I do have a radgrid and inside one column i am using another radgrid which has checkbox, userid, ssn.
on submit button, is it possible to loop through radgrid on client side and get all the ssn's? I would like to concatenate the ssn's separated by comma.
Schlurk
Top achievements
Rank 2
 answered on 27 Oct 2009
6 answers
291 views
What kind of changes do you guys think we'll see with .NET 4.0? I'm thihnking some of the new file reading, and viewstate features might lend some useful changes and/or additions.
Rob
Top achievements
Rank 1
 answered on 27 Oct 2009
7 answers
810 views
Hi,

I have a Radgrid, which populates with search criteria result set. My requirement is to clear the grid rows when user click on 'Clear criteria' button. I just want to clear the rows and keep the column names as it is.

Thanks
Evan
Telerik team
 answered on 27 Oct 2009
2 answers
331 views
I have a grid with some transactions bound to it. I have the grid working as intended except for when the header checkbox for the grid client select column is selected.

Page/Grid Markup:
        <telerik:RadAjaxManager ID="_pastManager" runat="server" EnableAJAX="true"
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="_pastItemsGrid"
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="_pastItemsGrid" /> 
                        <telerik:AjaxUpdatedControl ControlID="_selectedAmount" /> 
                        <telerik:AjaxUpdatedControl ControlID="_selectedValue" /> 
                        <telerik:AjaxUpdatedControl ControlID="_continueBtn" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
        <%--Grid containing the results--%> 
        <div style="margin: 15px 5px 15px 5px;"
            <telerik:RadGrid ID="_pastItemsGrid" runat="server" AllowMultiRowSelection="true" 
                ShowFooter="false" AutoGenerateColumns="false" AllowSorting="true" Skin="Web20"
                <HeaderStyle Font-Bold="true" HorizontalAlign="Left" /> 
                <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" /> 
                <ClientSettings EnablePostBackOnRowClick="true"
                    <Selecting AllowRowSelect="true" /> 
                </ClientSettings> 
                <MasterTableView DataKeyNames="TranID"
                    <Columns> 
                        <telerik:GridBoundColumn HeaderText="Date" DataField="Date" /> 
                        <telerik:GridBoundColumn HeaderText="Description" DataField="Description" /> 
                        <telerik:GridBoundColumn HeaderText="Amount" DataField="Amount" UniqueName="Amount" /> 
                        <telerik:GridTemplateColumn HeaderText="Reward Value" UniqueName="Value"
                            <ItemTemplate> 
                                <div style="color: #0DAE4B;"
                                    <asp:Label ID="_milesLabel" runat="server" Text='<%# GetCurrency(Eval("Miles")) %>' /> 
                                </div> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                        <telerik:GridClientSelectColumn HeaderText="Select" UniqueName="checkSelect" CommandName="RowClick" /> 
                    </Columns> 
                    <NoRecordsTemplate> 
                        <div> 
                            There were no records found.</div> 
                    </NoRecordsTemplate> 
                </MasterTableView> 
            </telerik:RadGrid> 
            <div style="padding-top: 5px;"
                <div style="float: left; font-size: 14px; font-weight: bold; width: 370px; text-align: right; 
                    padding-right: 10px;"> 
                    Total Purchase Credit Amount: 
                </div> 
                <div style="font-weight: bold; font-size: 12px; float: left; width: 119px;"
                    <asp:Label ID="_selectedAmount" runat="server" Text="$0.00" /> 
                </div> 
                <div style="color: #0DAE4B; font-weight: bold; font-size: 12px; float: left;"
                    <asp:Label ID="_selectedValue" runat="server" Text="0" /> 
                </div> 
                <div style="float: right;"
                    <asp:Button ID="_continueBtn" runat="server" Text="Credit" /> 
                </div> 
                <div class="clear"
                </div> 
            </div> 
            <div class="clear"
            </div> 
        </div> 

Code Behind:
    Protected Sub _pastItemsGrid_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles _pastItemsGrid.NeedDataSource 
        Dim ds As New DataSet 
        ds.ReadXml(Server.MapPath("../Transactions.xml")) 
        _pastItemsGrid.DataSource = ds 
    End Sub 
 
 
    Protected Sub _pastItemsGrid_ItemCommand(ByVal sender As Object, ByVal e As GridCommandEventArgs) Handles _pastItemsGrid.ItemCommand 
        Dim amountTotal As New Decimal 
        Dim rewardTotal As Integer = 0 
 
        If e.CommandName = "RowClick" Then 
            For Each dataItem As GridDataItem In _pastItemsGrid.MasterTableView.Items 
                If dataItem.Selected Then 
                    '' Get the label control which has the value. 
                    Dim toChange As Label = CType(dataItem.Item("Value").FindControl("_milesLabel"), Label) 
                    '' Seperate out the value from the currency wording. 
                    Dim splitValue As Array = toChange.Text.Split(" ") 
                    '' Replace any commas in the value so that it can be converted. 
                    Dim test As String = splitValue(0).ToString.Replace(",", "") 
                    '' Convert the value and add to total. 
                    rewardTotal += CInt(test) 
                    '' Conver the amount and add to total. 
                    amountTotal += CDec(dataItem.Item("Amount").Text) 
                End If 
 
            Next 
        End If 
        '' Update both amount and currency value for user. 
        _selectedAmount.Text = String.Format("{0:C2}", amountTotal) 
        _selectedValue.Text = String.Format("{0:#,##}", rewardTotal) 
    End Sub 

The ItemCommand event fires and all the appropriate controls are updated when i click the row or select the specific row checkbox. But when the checkbox in the header is clicked the ItemCommand event is not fired. Can you guys point me to what im missing. Thanks



Mustafa Hussain
Top achievements
Rank 1
 answered on 27 Oct 2009
0 answers
93 views
Hello,

Is there an easy way to replace the controls in for example editform.aspx pages for list types?
What we would like to do is replace a single line text field in sharepoint with an combobox that retrieves information from a web service. The retrieving of information from a web service isnt a problem but how to bind it to a sharepoint field?
Or is the only possiblity to create a custome field in sharepoint that uses the combobox?

With kind regards,
  Fabian
Fabian
Top achievements
Rank 1
 asked on 27 Oct 2009
3 answers
483 views
I am trying to add an image to a radgrid column that when hovered or clicked opens a context menu. The context menu contains a series of commands that i want to launch rad windows based on the command clicked and the datakey of the grid row.

I have found examples doing each thing individually but none that do this all together. Below is the code i am using. The showMenu Portion works fine. Now how do i get the contextmenuitem clicked and the datakeyname for the row it was clicked in so i can determine which radwindows to open pass it the productid for the row the contextmenu was clicked on?

Thanks for any help,
Kevin


<script type="text/javascript">  
       function showMenu(e)  
       {  
               var contextMenu = $find("<%= RadContextMenu1.ClientID %>");  
               if ((!e.relatedTarget) || (!Telerik.Web.DomUtility.isDescendantOrSelf(contextMenu.get_element(), e.relatedTarget)))  
               {  
                       contextMenu.show(e);  
               }  
               Telerik.Web.DomElement.cancelRawEvent(e);  
       }  
          
       function openDeleteWindow(ProductID)  
       {  
           var oPWResetWnd = radopen("../DeleteProductRequest.aspx?ProductID=" +ProductID, "RadWindow1" );  
           oPWResetWnd.Center();  
           oPWResetWnd.setSize(800,600);  
       }  
</script> 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
    </telerik:RadScriptManager> 
    <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True" 
        GridLines="None">  
        <MasterTableView TableLayout="Auto" AutoGenerateColumns="False" 
            DataKeyNames="Product">  
            <Columns> 
                <telerik:GridTemplateColumn UniqueName="TemplateColumn">  
                    <ItemTemplate> 
                    <asp:Image ID="imgManage" runat="server" ImageUrl="~/Images/v3_btn_manage.gif"   
                        onmouseover="showMenu(event)" onclick="showMenu(event)" alt="" /> 
                    </ItemTemplate> 
                </telerik:GridTemplateColumn> 
            </Columns> 
        </MasterTableView> 
        <ClientSettings> 
            <Selecting AllowRowSelect="True" /> 
        </ClientSettings> 
    </telerik:RadGrid> 
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="WebBlue" Width="600px" 
        Height="400px" /> 
    <telerik:RadContextMenu ID="RadContextMenu1" runat="server" Flow="Horizontal">  
        <Items> 
            <telerik:RadMenuItem runat="server" ExpandMode="ClientSide" Text="Edit">  
                <GroupSettings ExpandDirection="Auto" Flow="Vertical" /> 
            </telerik:RadMenuItem> 
            <telerik:RadMenuItem runat="server" ExpandMode="ClientSide" Text="Delete">  
                <GroupSettings ExpandDirection="Auto" Flow="Vertical" /> 
            </telerik:RadMenuItem> 
        </Items> 
    </telerik:RadContextMenu> 
 
 



ayush mohan
Top achievements
Rank 1
 answered on 27 Oct 2009
1 answer
104 views
Hi

I am using Tooltip manager and calendar control in tooltip I have displayed information from collections which I have stored in VeiwState but in several seconds it make reload of page and I lost the data. Could you help me where exaclly is the problem 

maybe this is any Ajax timeout ?

greetings
Dimiter  
Tsvetie
Telerik team
 answered on 27 Oct 2009
1 answer
203 views
I have a modal window that loads a dynamic user control when the page is loaded. I am having trouble using the javascript getelementbyid to find the textboxes and labels on the dynamic user control. This is what I have so far:

This is the page in the modal window that loads the user control dynamically.
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load 
 
        Dim modalusercontrol As Control = LoadControl("~/ModalUserControl.ascx") 
        modalusercontrol.ID = "modalusercontrol" 
        Ph1.Controls.Add(modalusercontrol) 
 
    End Sub 

In the page load of the User control I am trying to find the elementbyid and fill the values. ModalUserControl is the name of the user control that I am loading dynamically into the window.
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 
        Dim updateParentScript As String = "function ConfigureDialog() { " & _ 
                        "var oWindow = GetRadWindow();    " & _ 
                        "var oArg = oWindow.Argument;    " & _ 
                        "var oArea =  document.getElementById('<%= (ModalUserControl.FindControl(""NewNameArea"")).ClientID %>').value;     " & _ 
                        "oArea.value = oArg.NameValue;  " & _ 
                        "var oArea =  document.getElementById('<%= (ModalUserControl.FindControl(""NewProfessionArea"")).ClientID %>').value;   " & _ 
                        "oArea.value = oArg.ProfessionValue;    " & _ 
                        "var oArea =  document.getElementById('<%= (ModalUserControl.FindControl(""NewLabelArea"")).ClientID %>').value;   " & _ 
                        "oArea.value = oArg.LabelValue;    " & _ 
                        "radWindow.Argument = arg;" & _ 
                        "}" 
        Page.ClientScript.RegisterStartupScript(Me.[GetType](), "oWindow", updateParentScript, True) 
 
        Form1.Attributes.Add("onload", "ConfigureDialog()") 
 
    End Sub 

Any help would be greatly appreciated. Thanks in advance.
-Eric


Fiko
Telerik team
 answered on 27 Oct 2009
2 answers
129 views
Hey folks,

I have a RadGrid, In a RadPageView, in a RadMultipage, in a RadWindow (I didn't have to tell you that, but it's funny when you say it out loud! :)).

Everything appears to be fine in IE6,7,8, Firefox 2 and 3, however...

In Chrome and Safari, the Row Heights in the grid are several more pixels than in IE and Firefox.  It's not a huge display issue, but an annoying one.

Also, in Opera, the row heights are actually a couple of pixels less.

I am using the built in Skin "Hay" for the RadGrid.

I've tried setting specific heights to the rows, to the grid, to the pageview, to the multipage, etc, etc, but nothing seems to affect Safari and Chrome.

Anyone have any ideas?

Thanks, Kuba

--Thats why the call it the World Wide WEB...  A tangled mess of similar but not quite compatible technologies...
George
Top achievements
Rank 1
 answered on 27 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?