Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
1.0K+ views
I have an empty RadPanelBar on my webpage. When I say empty, I mean that just the <telerik:RadPanelBar></telerik:RadPanelBar> definition exists with no RadPanelItems in it.

On page load, I check to see if the page has been posted back, and if not, I create and add a dynamic number of RadPanelItems to the RadPanelBar. Each of these RadPanelItems has a control in it (for testing I'm using a textbox, but eventually it will be a RadGrid).

I run my page for the first time and up comes my RadPanelBar with the right number of RadPanelItems, and in each one is a textbox. I enter a value into a textbox and click a submit button and the page postsback to itself.

Now when my page loads, a strange thing happens...
The event that loads the RadPanelItems does not fire but the RadPanelBar still has the dynamically added RadPanelItems, but these items have no controls in them so now my textboxes have disappeared and I have no access to the values that were entered into them.

If I skip the check and load the RadPanelItems everytime the page is hit, the I get more strangeness...

The original RadPanelItems that were created when the page was first loaded are still there, along with newly created RadPanelItems after postback, the new RadPanelItems have the empty textboxes in them, but the existing RadPanelItems again have no textboxes and again I've lost my values.

How on earth do I get around this? I need to dynamically add RadPanelItems and controls to a RadPanelBar, but then need access to these and the controls in them so I can access their values after postback!
Josh
Top achievements
Rank 1
 answered on 23 Dec 2010
1 answer
43 views
Hello,

 In my pagge one grid is thre when i am adding record page post back , some time grid display is not proper .  please find the attachment images
skin is simple
1. Display problem
2. Proper display .. want shown grid all time same like this


grid aspx code

<telerik:RadGrid ID="grdBayInfo" runat="server" AutoGenerateColumns="false" AllowPaging="true"
                                            AllowSorting="true" BorderStyle="Solid" Skin="Simple" ItemStyle-BackColor="#FFFFFF"
                                       PagerStyle-AlwaysVisible ="true" PageSize="4" OnPageIndexChanged ="grdBayInfo_PageIndexChanged" OnPageSizeChanged="grdBayInfo_PageSizeChanged"
                                            OnItemCommand="grdBayInfo_ItemCommand" ShowHeader="true" Width="600px">
                                            <PagerStyle Mode="NumericPages"  />
                                            <MasterTableView EditMode="InPlace" DataKeyNames="FacilityId,BayId,BayName,PricePerHour"
                                                CommandItemDisplay="None" Width="600px">
                                                <Columns>
                                                    <telerik:GridTemplateColumn HeaderText="FacilityId" DataField="FacilityId" Visible="false"
                                                        UniqueName="FacilityId">
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblFacilityId" Text='<%# Eval("FacilityId")%>' runat="server"></asp:Label>
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                    <telerik:GridTemplateColumn HeaderText="BayId" DataField="BayId" UniqueName="BayId"
                                                        Visible="false">
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblBayId" Text='<%# Eval("BayId")%>' runat="server"></asp:Label>
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                    <telerik:GridTemplateColumn UniqueName="BayName" HeaderText="BayName">
                                                        <HeaderStyle ForeColor="#326DA0" BackColor="#EEEEEE" BorderStyle="Solid" BorderColor="#326DA0" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblBayName" Text='<%# Eval("BayName")%>' runat="server"></asp:Label>
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"
                                                        EditImageUrl="Images/edit.gif" HeaderText="Edit" AutoPostBackOnFilter="true"
                                                        HeaderStyle-Width="10%">
                                                        <HeaderStyle ForeColor="#326DA0" BackColor="#EEEEEE" BorderStyle="Solid" BorderColor="#326DA0" />
                                                    </telerik:GridEditCommandColumn>
                                                    <telerik:GridButtonColumn ConfirmText="Delete this Bay?" ConfirmDialogType="RadWindow"
                                                        HeaderText="Delete" ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete"
                                                        Text="Delete" HeaderStyle-Width="10%" UniqueName="DeleteColumn" ImageUrl="Images/action_delete.gif">
                                                        <ItemStyle HorizontalAlign="Center" />
                                                        <HeaderStyle ForeColor="#326DA0" BackColor="#EEEEEE" BorderStyle="Solid" BorderColor="#326DA0" />
                                                    </telerik:GridButtonColumn>
                                                    <telerik:GridTemplateColumn UniqueName="PricePerHour" HeaderStyle-Width="30%" HeaderText="PricePerHour">
                                                        <HeaderStyle ForeColor="#326DA0" BackColor="#EEEEEE" BorderStyle="Solid" BorderColor="#326DA0" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="Label1" Text="$" runat="server"></asp:Label>
                                                            <asp:Label ID="lblPricePerHour" Text='<%# Eval("PricePerHour")%>' runat="server"></asp:Label>
                                                            <asp:Label ID="Label2" Text="/Hour" runat="server"></asp:Label>
                                                        </ItemTemplate>
                                                        <EditItemTemplate>
                                                            <asp:Label ID="Label1" Text="$" runat="server"></asp:Label>
                                                            <asp:TextBox Width="50%" ID="txtPricePerHour" Text='<%# Eval("PricePerHour")%>' runat="server"></asp:TextBox>
                                                            <asp:Label ID="Label2" Text="/Hour" runat="server"></asp:Label>
                                                        </EditItemTemplate>
                                                        <ItemStyle HorizontalAlign="Left" />
                                                    </telerik:GridTemplateColumn>
                                                </Columns>
                                            </MasterTableView>
                                            <ClientSettings>
                                                <Scrolling AllowScroll="True" ScrollHeight="100px" UseStaticHeaders="True" SaveScrollPosition="True">
                                                </Scrolling>
                                            </ClientSettings>
                                        </telerik:RadGrid>

thanks


Pavlina
Telerik team
 answered on 23 Dec 2010
1 answer
89 views
Is it possible to prevent the client side animation of the RadPanelBar?
I use it as a menu, the PanelBar start to expand when clicked before it goes to the URL of the link.

Thanks,
Marc
Cori
Top achievements
Rank 2
 answered on 23 Dec 2010
14 answers
314 views

Hi

I have a large form (Approx 120 kb) in which i use a combination of Peter Blum's VAM controls, the ordinary aspx controls and telerik controls. In the page I have just upgraded the solution from Promethious 2007-Q3 to the newest version.

I tried to insert the Form Decorator to give the site a more complete look, and therefore I inserted the following line:
    <telerik:RadFormDecorator ID="RadFormDecorator1" DecoratedControls="All" Skin="Office2007" runat="server" />

When I open the page, the site looks fine an the Form Decorator works perfectly, but when I try to exit the page, i get the error:

Line: 6
Error: '_events' is null or not an object

If I remove the formdecorator I won't get the above error.

Because the page is very large, it makes it difficult to isolate the error. So any help or clues as to why this might happen would be greatly appreciated.

Thanks in advance
Dennis Cassøe

Elias
Top achievements
Rank 2
 answered on 23 Dec 2010
2 answers
261 views
Hello,

I know how to access the controls inside the RadGrid for Grid's Itemdatabound and also the Grid's ItemCommand

I have a ASP repeater in the editformsettings and I am using EditMode="EditForms" in the MasterTableView.

In my edit form template there is a label above the repeater which I need to access and change its text when:
a button inside the Repeater is clicked. So I have the ItemCommand Subroutine in the code behind page which is able to access all the elements of the repeater with no problem but I want to also change the text of the label above the repeater which is a RadGridEditItem after the button is clicked in the repeater.

Can you show me how to?

Thanks,
Sanjay
Sanjay
Top achievements
Rank 1
 answered on 23 Dec 2010
3 answers
206 views
I'm having an issue with removing the padding to the tab name text in my RadTabStrip. I have limited width due to my customers current screen resolution. I have made multiple changes to the .css skin file and have found no resolution. Attached is a screen shot of the current tabstrip. I would like to remove all of the padding around the text.

Thanks in advance
Cori
Top achievements
Rank 2
 answered on 23 Dec 2010
2 answers
95 views
Hi,
  We are using RadRotator in our application .Its Working fine in IE.
But Mozila its not working . 

I am doubtful in the if stmt for the following line..
if (rotatorItem._element.all[16].defaultValue != null)

I am using the following code.Please give me any suggestions

<

 

 

telerik:RadRotator ID="RadRotator1" runat="server" Height="440px" Width="300px" RotatorType="SlideShowButtons" ItemHeight="100px" ItemWidth="300px" ScrollDuration="2000" ScrollDirection="Up, Down" OnItemDataBound="RadRotator1_ItemDataBound" FrameDuration="50" ClientIDMode="Static" OnClientItemClicked="showSelected" WrapFrames="False" EnableAjaxSkinRendering="False"

 

 

 

EnableTheming="False" OnClientLoad="Rotatorcss">

 

 

<ItemTemplate>

 

 

<div>

 

 

 

<table width="100%" border="0" cellspacing="0" cellpadding="5" style="padding: 5px 10px 0 10px">

 

 

<tr>

 

 

<td width="71%" nowrap="nowrap">

 

 

 

<asp:Label ID="lblplanname" class="plantitle" runat="server" Text='<%# Eval("plandesc2")%>'></asp:Label>

 

 

 

<br />

 

 

 

<span class="plandescription">

 

 

 

<asp:Label ID="lblplandesc" runat="server" Text='<%# Eval("plandesc1")%>'></asp:Label>

 

 

 <

/span>

 

 

 

</td>

 

 

<td width="29%">

 

 

<asp:HyperLink ID="lnkbtndeail" Text="View Detail" class="plandetailslinks" runat="server" />

 

 

</td>

 

</tr>

 

 

<tr>

 

 

 

<td class="plandescription">

 

 

<asp:Label ID="lblplanprice" runat="server" Text='<%# Eval("plandesc3")%>'></asp:Label>

 

 

</td>

 

 

 

<td>

 

 

</td>

 

</tr>

 

 

</table>

 

 

 

</div>

 

 

<asp:HiddenField ID="planID" runat="server" Value='<%# Eval("PlanId")%>' />

 

<asp:HiddenField ID="PlanType" runat="server" Value='<%# Eval("PlanType")%>' />

 

 

<asp:HiddenField ID="PlanStorage" runat="server" Value='<%# Eval("PlanStorageInMB")%>' />

 

 

 

<asp:HiddenField ID="planshortname" runat="server" Value='<%# Eval("PlanShortName")%>' />

 

 

<asp:HiddenField ID="PlanAmount" runat="server" Value='<%# Eval("PlanAmount")%>' />

 

</ItemTemplate>

 

<SlideShowAnimation Duration="500" Type="CrossFade" />

 

</

 

 

telerik:RadRotator>

Javascript
function SetSelectedPlanDisplay(rotatorItem, sender) {

 

 

 

if (flag != 1) {

 

if (rotatorItem._element.all[16].defaultValue != null) {

 

var PlanID = rotatorItem._element.all[16].defaultValue;

 

 

 

var PlanType = rotatorItem._element.all[17].defaultValue;

 

 

 

var PlanStorage = rotatorItem._element.all[18].defaultValue;

 

 

 

var Planname = rotatorItem._element.all[6].innerHTML;

 

 

 

 

var Planshortname = rotatorItem._element.all[19].defaultValue;

 

 

 

 

var Planshortamt;

 

 

 

 

if (rotatorItem._element.all[20].defaultValue != null) {

 

 

Planshortamt = rotatorItem._element.all[20].defaultValue;

}

 

else {

Planshortamt = 0;

}

 

var str = rotatorItem._element.innerText;

 

 

str = (str.replace(/View Detail/i,

 

""));

 

var selectedmsg = "You have selected " + str;

 

document.getElementById(

 

'lblselectedPlan').value = PlanID;

 

 

document.getElementById(

 

'lblplantxt').value = selectedmsg;

 

 

document.getElementById(

 

'lblPlanType').value = PlanType;

 

 

document.getElementById(

 

'lblPlanStorage').value = PlanStorage;

 

 

document.getElementById(

 

'HdnSelectedPlanStorage').value = PlanStorage;

 

 

 document.getElementById(

 

'HdnSelectedPlanId').value = PlanID;

 

 

document.getElementById(

 

'hdnname').value = Planname;

 

 

 document.getElementById(

 

'hdshortname').value = Planshortname;

 

 

 document.getElementById(

 

'hdnamt').value = Planshortamt;

 

 

 document.getElementById(

 

'HdnBindStorage').value = "true";

 

 

 

document.getElementById(

 

'trlblplan').style.display = "block";

 

 

document.getElementById(

 

'lblplanmsg').value = selectedmsg;

 

 

 

 document.getElementById('pnlRegisteration').style.display = "block";

 

}

flag = 0;

 

 

if (!canSubmit) {

 

sender.disabled = 

 

true;

 

$find(

 

'<%=RadAjaxManager.GetCurrent(Page).ClientID %>').ajaxRequest("OnClickSearch");

 

 

 r

 

eturn false;

 

 

}

}

}

 

 

catch (err) {

 

 

 

return false;

 

 

}

}

 

 

function showSelected(sender, args) {

 

 

 

var showbj = sender.get_items();

 

 

 

SetSelectedPlanDisplay(args._item, showbj);

 

return true;

 

}

 


Fiko
Telerik team
 answered on 23 Dec 2010
9 answers
245 views
Hi! I'm using latest controls. I have user control loaded dynamically, it has RadGrid, which has DataSourceID set to LLBLGen datasources, automatic operations are enabled. For editing purposes I use:

<EditFormSettings InsertCaption="Add new item" CaptionFormatString="Edit Order: {0}" CaptionDataField="CustomerIdPk" PopUpSettings-Modal="true" EditFormType="Template">
            <EditColumn UniqueName="EditCommandColumn1"></EditColumn>
             <FormTemplate>
...
.....
<asp:TextBox ID="txtDescription" runat="server" Width="210px" Text='<%# Bind("Description") %>'></asp:TextBox>
<asp:DropDownList ID="ddlPaymentMethod" DataSourceID="odsPaymentMethod" SelectedValue='<%# Bind("PaymentMethod") %>' runat="server">
</asp:DropDownList>

Problem starts with this:
    <asp:CheckBox ID="chkVATApplied" Checked='<%# Bind("VATApplied") %>' runat="server" />
<telerik:RadNumericTextBox ID="txtFinalOrderPrice" runat="server"
                                     DbValue='<%# Bind("FinalOrderPrice") %>' EnabledStyle-HorizontalAlign="Center"
                                     EmptyMessage="Required" MaxValue="100000" MinValue="0"
                                     Width="80px"
                                     Type="Currency">
                                     <NumberFormat AllowRounding="false" />
                                 </telerik:RadNumericTextBox>
                                 <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
                                     ControlToValidate="txtFinalOrderPrice" Display="None"
                                     ErrorMessage="Total order price must be defined"> </asp:RequiredFieldValidator>
-------------
When I click update data is saved only from TextBoxes, DropDownList, but not from CheckBox and RadNumericTextBox. I can see that all data was loaded, but not everything is saved. Could you please hint what am I doing wrong, thank you!
Mira
Telerik team
 answered on 23 Dec 2010
1 answer
470 views
Hi there,
is it possible to use the RadUpload like the ASP.NET FileUpload here (where fuDocument is the FileUpload):
byte[] file = this.fuDocument.FileBytes;

Best regards
Ferdinand
Cori
Top achievements
Rank 2
 answered on 23 Dec 2010
2 answers
32 views
Hello,

I need to know if it is possible to rebind an EditForms dropdown based on the changed selection of another EditForms dropdown.

Thanks,
Rick
Rick
Top achievements
Rank 1
 answered on 23 Dec 2010
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?