Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
93 views
I have a modal popup screen in radscheduler and I am using advance Insert and edit, but when ever i choose to insert new or edit the  pop up appears to be in top, i want this to be displayed at center. Does anybody now how to do this.
Princy
Top achievements
Rank 2
 answered on 18 Jun 2013
4 answers
103 views
Hi,
Following is my code.
--------------------------------
<telerik:RadAjaxManagerProxy ID="rdAjaxMgrProxy" runat="server">         
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="btnSearch">
            
<UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rgvUserData" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
<asp:Button ID="btnSearch" runat="server" Text="Search" OnClientClick="return true;" /> 
------------------

And in code behind, I have a function which I want to run when button is clicked.
Now when I click the button, server side code doesn't run.

it runs if I
1. Remove OnClientClick event from Button control
or
2. Remove btnSearch from RadAjaxManagerProxy block.

I can't do either because I need both the things. I want to validate my page when button is clicked by client JavaScript.
And I want my grid to be updated by Ajax once validation is complete.

Regards,
John
John
Top achievements
Rank 1
 answered on 18 Jun 2013
5 answers
68 views
I have a RadTreeView that loads nodes on demand via a web service.  Only the node at the very bottom level has a value, which is what I need to retrieve.  If the user checks a node and then expands it, it's children will be checked all the way to the lowest level, and the value will be provided.  However, here is my problem: When the user selects a parent node (that is NOT expanded) I cannot figure out how to get the value of its children's lowest level nodes.  Essentially, when a node is selected I need it to retrieve and check all of its children.  Is this possible?
Kate
Telerik team
 answered on 18 Jun 2013
1 answer
73 views
I'm using RadPanelBar inside of a RadTooltip.  My RadPanelBar contains four panel items, and each panel item utilizes an itemtemplate. I am setting my panel bar to have a specific width of 650px.  The problem is that the rpTemplate div is being rendered with a width of 670px instead of 650px, which is causing scrollbars to appear at times.  Why does that div have a width of 670px?  I see it has 10px of padding on each side, which would be OK if it wasn't making the width 20px wider.  My markup for the panel bar is below and a screenshot showing my issue is attached.

<div>
    <div class="ControlPanel" id="ControlPanel" style="width: 650px" runat="server">
        <div style="float: left">
            <div class="ControlPanelLabel">Configure report</div>
        </div>
        <div style="float: right; margin-right: 10px;">
            <asp:LinkButton id="ApplyParameters" runat="server" Text="Apply changes" CssClass="ControlPanelButton" OnClientClick="applyChanges(false); return false;" />
            <asp:LinkButton id="SaveParameters" runat="server" Text="Save as default" CssClass="ControlPanelButton" OnClientClick="applyChanges(true); return false;" />
            <div class="ControlPanelButton" onclick="closeCurrentToolTip()">Cancel</div>
        </div>
    </div>
    <telerik:RadPanelBar ID="ParametersPanelBar" runat="server" ExpandMode="FullExpandedItem" Width="650px" Height="480px" BorderColor="#cdcdcd">
        <Items>
            <telerik:RadPanelItem Text="Report Grouping" Expanded="true">
                <ContentTemplate>
                    <div class="PopupPanelItem">
                        <div class="PopupTextGroup" id="GroupingLabel" runat="server" visible="true">This report includes a variety of grouping options which alter the columns which are displayed. Choose a grouping mode from the list below:</div>
                        <div class="PopupTextGroup">
                            <telerik:RadComboBox ID="GroupingComboBox" runat="server" AutoPostBack="false" style="z-index: 10000" Width="610px" />               
                        </div>
                        <div class="PopupTextGroup">Products can be displayed by specific name, or the more generic product category. It may be useful to display by product category when comparing multiple locations that do not utilize the same product IDs. Choose the appropriate display type below:</div>
                        <div class="PopupTextGroup">
                            <telerik:RadButton ID="ShowProductsByCategory" runat="server" AutoPostBack="false" ToggleType="CheckBox" ButtonType="ToggleButton" Text="Show products by category name instead of detailed name" Checked="false" />
                        </div>                                   
                    </div>
                </ContentTemplate>
            </telerik:RadPanelItem>
            <telerik:RadPanelItem Text="Location(s) Included" Expanded="false">
                <ContentTemplate>
                    <div id="LocationsPanel" runat="server" class="PopupPanelItem">
                        <div class="PopupTextGroup">This report can include one or more locations. Choose the location selection mode and other options below:</div>
                        <div class="PopupTextGroup">
                            <telerik:RadButton ID="SingleLocation" runat="server" AutoPostBack="false" ToggleType="Radio" ButtonType="ToggleButton" Text="Single location" Checked="true" GroupName="LocationsRadio" OnClientClicked="toggleLocationControlsVisiblity" />
                        </div>
                        <div class="PopupTextGroup">
                            <telerik:RadComboBox ID="LocationComboBox" runat="server" AutoPostBack="false" style="z-index: 10000" Width="610px" />                                       
                        </div>
                        <div class="PopupTextGroup">
                            <telerik:RadButton ID="SingleOrganization" runat="server" AutoPostBack="false" ToggleType="Radio" ButtonType="ToggleButton" Text="Single organization" GroupName="LocationsRadio" OnClientClicked="toggleLocationControlsVisiblity" />
                        </div>
                        <div class="PopupTextGroup">
                            <telerik:RadComboBox ID="OrganizationComboBox" runat="server" AutoPostBack="false" style="z-index: 10000" Width="610px" />                                       
                        </div>
                        <div class="PopupTextGroup">
                            <telerik:RadButton ID="CustomLocationList" runat="server" AutoPostBack="false" ToggleType="Radio" ButtonType="ToggleButton" Text="Custom list of locations" GroupName="LocationsRadio" OnClientClicked="toggleLocationControlsVisiblity" />
                        </div>
                        <div class="PopupTextGroup">
                            <telerik:RadGrid ID="LocationGrid" runat="server" Width="610px" Height="180px" Skin="Metro" AutoGenerateColumns="false" AllowMultiRowSelection="true">
                                <HeaderStyle CssClass="GridHeader" />
                                <SelectedItemStyle CssClass="GridHighlight" />
                                <ClientSettings>
                                    <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                                    <Selecting AllowRowSelect="True" UseClientSelectColumnOnly="true" />
                                </ClientSettings>             
                                <MasterTableView DataKeyNames="tblLocationsID" >
                                    <Columns>
                                        <telerik:GridClientSelectColumn />
                                        <telerik:GridBoundColumn DataField="tblLocationsID" DataType="System.Int32" Display="false" />
                                        <telerik:GridBoundColumn DataField="OrganizationName" HeaderText="Organization" DataType="System.String" />
                                        <telerik:GridBoundColumn DataField="LocationName" HeaderText="Location" DataType="System.String" />
                                    </Columns>
                                </MasterTableView>                                                                          
                            </telerik:RadGrid>
                        </div>
                    </div>
                </ContentTemplate>
            </telerik:RadPanelItem>
            <telerik:RadPanelItem Text="Date Range" Expanded="false">
                <ContentTemplate>
                    <div id="DatesPanel" runat="server" class="PopupPanelItem">
                        <div class="PopupTextGroup">Select the date range for the report using the options below:</div>
                        <div class="PopupTextGroup">
                            <telerik:RadButton ID="SingleMonth" runat="server" AutoPostBack="false" ToggleType="Radio" ButtonType="ToggleButton" Text="Single month" Checked="true" GroupName="DateRadio" OnClientClicked="toggleDateControlsVisiblity"/>
                        </div>
                        <div class="PopupTextGroup">
                            <telerik:RadComboBox ID="MonthComboBox" runat="server" AutoPostBack="false" style="z-index: 10000" Width="610px" />
                        </div>
                        <div class="PopupTextGroup">
                            <telerik:RadButton ID="SingleYear" runat="server" AutoPostBack="false" ToggleType="Radio" ButtonType="ToggleButton" Text="Single year" GroupName="DateRadio" OnClientClicked="toggleDateControlsVisiblity"/>
                        </div>
                        <div class="PopupTextGroup">
                            <telerik:RadComboBox ID="YearComboBox" runat="server" AutoPostBack="false" style="z-index: 10000" Width="610px" />
                        </div>
                        <div class="PopupTextGroup">
                            <telerik:RadButton ID="CustomDateRange" runat="server" AutoPostBack="false" ToggleType="Radio" ButtonType="ToggleButton" Text="Custom date range" GroupName="DateRadio" OnClientClicked="toggleDateControlsVisiblity"/>
                        </div>
                        <div id="CustomDateRangeControls" runat="server" class="PopupTextGroup" >
                            <div style="float: left">
                                <span style="width: 300px">Start date:</span>
                                <telerik:RadCalendar ID="CustomStartDate" runat="server" Width="300px" EnableMultiSelect="false" AutoPostBack="false" />
                            </div>
                            <div style="float: right">
                                <span style="width: 300px">End date:</span>
                                <telerik:RadCalendar ID="CustomEndDate" runat="server" Width="300px" EnableMultiSelect="false" AutoPostBack="false" />
                            </div>
                        </div>                                                                       
                    </div>
                </ContentTemplate>
            </telerik:RadPanelItem>
            <telerik:RadPanelItem Text="Deal Statuses" Expanded="false">
                <ContentTemplate>
                    <div id="DealStatusPanel" runat="server" class="PopupPanelItem">
                        <div class="PopupTextGroup">Select deal statuses to include in the report:</div>
                        <div class="PopupTextGroup">
                            <telerik:RadButton ID="IncludeClosedDeals" runat="server" AutoPostBack="false" ToggleType="CheckBox" ButtonType="ToggleButton" Text="Closed deals" Checked="false" />
                        </div>
                        <div class="PopupTextGroup">
                            <telerik:RadButton ID="IncludeFinalizedDeals" runat="server" AutoPostBack="false" ToggleType="CheckBox" ButtonType="ToggleButton" Text="Finalized deals" Checked="true"/>
                        </div>
                    </div>
                </ContentTemplate>
            </telerik:RadPanelItem>
        </Items>
    </telerik:RadPanelBar>                        
</div>

And here is my style sheet (sorry it's a little big):

/****************************************************************************************************************************************************/
/* Primary page elements
/****************************************************************************************************************************************************/  
html, body, form
{
    margin: 0;
    padding: 0;
    height: 100%;
    background: #f0f0f0;
    color: #000;
    font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 18px;
    min-width: 740px;
}
 
html
{
    overflow: auto;
}
 
a
{
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}
         
.AjaxPanel
{
    position:absolute;
    z-index:20000;
    top:0;
    left:0;
    width:100%;
    height:100%;
    margin:0;
    padding:0;
    background: #ffffff url(images/loading.gif) center center no-repeat;
}
 
.ErrorMessage
{
    color: #cc0000;
}
 
.FloatLeft
{
    float: left;
}
 
.FloatRight
{
    float: right;
}
 
.Validator
{
    line-height: 30px;
    color: #cc0000;
}
 
/****************************************************************************************************************************************************/
/* Containers
/****************************************************************************************************************************************************/  
#headWrap
{
    width: 100%;
    height: 60px;
    margin: 0px;
    padding: 0px;
    float: left;
    background: #0C638E repeat-x center center;
    color: #fff;
    font-size: 30px;
    line-height: 60px;
}
#headPanel
{
    width: 740px;
    height: 100%;
    margin: 0 auto;
    padding: 0px;
}
#contentWrap
{
    font-size: 16px;
    line-height: 30px;
    width: 100%;
    height: 100%;
    margin: 0px;
    padding: 0px;
    float: left;   
}
#contentPanel
{
    width: 740px;
    margin: 0 auto
    padding: 20px 0px 20px 0px
}
.PageFooter
{
    background-color: #0C638E;
    color: #fff;
    width: 100%;
    height: 30px;
    line-height: 30px;
    font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
    font-size: 10px;
    text-align: center;
    position: absolute;
    bottom: 0px;
}
.TextBlock
{
    margin-bottom: 30px;
    overflow: auto;
}
.InputLabel
{
    line-height: 36px;
    width: 100px;
    float: left;
}
.ReportGridContainer
{
    position: absolute;
    width: 100%;
    bottom: 30px;
    top: 50px;
    outline: none !important;
}
.PopupPanelItem
{
    width: 630px;   
    overflow: hidden !important;
}
         
.PopupTextGroup
{
    margin-top: 10px;
    margin-bottom: 10px;
}
.ExportButtonContainer
{
    float: left;
    margin-top: 15px;
    margin-right: 15px;
    margin-bottom: 15px;
}
 
/****************************************************************************************************************************************************/
/* Report ListBox
/****************************************************************************************************************************************************/  
.ReportListBoxTitle
{
    font-weight: 900;
}
 
.ReportListBoxDescription
{
    font-size: 14px;
}
.ListBox .rlbGroup
{
    border-top: 0px !important;
}
.ListBox .rlbHovered
{
   cursor: pointer !important;
}
 
/****************************************************************************************************************************************************/
/* Tooltips
/****************************************************************************************************************************************************/  
.RadToolTip_Default .rtWrapper .rtWrapperContent
{
    background-color: #dedede !important;
}
 
/****************************************************************************************************************************************************/
/* Panel bars
/****************************************************************************************************************************************************/  
.RadPanelBar .rpRootGroup
{
    border-width: 0px !important;
}
 
/****************************************************************************************************************************************************/
/* Control panel and associated items
/****************************************************************************************************************************************************/  
.ControlPanel
{
    background-color: #0C638E;
    color: #fff;
    width: 100%;
    height: 50px;
}
.ControlPanelInWindow
{
    background-color: #0C638E;
    color: #fff;
    width: 650px;
    height: 50px;
    overflow: hidden;
}
.ControlPanelLabel
{
    line-height: 50px;
    height: 50px;
    float: left;
    padding-left: 10px;
    padding-right: 10px;           
    color: #fff;
    font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: 900;
}   
.ControlPanelButton
{
    line-height: 30px;
    height: 30px;
    float: left;
    padding-left: 10px;
    padding-right: 10px;           
    margin-top: 10px;
    margin-bottom: 10px;
    color: #fff;
    font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
    font-size: 12px;
    text-decoration: none;
}    
.ControlPanelButton:hover
{
    cursor: pointer;
    background-color: #25A0DA;
}  
 
/****************************************************************************************************************************************************/
/* Standalone buttons
/****************************************************************************************************************************************************/  
.StandaloneButton
{
    border: 0px;
    background-color: #0C638E;
    line-height: 50px;
    height: 50px;
    /*float: left;*/
    padding-left: 10px;
    padding-right: 10px;           
    margin-top: 0px;
    margin-bottom: 20px;
    color: #fff;
    font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
    font-size: 16px;
    text-decoration: none;
}
.StandaloneButton:hover
{
    cursor: pointer;
    background-color: #25A0DA;
}  
.StandaloneButton:disabled
{
    background-color: #bbbbbb;
    cursor: inherit;
}
 
 
/****************************************************************************************************************************************************/
/* Grids
/****************************************************************************************************************************************************/  
.GridHeader
{
    background-color: #25A0DA;         
    color: #fff !important;
    font-weight: bold;     
    border-left: 0px !important;
    border-bottom: 0px !important;
}
 
.rgHeader a
{
    color: #fff !important;
}
 
.RadGrid_Metro th.rgSorted
{
    background-color: #25A0DA !important;
}
         
.rgHeaderWrapper
{
    background-color: #25A0DA;   
    border-left: 0px !important;
    border-bottom: 0px !important;     
}
         
.rgHeaderDiv
{
    border-right: 0px !important;
}
         
.GridHighlight
{
    /*
    background-color: #ffd158 !important;
    color: #000 !important;
    */
    background-color: #25A0DA !important;
    color: #fff !important;
    border-color: rgb(229, 229, 229) !important;
}
 
.GridHighlight td
{
    border-color: rgb(229, 229, 229) !important;
}
 
.rgRow td, .rgAltRow td, .rgEditRow td, .rgFooter td, .rgFooterAlt td
{
    border-width: 0px 0px 0px 1px !important;
}
.FooterRow
{
    background-color: #ffd158;
    font-weight: bold;
}
.FooterRow td
{
    padding: 4px 7px 3px 7px !important;
}
.FooterRowAlt
{
    background-color: #ffe6a3;
    font-weight: bold;
}
.FooterRowAlt td
{
    padding: 4px 7px 3px 7px !important;
}
.RowLabel
{
    text-decoration: none;
    font-weight: bold;
}
.ClickThroughCell
{
    cursor: pointer !important;
}
.ClickThroughCell:hover
{
    /*background-color: rgb(255,209,88);*/
    background-color: #25A0DA;
    color: #fff;
}
.rgEditForm a
{
    color: #fff !important;
}
.rgRow a, .rgAltRow a
{
    text-decoration: underline;
}

Magdalena
Telerik team
 answered on 18 Jun 2013
4 answers
237 views
Hi,

           I am not able to get dropdownlist control in code behind file (C#). Please give me a solution . I have shown my aspx code below.

<td>
<telerik:RadDropDownList ID="Radddl1" runat="server">
                            </telerik:RadDropDownList>
<td>
Thanks,
Arun
Shinu
Top achievements
Rank 2
 answered on 18 Jun 2013
5 answers
103 views
Hi,
        I am using grid control in radcontrols. Please inform me about update values from gridview to database & how to get value of one textbox value using command name in code behind using c#.

Thanks ,
Arun.
Shinu
Top achievements
Rank 2
 answered on 18 Jun 2013
2 answers
81 views
I have a need to load 7,000 items into a template combo box.
Right now it just populates from a SqlDataSource and loads but it takes forever and a day to load.
Any suggestions or samples appreciated

thanks
Shinu
Top achievements
Rank 2
 answered on 18 Jun 2013
2 answers
166 views
Hi ,

Am working on RadNumericTextBox to enable users to enter values allowed through the spin buttons only.

Example: The control should have min value  as 10 and max value as 80 and increment by 10, so the control should allow only 10,20,30,40,50,60,70 and 80 as the allowed values and should show error message on violating this.

How this functionality can be achieved ?

Thanks,
Stalin 
Shinu
Top achievements
Rank 2
 answered on 18 Jun 2013
2 answers
494 views

The code below is supposed for adding a RadioButtonList to an existing form which uses telerik controls. An appropriate radio button is displayed as selected when the page renders the first time. After that  the user can select a different radio button, and that will trigger OnSelectedIndexChanged to save the new value to the database. Somehow the condition:if (e.Item is GridEditableItem && e.Item.IsInEditMode)  is never met. I see samples on the internet but cannot make this works. I'd appreciate it if someone can correct the codes that I have below.

I want the page to display 2 radio buttons without making the user click on any link (such as Edit) to see the 2 radio buttons.

<telerik:RadGrid ID="RadGrid1"  runat="server" AutoGenerateColumns="False"
  ShowStatusBar="True" GridLines="Both"  OnNeedDataSource="RadGrid1_NeedDataSource" OnItemDataBound="RadGrid1_ItemDataBound"
  CellSpacing="2" OnSelectedIndexChanged="RadGrid1_OnSelectedIndexChanged" >
  <MasterTableView NoMasterRecordsText="data not found" Width="100%" GridLines="Both" TableLayout="Fixed">
    <Columns>
      
            <telerik:GridBoundColumn  Visible="false"   DataField="id" SortExpression="id" UniqueName="id" />
  
      <telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Country">
        <ItemTemplate>
          <asp:Label ID="Label1" runat="server">test list</asp:Label>
        </ItemTemplate>
        <EditItemTemplate>
                    <asp:RadioButtonList  CellPadding="0" DataValueField="rbtestList" SelectedValue='<%#Eval("rbtestList")%>'
                         CellSpacing="0" ID="rbtestList" runat="server" RepeatColumns="4"
                         RepeatDirection="Vertical" TabIndex="7" >
                        <asp:ListItem Text="0" Value="0"/>
                        <asp:ListItem Text="1" Value="1" />
                     </asp:RadioButtonList>
        </EditItemTemplate>
  
      </telerik:GridTemplateColumn>
        </Columns>
  </MasterTableView>
</telerik:RadGrid>
  
    protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
    {
            RadGrid1.DataSource = this.dbData;
    }
  
    protected override void Page_Load(object sender, EventArgs e)
    {
            if (!Page.IsPostBack)
            {
                if (this.dbData.Tables[0].Rows.Count < 1)
                {
                    RadGrid1.MasterTableView.IsItemInserted = true;
                }
                else
                {
                    RadGrid1.MasterTableView.IsItemInserted = false;
                }
            }
    }
      
    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
            totalRows = dbData.Tables[0].Rows.Count;
              
            if (e.Item is GridEditableItem && e.Item.IsInEditMode)
            {
                GridEditableItem item = e.Item as GridEditableItem;
  
                if (totalRows > 0)
                {
                    RadioButtonList rbltestList = (RadioButtonList)item.FindControl("rbtestList");
                    rbltestList.SelectedValue = dbData.Tables[0].Rows[0]["testList"].ToString().Trim();
                }
            }
    }
  
    protected void RadGrid1_PreRender(object sender, EventArgs e)
    {
            if (!Page.IsPostBack)
            {
                GridBoundColumn testListColumn =
                       (GridBoundColumn)RadGrid1.MasterTableView.GetColumn("rbtestList");
            }
    }
Lisa
Top achievements
Rank 1
 answered on 18 Jun 2013
1 answer
115 views

Version: 2013.1.220.35 Telerik.web.UI

I have dropdown tree on a sharepoint page.

<telerik:RadDropDownTree ID="RadDropDownTreeTest" runat="server" AutoPostBack="true"

DefaultMessage="Please select" CheckBoxes="TriState"

OnEntryAdded="RadDropDownTreeTest_EntryAdded"

OnEntryRemoved="RadDropDownTreeTest_EntryRemoved">

<DropDownSettings Width="200px" />

</telerik:RadDropDownTree>


cs file:

 

protected

 

void RadDropDownTreeTest_EntryAdded(object sender, DropDownTreeEntryEventArgs e)

{

 

lblTest.Text = e.Entry.Value;

}

 

protected void RadDropDownTreeTest_EntryRemoved(object sender, DropDownTreeEntryEventArgs e)

{

 

lblTest.Text = e.Entry.Value;

}

I also tried hooking the events on page load but no change. The data appears in tree view and events are not triggering though the page shows selected node.

Not sure what is worng with the code.

thanks for you help.

J
Top achievements
Rank 1
 answered on 17 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?