Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
566 views
Hi,
I have scenario where i need to have  <telerik:GridImageColumn > inside rad grid. On click of this image i need to open radwindow or any .aspx.
How can i achieve this functionality.Below is the sample code.
 
     <telerik:RadGrid ID="rdGrdBudgetAssignment" runat="server" AllowPaging="true" AllowSorting="true" AutoGenerateColumns="false" PageSize="20"
     GridLines="None" Width="95%">
     <PagerStyle Mode="NextPrevAndNumeric" />
     <MasterTableView AllowPaging="true" AllowSorting="true" AllowFilteringByColumn="true" CommandItemDisplay="Top">
      <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" />
      <CommandItemSettings ExportToExcelText="Export To Excel" ShowExportToExcelButton="true" ShowAddNewRecordButton="false" ShowRefreshButton="false" />
      <Columns>
      <telerik:GridImageColumn ImageUrl ="../Images/SortAsc.gif"></telerik:GridImageColumn>
      <telerik:GridImageColumn ImageUrl="../Images/SortDesc.gif"></telerik:GridImageColumn>
      </Columns>
     </MasterTableView>
      <ClientSettings AllowColumnsReorder="true" ReorderColumnsOnClient="true"  >
     <Resizing AllowColumnResize="true" />
     </ClientSettings>
     </telerik:RadGrid>

Regards,
Akki
Casey
Top achievements
Rank 1
 answered on 13 Feb 2012
2 answers
195 views
Is it possible to hide the (de)select-all checkbox in the radgrid header and place a generic checkbox with similar functionality outside the radgrid?
monte
Top achievements
Rank 1
 answered on 13 Feb 2012
3 answers
333 views
hi telerik,

         i am using codes from  http://www.telerik.com/help/aspnet-ajax/ajax-show-loadingpanel-on-initial-pageload.html  link to show loading panel .  since i am using master-content page , i have to make little change in the code as below

In Master Page

<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function pageLoad(sender, eventArgs) {
                if (!eventArgs.get_isPartialLoad()) {
                    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("InitialPageLoad");
                    if (window.contentPageLoad) {
                        window.contentPageLoad(sender, eventArgs);
                    }
                }
            } 
        </script>
    </telerik:RadCodeBlock>
    <div>
        <telerik:RadAjaxManager ID="RadAjaxManager1" OnAjaxRequest="RadAjaxManager1_AjaxRequest"
            DefaultLoadingPanelID="RadAjaxLoadingPanel1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Black">
            Loading.........
        </telerik:RadAjaxLoadingPanel>
        <asp:Panel ID="Panel1" runat="server">
            <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
            </asp:ContentPlaceHolder>
        </asp:Panel>
    </div>
    </form>
</body>


In Content Page

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
 
            function contentPageLoad(sender, eventArgs) {
                alert("i am from content page");
 
                // on pageLoad doing lot of stuffs for example
                document.getElementById("<%= Label1.ClientID %>").innerHTML = "hello"
            }
        </script>
    </telerik:RadCodeBlock>
    <telerik:RadAjaxPanel runat="server" ID="ajaxPanel">
       <%--  all controls will be residing inside the ajax panel--%>
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    </telerik:RadAjaxPanel>
</asp:Content>


  
now the problem is on page load the ajaxrequest starts and the contentPageLoad() assigns value to the label, but when the ajaxrequest ends the value assigned through 
contentPageLoad() is refreshed . Please Help Me.
 
Antonio Stoilkov
Telerik team
 answered on 13 Feb 2012
1 answer
163 views
Hi, 

I'm trying to bind data with knockout to RadComboBox, but without any progress for now. This is situation that I have

<table data-bind="foreach: MyModel"><br>
<tr>
<td>
<telerik:RadComboBox runat="server" DataTextField="Name"
DropDownWidth="240" DataValueField="Value" Width="100" AppendDataBoundItems="true"
</telerik:RadComboBox>
</td>
</tr>
</table>


How can I populate this radcombobox because right now it seams impossible :(

When this code is rendered I get same ID for all RadComboBox controls, and drop down event don't work (When I click on it)
Cat Cheshire
Top achievements
Rank 1
 answered on 13 Feb 2012
2 answers
104 views
xx
Erik
Top achievements
Rank 2
 answered on 13 Feb 2012
1 answer
121 views
Hi,

I have a problem with telerik client-side on older computer. When I test my page on older notebook with atom and 4GB Ram, telerik need 10seconds for initialize JS. I send screen from HttpWatch. When I use notebook with intel i7 and 8GB ram all is ok, and telerik need 1-2s. Is possible reduce telerik scripts? Can I do something for faster initialize?
I see forum and try some telerik optimization, but nothing help me.

Thanks for answer.

Regards
Roman Krsko
Marin
Telerik team
 answered on 13 Feb 2012
5 answers
452 views
Hi,

I would like to close all rows that are in edit-mode when i click on edit one another row. That way i can only edit one row at a time (locks better).

I would also like this to work the same way when i insert a new row.

How do i do that?
Vasssek
Top achievements
Rank 1
 answered on 13 Feb 2012
3 answers
198 views
i am new to radcontrol, and I would like to ask how can I use AJAX Panel to change the contentplaceholder?
For example, user will click on the button (placed inside the masterpage), and the ajax panel will load and refresh the content place holder.
Maria Ilieva
Telerik team
 answered on 13 Feb 2012
2 answers
83 views
The grid is loaded with data and while selecting a row from the grid, the data is not displayed in the corresponding controls.Using trace, I found that SelectIndexChange event is not fired. My code is below






<telerik:RadGrid runat="server" ID="rgoptionexercisetype" AllowPaging="True" AllowSorting="True"
                        AllowFilteringByColumn="True" CellSpacing="2" GridLines="None" CssClass="Grid_Master"
                        Skin="Office2010Black"  OnSelectedIndexChanged="rgoptionexercisetype_SelectedIndexChanged"
                        ClientSettings-EnablePostBackOnRowClick="True" >
                        <MasterTableView DataKeyNames="optionexercisetypecode" ClientDataKeyNames="optionexercisetypecode">
                            <EditFormSettings>
                                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                </EditColumn>
                            </EditFormSettings>
                            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                            <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                            </RowIndicatorColumn>
                            <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                            </ExpandCollapseColumn>
                            <PagerStyle Mode="NumericPages" AlwaysVisible="True" EnableSEOPaging="True" />
                        </MasterTableView>
                        <ClientSettings EnableRowHoverStyle="True" EnablePostBackOnRowClick="True" AllowColumnsReorder="True"  Selecting-AllowRowSelect="true"
                             ReorderColumnsOnClient="True"  >
                            <DataBinding SelectMethod="GetDataAndCount" Location="GridWcfService.svc" SortParameterType="Linq"
                                FilterParameterType="Linq">
                            </DataBinding>
                            <Selecting AllowRowSelect="True" />
                        </ClientSettings>
                        <HeaderStyle HorizontalAlign="Center" ForeColor="White" />
                        <FilterItemStyle HorizontalAlign="Center" />
                        <PagerStyle Mode="NextPrevNumericAndAdvanced" AlwaysVisible="True"
                            EnableSEOPaging="True" />
                        <FilterMenu EnableImageSprites="False">
                        </FilterMenu>
                    </telerik:RadGrid>



 protected void Page_Load(object sender, EventArgs e)
        {
          
            if (!IsPostBack)
            {
                
                WROptionExerciseType.Service1 cl = new WROptionExerciseType.Service1();
                rgoptionexercisetype.DataSource = new string[] { };
                rgoptionexercisetype.DataSource = cl.SelectOptionExcerciseType();//loading the record in the grid
                rgoptionexercisetype.DataBind();
                ViewState["OPT"] = cl.SelectOptionExcerciseType();
                GridColumn column = rgoptionexercisetype.MasterTableView.GetColumnSafe("optionexercisetypecode"); //hiding the auto-generated column
                if (column != null)
                {
                    column.Visible = !column.Visible;
                    rgoptionexercisetype.Rebind();
                }
            }


  protected void rgoptionexercisetype_SelectedIndexChanged(object sender, EventArgs e)
        {
            //while selecting the row in the grid, the data are displayed in the corresponding controls

            rgoptionexercisetype.DataSource=ViewState["OPT"];
            if (e.ToString() != String.Empty || e.ToString() != "")
            {
                this.lbloptionexercisetypecode.Text = rgoptionexercisetype.SelectedItems[0].Cells[2].Text;
                this.rtxtoptionexerciseType.Text = rgoptionexercisetype.SelectedItems[0].Cells[3].Text;
                this.rcboptionexcercisestatus.SelectedValue = rgoptionexercisetype.SelectedItems[0].Cells[4].Text;
                this.rtxtdisplayorder.Text = rgoptionexercisetype.SelectedItems[0].Cells[5].Text;
            }
        }










Tsvetoslav
Telerik team
 answered on 13 Feb 2012
3 answers
924 views
Hi All,

I have a Probelm.

On my ASPX Site I have an 
          RadAjaxManager 
          RadAjaxLoadingPanel

                    <telerik:RadAjaxLoadingPanel   
                        ID="RadAjaxLoadingPanel1"   
                         BackgroundPosition="Top" 
                        runat="server" 
                        IsSticky="true" 
                        Skin="Office2007" /> 
 
                    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
                        <ajaxsettings> 
                            <telerik:AjaxSetting AjaxControlID="FormView1">  
                                  
                                <updatedcontrols> 
                                    <telerik:AjaxUpdatedControl   
                                        ControlID="FormView1"   
                                        LoadingPanelID="RadAjaxLoadingPanel1" /> 
                                </updatedcontrols> 
                              
                            </telerik:AjaxSetting> 
                        </ajaxsettings> 
                    </telerik:RadAjaxManager> 

In the code behind I register some javascripts by setting RegisterStartupScript

            protected void FormView1_ItemCommand(object sender, FormViewCommandEventArgs e)  
            {  
 
                switch (e.CommandName)  
                {  
                    case "Cancel":  
                        //ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CancelEdit();", true);  
                        Page.ClientScript.RegisterStartupScript(this.GetType(), "alertScript""alert('test');"true);  
                        break;  
 
                    case "Update":  
                        ClientScript.RegisterStartupScript(Page.GetType(), "mykey""CloseAndRebind();"true);  
                        break;  
 
                    case "Insert":  
                        ClientScript.RegisterStartupScript(Page.GetType(), "mykey""CloseAndRebind('navigateToInserted');"true);  
                        break;  
 
                }  
 
            } 

But this script only fired if I remove the radajaxmanager.
What's wrong here?

And second. Is there a good example on how I use the ajaxmanger in combination with master and contentpages.


Thanks for help.

Christian
Simone
Top achievements
Rank 1
 answered on 13 Feb 2012
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?