Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
342 views
Good Evening, I have a RadGrid has multiple rows and I would like to Add a button and on the button click event I would like the radgrid to move to the next row in the grid and have it selected. Does someone have an example of that? Thanks
Shinu
Top achievements
Rank 2
 answered on 15 Apr 2013
1 answer
142 views
Hi.
I want to display the gauge as one of the column in the RADgrid.

Instead of showing the performance in number, i want to display the guage.
And i want to get the value from datasource.

<telerik:RadLinearGauge runat="server" ID="RadLinearGauge1" Scale-Vertical="false"
                                          Scale-MajorTicks-Visible="false" Scale-Labels-Visible="false" Width="120px" Height="20px">
                                          <Pointer Shape="BarIndicator" Value="60">
                                              <Track Opacity="0.4" />
                                          </Pointer>
                                          <Scale Min="0" Max="100">
                                          </Scale>
                                      </telerik:RadLinearGauge>


Is that possible...?
If yes, pls help me by giving the solution.

thanks
--Alex
Shinu
Top achievements
Rank 2
 answered on 15 Apr 2013
2 answers
1.0K+ views
I'm new to using the RadAsyncUploader & I'm hoping there's some sample code to help jumpstart my work.  I need to upload a CSV & place it in a RadGrid. If possible, I'd like to use my own Icon (called Up.png) for the Select button, and not show the input Text box, and not show the Remove option, since it should place the file contents straight into the grid & then delete the file.  I didn't see anything in the Code Library showing how to upload a CSV & place it in a grid, but it seems like someone must have done this before me.  Any guidance is appreciated.
Scott
Top achievements
Rank 1
 answered on 14 Apr 2013
4 answers
137 views
Hi,

can anyone please enlighten me how to use jQuery on Master/Contentpages.

I have my scriptmanager on the Masterpage:
    <asp :ScriptManager ID ="RadScriptManager1" runat ="server">
        <Scripts >
            <asp :ScriptReference Assembly ="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp :ScriptReference Assembly ="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp :ScriptReference Assembly ="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts >
    </asp :ScriptManager >

How can I use jQuery on the Content page now?
Can anyone give me an example please?

Thanks in adavance for your help

best regards, Thomas
Thomas
Top achievements
Rank 1
Veteran
 answered on 14 Apr 2013
1 answer
152 views
Hello forum,
we have three RadHtmlCharts on one page and we would like to export them to excel, all at once.
So our plan is to make a new RadGrid in code-behind, add those three charts to this grid and export that grid.
So i wrote this piece of Code:
private void ExportChartsToExcel() {
    RadGrid chartWrapperGrid = new RadGrid();
    chartWrapperGrid.ID = "ChartWrapperGrid";
    chartWrapperGrid.AutoGenerateColumns = false;
 
    GridBoundColumn boundColumn1 = new GridBoundColumn();
    boundColumn1.DataField = "Chart1";
    boundColumn1.HeaderText = "Chart 1";
    chartWrapperGrid.MasterTableView.Columns.Add(boundColumn1);
    GridBoundColumn boundColumn2 = new GridBoundColumn();
    boundColumn2.DataField = "Chart2";
    boundColumn2.HeaderText = "Chart 2";
    chartWrapperGrid.MasterTableView.Columns.Add(boundColumn2);
    GridBoundColumn boundColumn3 = new GridBoundColumn();
    boundColumn3.DataField = "Chart3";
    boundColumn3.HeaderText = "Chart 3";
    chartWrapperGrid.MasterTableView.Columns.Add(boundColumn3);
 
    DataTable chartTable = new DataTable();
    chartTable.Columns.Add("Chart1");
    chartTable.Columns.Add("Chart2");
    chartTable.Columns.Add("Chart3");
    RadHtmlChart[] chartArray = new RadHtmlChart[] { Chart1, Chart2, Chart3 };
    chartTable.Rows.Add(chartArray);
    chartWrapperGrid.DataSource = chartTable;
 
    this.form1.Controls.Add(chartWrapperGrid);
    chartWrapperGrid.ExportSettings.OpenInNewWindow = true;
    chartWrapperGrid.ExportSettings.ExportOnlyData = true;
    chartWrapperGrid.ExportSettings.IgnorePaging = true;
    chartWrapperGrid.MasterTableView.ExportToExcel();
}

The download starts as wanted but the in the grid are only the titles with "Telerik.Web.UI.RadHtmlChart" under it.
Why are the Chart not shown?


What am i doing wrong?
Danail Vasilev
Telerik team
 answered on 14 Apr 2013
0 answers
99 views
I want to change a MultiView Active View when a ItemCommand is fired, the next snippet is executed buy the 
view is not changing
Protected Sub RadGrid1_ItemCommand(sender As Object, e As GridCommandEventArgs)
        If (e.CommandName = "review") Then
            mvFunciones.SetActiveView(vEdit)
         
        End If
    End Sub


<
asp:UpdatePanel runat="server">
        <ContentTemplate>
            <asp:MultiView ID="mvFunciones" runat="server">
                <asp:View ID="vList" runat="server">
                    <div class="container">
                         <div class="row">
                            <div class="span12">
                                <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
                                    <script type="text/javascript">
                                        var timer = null;
 
                                        function KeyUp() {
                                            if (timer != null) {
                                                clearTimeout(timer);
                                            }
                                            timer = setTimeout(LoadTable, 500);
                                        }
 
                                        function LoadTable() {
                                            $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("FilterGrid");
                                        }
                                    </script>
                                </telerik:RadCodeBlock>
 
                                <%--<telerik:RadScriptManager runat="server" ID="RadScriptManagerLista" />--%>
                                <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
                                    <AjaxSettings>
                                        <telerik:AjaxSetting AjaxControlID="RadGrid1">
                                            <UpdatedControls>
                                                <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                                                <%-- LoadingPanelID="RadAjaxLoadingPanel1"--%>
                                            </UpdatedControls>
                                        </telerik:AjaxSetting>
                                        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                                            <UpdatedControls>
                                                <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                                                <%--LoadingPanelID="RadAjaxLoadingPanel1"--%>
                                            </UpdatedControls>
                                        </telerik:AjaxSetting>
                                         
                                        
 
                                         
                                    </AjaxSettings>
                                </telerik:RadAjaxManager>
 
 
                                <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" Width="75px" Transparency="25">
                                    <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'
                                        style="border: 0px;" />
 
 
                                </telerik:RadAjaxLoadingPanel>
                                <asp:TextBox ID="TextBox1" onkeyup="KeyUp();" runat="server"></asp:TextBox>
                                <telerik:RadGrid ID="RadGrid1" Width="100%" AllowPaging="True" PageSize="10" runat="server"
                                    AllowSorting="true" GridLines="None" AllowFilteringByColumn="true" CssClass="table table-striped" AutoGenerateColumns="False"
                                    AlternatingItemStyle-CssClass="linea1" OnNeedDataSource="RadGrid1_NeedDataSource" selecte
                                    OnItemCommand="RadGrid1_ItemCommand">
                                    <MasterTableView Width="100%">
 
                                        <Columns>
 
                                            <telerik:GridButtonColumn
                                                UniqueName="clave" HeaderText="Clave" CommandName="review" DataType="System.Int32"
                                                DataTextField='idfuncion'>
                                            </telerik:GridButtonColumn>
                                        </Columns>
                                        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                                        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
                                        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column" Created="True"></ExpandCollapseColumn>
                                        <EditFormSettings>
                                            <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
                                        </EditFormSettings>
                                        <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
                                    </MasterTableView>
                                    <PagerStyle Mode="NextPrevAndNumeric" CssClass="pagination"></PagerStyle>
                                    <FilterMenu EnableTheming="True">
                                        <CollapseAnimation Duration="200" Type="OutQuint"></CollapseAnimation>
                                    </FilterMenu>
                                </telerik:RadGrid>
                            </div>
                        </div>
                    </div>
 
 
                </asp:View>
                <asp:View ID="vEdit" runat="server">
                  
 
             <asp:TextBox ID="hello" runat="server"  Text="IT WORKED"/>
 
 
                </asp:View>
 
            </asp:MultiView>
        </ContentTemplate>
        <Triggers>
 
            <asp:AsyncPostBackTrigger ControlID="RadGrid1" EventName="ItemCommand" />
 
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>


Alberto
Top achievements
Rank 1
 asked on 14 Apr 2013
2 answers
121 views
Hello,

I have an Edit button located on my MasterPage and a RadGrid located in my Default.aspx page. I am trying to get the Session ID of the row selected in the Default.aspx page and pull in those values into my Edit page.
When I select a row in Default.aspx and then click Edit, the page refreshes and the row is deselected.
What am I doing wrong here?

Here is my code behind for the MasterPage Edit button:
protected void lEditItem_Click(object sender, EventArgs e)
{
    GetSelected();
    if (Session["CriteriaID"] != null)
    {
        Session["AccessMode"] = "";
        Response.Redirect("~/EditCriteria.aspx");
    }
}
 
private void GetSelected()
{
    RadGrid control = (RadGrid)PageContent.FindControl("criteriaList");
    foreach (GridDataItem item in control.MasterTableView.Items)
    {
        if (item.Selected)
        {
            String temp = item.GetDataKeyValue("ID").ToString();
            Session["CriteriaID"] = new Guid(item.GetDataKeyValue("ID").ToString());
 
        }
    }
}

The code for the RadGrid in Default.aspx is
<asp:Content ID="Content2" ContentPlaceHolderID="PageContent" runat="server">
    <div class="PageBlock">
            <div class="SecHeader">Criteria List</div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:CriteriaCS %>"
         
                SelectCommand="SELECT [AssetOwner], [CriteriaName], [CriteriaDescription], [CriteriaType], [ID] FROM [Study]">
    </asp:SqlDataSource>
    <telerik:RadGrid ID="criteriaList" runat="server" CellSpacing="0" DataSourceID="SqlDataSource1"
        GridLines="None" AllowSorting="True" AutoGenerateColumns="False">
        <ClientSettings EnablePostBackOnRowClick="True">
            <Selecting AllowRowSelect="True" />
            <ClientEvents OnRowSelected="RowSelected"></ClientEvents>
        </ClientSettings>
        <MasterTableView DataSourceID="SqlDataSource1" DataKeyNames="ID">
            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn Visible="True"
                FilterControlAltText="Filter ExpandColumn column" Created="True">
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn DataField="AssetOwner" FilterControlAltText="Filter AssetOwner column"
                    HeaderText="AssetOwner" SortExpression="AssetOwner" UniqueName="AssetOwner">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="CriteriaName" FilterControlAltText="Filter CriteriaName column"
                    HeaderText="CriteriaName" SortExpression="CriteriaName" UniqueName="CriteriaName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="CriteriaDescription" FilterControlAltText="Filter CriteriaDescription column"
                    HeaderText="CriteriaDescription" SortExpression="CriteriaDescription" UniqueName="CriteriaDescription">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="CriteriaType" FilterControlAltText="Filter CriteriaType column"
                    HeaderText="CriteriaType" SortExpression="CriteriaType" UniqueName="CriteriaType">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ID" DataType="System.Guid"
                    FilterControlAltText="Filter ID column" HeaderText="ID" ReadOnly="True"
                    SortExpression="ID" UniqueName="ID" Visible="False">
                </telerik:GridBoundColumn>
            </Columns>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
            <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
        </MasterTableView>
        <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
    </telerik:RadGrid>
    </div>
</asp:Content>



Thanks!!!
Pradeep
Top achievements
Rank 1
 answered on 13 Apr 2013
2 answers
223 views

Hi all,
I have used 2 RadlistBox to assign some email id in both Radlistbox.
First listbox mail id check same mailid enable false in another RadListBox how to check

My sample coding here

protected void ToEmail_ItemCheck(object sender, Telerik.Web.UI.RadListBoxItemEventArgs e)
        {
            ToName.Text = "";
            int i = 0;
            foreach (object obj in ToEmail.CheckedItems)
            {
                string ema;
                string item1 = ToEmail.CheckedItems[i].Value;
                ToName.Text += ',' + item1;
                ema = ToEmail.CheckedItems[i].Value;
                foreach (RadListBoxItem item2 in ToEmailCC.Items)
                {
                    if (ToEmailCC.Items[i].Value == ema)
                    {
                        item2.Enabled = false;
                    }
                }
                i++;
            }
        }

Thanks & Advance,
Ansari

Tamim
Top achievements
Rank 1
 answered on 13 Apr 2013
4 answers
214 views
What I want is to show/hide the Insert button by permission of user. 

Can I do that?

Thanks,
Bill
wg
Top achievements
Rank 1
 answered on 13 Apr 2013
0 answers
104 views
I have been operating on the assumption that all I had to do create a RadAlert from server side was to call RadWindowManager1.RadAlert("Message", 500, 200, "Another Message", "");

This has worked fine on several complex pages in my project.  
I've also created a bare minimal test page and it's worked perfectly there as well.
All the pages have much the same settings and controls (RadScriptManager, RadWindowManager, etc.)

I have this other page with an identical call within a Radbutton click event.  When I do it from there I get a 
Script controls may not be registered before PreRender crash.

There is nothing particularly exotic about this page. It's just another postback event.  

What could possibly be going wrong?

Sorry.  Found it.  Bad call to unrelated controls in the Prerender.
Boris
Top achievements
Rank 1
 asked on 12 Apr 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?