Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
167 views
I'm seeing some weird behavior with the SelectedValue in the RadComboBox not being properly rendered as "selected" when the page is initially loaded.  Instead of the SelectedValue being shown in the dropdown menu, the first item in the RadComboBox is "selected."  Through debugging, I have verified that the SelectedValue propery *is* set correctly when the page loads.  Additionally, if I click on the combobox and click off, it scrolls down to the correct value and selects it.  Therefore, I don't think it's an issue with the SelectedValue property not getting set.  I think it's an issue with the HTML and java-script not rendering the control properly on the initial page load.

To give some context, this RadComboBox is inside of a User Control that gets dynamically loaded into a RadTabStrip/RadMultiPage at runtime.  The issue happens regardless of whether the RadComboBox is populated/bound directly on the ascx control or programatically on the code-behind for the control.

From the DOM inspector built into Firefox, here is the HTML source of the control when I first click on the tab for this page:

    <div id="ctl00_bodyContent_beneficiaryinfo_ddlJurisdictionId" class="RadComboBox RadComboBox_Web20" skinspath="~/RadControls/ComboBox/Skins" style="width: 150px;">
    <table class="" summary="combobox" style="border-width: 0pt; border-collapse: collapse;">
        <tbody><tr>
            <td style="width: 100%;" class="rcbInputCell rcbInputCellLeft"><input autocomplete="off" name="ctl00$bodyContent$beneficiaryinfo$ddlJurisdictionId" class="rcbInput" id="ctl00_bodyContent_beneficiaryinfo_ddlJurisdictionId_Input" value="(select one)" type="text"></td>
            <td class="rcbArrowCell rcbArrowCellRight"><a id="ctl00_bodyContent_beneficiaryinfo_ddlJurisdictionId_Arrow" style="overflow: hidden; display: block; position: relative; outline: medium none;">select</a></td>
 
        </tr>
    </tbody></table>
    <div class="rcbSlide" style="z-index: 6000;"><div id="ctl00_bodyContent_beneficiaryinfo_ddlJurisdictionId_DropDown" class="RadComboBoxDropDown RadComboBoxDropDown_Web20 " style="display: none;"><div class="rcbScroll rcbWidth" style="height: 100px; width: 100%;"><ul class="rcbList" style="list-style: none outside none; margin: 0pt; padding: 0pt;"><li class="rcbItem ">(select one)</li><li class="rcbItem ">None</li><li class="rcbItem ">Alabama</li><li class="rcbItem ">Alaska</li><li class="rcbItem ">Arizona</li><li class="rcbItem ">Arkansas</li><li class="rcbItem ">California</li><li class="rcbItem ">Colorado</li><li class="rcbItem ">Connecticut</li><li class="rcbItem ">Delaware</li><li class="rcbItem ">District of Columbia</li><li class="rcbItem ">Florida</li><li class="rcbItem ">Georgia</li><li class="rcbItem ">Hawaii</li><li class="rcbItem ">Idaho</li><li class="rcbItem ">Illinois</li><li class="rcbItem ">Indiana</li><li class="rcbItem ">Iowa</li><li class="rcbItem ">Kansas</li><li class="rcbItem ">Kentucky</li><li class="rcbItem ">Louisiana</li><li class="rcbItem ">Maine</li><li class="rcbItem ">Maryland</li><li class="rcbItem ">Massachusetts</li><li class="rcbItem ">Michigan</li><li class="rcbItem ">Minnesota</li><li class="rcbItem ">Mississippi</li><li class="rcbItem ">Missouri</li><li class="rcbItem ">Montana</li><li class="rcbItem ">Nebraska</li><li class="rcbItem ">Nevada</li><li class="rcbItem ">New Hampshire</li><li class="rcbItem ">New Jersey</li><li class="rcbItem ">New Mexico</li><li class="rcbItem ">New York</li><li class="rcbItem ">North Carolina</li><li class="rcbItem ">North Dakota</li><li class="rcbItem ">Ohio</li><li class="rcbItem ">Oklahoma</li><li class="rcbItem ">Oregon</li><li class="rcbItem ">Pennsylvania</li><li class="rcbItem ">Rhode Island</li><li class="rcbItem ">South Carolina</li><li class="rcbItem ">South Dakota</li><li class="rcbItem ">Tennessee</li><li class="rcbItem ">Texas</li><li class="rcbItem ">Utah</li><li class="rcbItem ">Vermont</li><li class="rcbItem ">Virginia</li><li class="rcbItem ">Washington</li><li class="rcbItem ">West Virginia</li><li class="rcbItem ">Wisconsin</li><li class="rcbItem ">Wyoming</li></ul></div></div></div><input value="{"logEntries":[],"value":"34","text":"(select one)","enabled":true}" autocomplete="off" id="ctl00_bodyContent_beneficiaryinfo_ddlJurisdictionId_ClientState" name="ctl00_bodyContent_beneficiaryinfo_ddlJurisdictionId_ClientState" type="hidden">
 
</div>


Here is the HTML source of the control if I simply click on the combobox and then click off (without selecting a new value):

    <div id="ctl00_bodyContent_beneficiaryinfo_ddlJurisdictionId" class="RadComboBox RadComboBox_Web20" skinspath="~/RadControls/ComboBox/Skins" style="width: 150px;">
    <table class="" summary="combobox" style="border-width: 0pt; border-collapse: collapse;">
        <tbody><tr>
            <td style="width: 100%;" class="rcbInputCell rcbInputCellLeft"><input autocomplete="off" name="ctl00$bodyContent$beneficiaryinfo$ddlJurisdictionId" class="rcbInput" id="ctl00_bodyContent_beneficiaryinfo_ddlJurisdictionId_Input" value="(select one)" type="text"></td>
            <td class="rcbArrowCell rcbArrowCellRight"><a id="ctl00_bodyContent_beneficiaryinfo_ddlJurisdictionId_Arrow" style="overflow: hidden; display: block; position: relative; outline: medium none;">select</a></td>
 
        </tr>
    </tbody></table>
    <input value="{"logEntries":[],"value":"","text":"Nebraska","enabled":true}" autocomplete="off" id="ctl00_bodyContent_beneficiaryinfo_ddlJurisdictionId_ClientState" name="ctl00_bodyContent_beneficiaryinfo_ddlJurisdictionId_ClientState" type="hidden">
</div>

Notice how "Nebraska" (the SelectedValue in this case) is properly selected as the state in the 2nd example.

Here is the code that is setting the SelectedValue:

if (ddlJurisdictionId.Items.FindItemByValue(JurisdictionId.ToString()) != null)
{
    ddlJurisdictionId.SelectedValue = JurisdictionId.ToString();
}
else
{
    ddlJurisdictionId.Items[0].Selected = true;
}

I am seeing this exact behavior in *every* browser I've tried (IE8, Firefox 3.6.8, Chrome 10.0.648.133).  I am developing using version 2011_1_315 of the RadControls.  If I use an asp.net DropDownList in place of the RadComboBox, this issue does *not* happen.

Any ideas what would cause this?
Dimitar Terziev
Telerik team
 answered on 07 Apr 2011
2 answers
108 views
Hi,
I'm having trouble with AJAX (yet again).
I have a RadAjaxManager on the master page which is meant to ajaxify a panel:
<telerik:RadAjaxManager ID="DarRadAjaxManager" DefaultLoadingPanelID="DarRadAjaxLoadingPanel" runat="server">       
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="MainPagePanel">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="MainPagePanel" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

Inside the panel is a RadTabstrip which has a SiteMap as a Datasource:
<asp:Panel ID="MainPagePanel" CssClass="mainBody" runat="server">
    <telerik:RadTabStrip ID="DARRadTabStrip" runat="server" DataSourceID="ApplicationSiteMap" CausesValidation="false">
    </telerik:RadTabStrip>
 
    <asp:SiteMapDataSource ID="ApplicationSiteMap" runat="server"
                            SiteMapProvider="XmlSiteMapProvider"
                            ShowStartingNode="False" />
 
    <asp:ContentPlaceHolder id="MainContentPlaceHolder" runat="server">
    </asp:ContentPlaceHolder>
</asp:Panel>

It all works fine. There's just no ajax. A quick call to the IsAjaxRequest method of the RadAjaxManager proved that.

How can I get that working with Ajax?
David
Top achievements
Rank 1
 answered on 07 Apr 2011
14 answers
1.6K+ views
Hello,

I am using the 

telerik:RadAjaxManager

in my main.aspx page which, in turn, loads usercontrols. In my usercontrol I have a 

RadTabStrip

which also calls other usercontrols which i also want  AJAXified. So I'm trying the RadAjaxManagerProxy but as soon as I put in my user control I get this error message:

Server Error in '/' Application.
--------------------------------------------------------------------------------

Collection was modified; enumeration operation may not execute.

Any clues?

Thank you

Bodevain Svensson
Top achievements
Rank 1
 answered on 07 Apr 2011
2 answers
230 views
Is it possible to add an event handler to the grid (e.g. for the RowSelected event) from the client-side javascript?

Example:

<telerik:RadGrid ID="grid" runat="server" ...>
    ...
    <ClientSettings>
        <ClientEvents OnGridCreated="gridCreated" />
    </ClientSettings>
</telerik:RadGrid>
...
<script>
function gridCreated(sender, eventArgs) {
    if (someCondition) {
        //
        Can I add function rowSelected() as a handler to
        the grid's OnRowSelected event?
        //
    }
}
 
function rowSelected(sender, eventArgs) {
    // do stuff
}

I tried calling the grid's add_rowSelected() function, but couldn't get it to work.
Thanks for your help.

-Martin
Martin
Top achievements
Rank 1
 answered on 07 Apr 2011
1 answer
106 views
What I have is a grid that I am loading questions with a asp radiobutton with a go or a no\go.  I have a set of questions and then some question might have sub questions that i load into the grid.  a nested radgrid with the main question and sub questions.  What I need to happen if a sub question radio button is picked as a no\go I need the main question button to automatically be changed to a no\go as well.  Is this possible with a nested grid.  Here is an example of my radgrid.  I also need to save all of them to a table with the question answer on a asp submit button, how do you itterate through the main and then sub tables to save the information.


<table width="100%">
                <tr>
                    <td align="center"><telerik:RadGrid ID="RadGrid2" runat="server" CellSpacing="0" GridLines="both" Skin="WebBlue" Width="90%" GroupingSettings-ShowUnGroupButton="false"  >
                        <MasterTableView AutoGenerateColumns="false" DataKeyNames="intQuestionID">
                            <Columns>
                                <telerik:GridBoundColumn DataField="strQuestion" HeaderText="Question" UniqueName="strQuestion" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left" />
                                <telerik:GridTemplateColumn HeaderText="GO\NOGO" HeaderStyle-HorizontalAlign="Center" ShowSortIcon="True" Visible="True">
                                    <ItemTemplate>
                                        <asp:RadioButtonList ID="rblAnswer" runat="server" RepeatDirection="Horizontal" TextAlign="Right" CellPadding="5" >
                                            <asp:ListItem Value="0">GO</asp:ListItem>
                                            <asp:ListItem Value="1">NO\GO</asp:ListItem>
                                        </asp:RadioButtonList>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn HeaderText="Data" HeaderStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <telerik:RadTextBox runat="server" Width="100"></telerik:RadTextBox>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                 <telerik:GridTemplateColumn HeaderText="Remarks" HeaderStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <telerik:RadTextBox ID="txtRemarks" runat="server" Width="100"></telerik:RadTextBox>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn HeaderText="Date" HeaderStyle-HorizontalAlign="Center">
                                      <ItemTemplate>
                                        <telerik:RadDatePicker ID="radDate" runat="server"></telerik:RadDatePicker>
                                      </ItemTemplate>
                                </telerik:GridTemplateColumn>
                            </Columns>
                            <DetailTables>
                                <telerik:GridTableView Name="RadGrid2Sub" runat="server" DataKeyNames="intsubQID" TableLayout="Fixed" AutoGenerateColumns="false">
                                    <ParentTableRelation>
                                        <telerik:GridRelationFields DetailKeyField="intQuestionID" MasterKeyField="intQuestionID" />
                                    </ParentTableRelation>
                                    <Columns>
                                        <telerik:GridBoundColumn DataField="strSubQ" HeaderText="Sub-Question" UniqueName="strSubQ" HeaderStyle-HorizontalAlign="Center" />
                                         <telerik:GridTemplateColumn HeaderText="GO\NOGO" HeaderStyle-HorizontalAlign="Center" ShowSortIcon="True" Visible="True">
                                            <ItemTemplate>
                                                <asp:RadioButtonList ID="rblAnswer2" runat="server" RepeatDirection="Horizontal" TextAlign="Right" CellPadding="5" >
                                                    <asp:ListItem Value="0">GO</asp:ListItem>
                                                    <asp:ListItem Value="1">NO\GO</asp:ListItem>
                                                </asp:RadioButtonList>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                    </Columns>
                                    </telerik:GridTableView>
                            </DetailTables>
                        </MasterTableView>
                    </telerik:RadGrid></td>
                </tr>
            </table>
Marin
Telerik team
 answered on 07 Apr 2011
1 answer
409 views
Has anything improved with Q1 2011 on filtering of Enums ?

Unfortunately it's quite common to use eNums in C# and to need to bind objects containing enum properties to the Telerik grid.

Whilst the values display ok in the grid the filters offer integer choices only rather than a selection list of the string equivalents. Also when editing values in cells it is the integer values that are requested (unfamiliar to the users of a system).

Martin
Veli
Telerik team
 answered on 07 Apr 2011
1 answer
122 views
I installed the developer version of Ajax control over the demo version and I still get a Trial Noticiation. How can I remove this?
Sebastian
Telerik team
 answered on 07 Apr 2011
0 answers
75 views
Hi,

I am using Rad grid with heirarchy ,if one parent record does not have any child record when i expand that parent record no child records found message is displayed , but user is not able to select that no record found row , i want to perform some functionlity on selection of that no record found row ,so please let me know is there any way i can select no record found row.

Thanks,
Wajih
Top achievements
Rank 2
 asked on 07 Apr 2011
2 answers
82 views
I want show a custom line (target line) on the chart 

like the picture attached.

to be shown a red grid line,and show a target value at left 

and I have found a similar sample for silverlight here
http://www.telerik.com/help/silverlight/radchart-features-annotations-custom-gridline.html

but I didnt found this feature in ASP.NET AJAX.

is possible do something like this ?

thanks
Anders
Top achievements
Rank 1
 answered on 07 Apr 2011
4 answers
292 views
Dear All,

I have added the Telerik.Web,UI.dll in my web application.

It is working fine, but today I have faced a strange issue while building the solution, the error returned is:

Error    296    Metadata file '<<Project Path>>\bin\Telerik.Web.UI.dll' could not be opened -- 'Not enough storage is available to process this command. ' 

But I have enough memory and other process were running fine and the CPU usage is also less.

My system configuration is:
OS - Windows 2003 Server
RAM - 4 GB
Free Space in C drive - 3.09 GB

Can any one tell me why this happens and how to get rid of this?

Thanks a lot in advance.
Sammy Elal
Top achievements
Rank 1
 answered on 07 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?