Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
69 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
839 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
1 answer
122 views
Hi all,
I have a RadChart and most of the Y-Axis label values are very high like 10.000.000 etc. I want to use Scientific (power) notation like;
10.000.000 => 10 x 10power6 (10 times 10 to the power of 6)
50.000.000 => 50 x 10power6 (50 times ten to the power of 6) etc.

How can I do that?

Thanks,
Ervin
 
Peshito
Telerik team
 answered on 13 Feb 2012
1 answer
81 views
Hi,

I'm trying to use a Ribbon Bar inside of an iFrame.
Everything is working fine in Firefox.
In IE9 however, I'm getting a whole bunch of errors saying that some objects are undefined.

Any ideas?

Thanks,
Jan
Bozhidar
Telerik team
 answered on 13 Feb 2012
1 answer
116 views
Hi,

I have an usercontrol as an editformcontrol in a radgrid.  It has some comboboxes, textboxes etc.  Now I have problem to find the controls to set and get values.  When I debug, somehow I saw the ClientID as below which the clt05/clt09 changes for different rows.

RadPanelBar1_i1_grdRevenue_ctl00_ctl05_EditFormControl_drp_chg_cd
RadPanelBar1_i1_grdRevenue_ctl00_ctl09_EditFormControl_drp_chg_cd

How can I find the controls in javascript using code like $find('<%= drp_chg_cd.ClientID %>')

Thanks,

Richard
Top achievements
Rank 1
 answered on 13 Feb 2012
2 answers
117 views
I have a RadRotator with 2 different LinkButtons inside the template.  Each LinkButton has a command argument that is pulled from the database.  What is the easiest way to determine which LinkButton was clicked in the Rotator_ItemClick event?  The problem that I am having is that I can't determine which LinkButton was clicked so that I can execute specific server side code.  

<telerik:RadRotator ID="RadRotator1" runat="server"
    DataSourceID="dsProducts" RotatorType="CoverFlowButtons" Skin="Forest" Width="625px"
    Height="350px" ItemHeight="350px" ItemWidth="551px" PauseOnMouseOver="true"
        BorderStyle="None">
    <ItemTemplate>
        <asp:LinkButton ID="lnkAddTestimonial" runat="server" CommandName="AddTestimonial"
        CommandArgument='<%# Eval("ProductID") %>'>Add Review</asp:LinkButton>
        <asp:LinkButton ID="lnkViewTestimonials" runat="server" CommandName="ViewTestimonials"
        CommandArgument='<%# Eval("ProductID") %>'>Read Reviews</asp:LinkButton>
    </ItemTemplate>
</telerik:RadRotator>
Ronnie
Top achievements
Rank 1
 answered on 13 Feb 2012
1 answer
97 views
I have two RadDatePickers. Users enter unformatted date values manually, yet initially when they leave the date picker the dates remain unformatted. After retuning to the RadDatePicker and reentering the sam unformatted date and tabbing out of the control, the dates are auto-formatted. This is a result of posting back that does not initially occur, even with AutoPostBack enabled.

Thanks,

SteveO

 

<telerik:RadDatePicker ID="fDate"

 

 

runat="server"

 

 

AutoPostBack="true"

 

 

Width="150px"

 

 

MinDate="1960/1/2"

 

 

TabIndex="5" />

 

 

<DateInput ID="DateInput2"

 

 

runat="server"

 

 

DateFormat="MM/dd/yyyy">

 

 

</DateInput>

 

 

</telerik:RadDatePicker>

 

Richard
Top achievements
Rank 1
 answered on 13 Feb 2012
2 answers
55 views
I have only 1 RadWindowManager on a page and the window manager has 2 rad windows with different Navigateurl values.(Both are different .aspx pages) Among them, 1 works fine but any event is not firing on the other window. I am trying to use OnClientClose event and its not calling the function. I tried using different events for that window but still it is not firing for any event.

FYI:
I already have DestroyOnClose=true for both windows and manager.

HELP....
Naupad
Top achievements
Rank 1
 answered on 13 Feb 2012
0 answers
48 views
Hi Everyone,

I m using RadTagControl There i m using certain expressions to hide certain numeric value (like 0.001,.001,89,8). there is one property of tagcloud  MaxNumberOfItems=" " if im specifying 50 its working f9 bt if i m specifying 100 its not working properly.
expression i m using:
   output = Regex.Replace(output, "(?<=^|\\s)\\d+(?:\\.\\d+)?(\\s+|$)?%?", " ", RegexOptions.None);
its hiding decimal values but certain times its not hiding
Shubham
Top achievements
Rank 1
 asked on 13 Feb 2012
1 answer
49 views
Hi:
I have a char with 3 series, S1,S2 & S3, when the chart renders, the series are shown    

[S1:Val1][S2:Val1][S3:Val1]   ..  [S1:Val N][S2:Val N] [S3:ValN]  

Is there any chance  to show  the series together?  i mean:

[S1:Val1]..[S2:Val N]     [S2:Val1]..[S2:Val N]    [S3:Val1]..[S3:Val N] 

 Thank you so much for your help
Evgenia
Telerik team
 answered on 13 Feb 2012
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?