I am developing a radgrid that can be used as a form.
One of the columns uses a RadComboBox within a GridTemplate Column.
My problem is that after the user clicks on the Insert button, the page refreshes but the user's choice from the radcomboBox is gone:
Here is my aspx code for the template column
<telerik:GridTemplateColumn UniqueName="UserCol" HeaderText="Employee" DataField="UserID">
<EditItemTemplate>
<telerik:RadComboBox ID="RadComboBox1" runat="server" AutoPostBack="false" CausesValidation="true"
Width="240" MaxHeight="200px" OnItemsRequested="ddEmployee_ItemsRequested" AllowCustomText="true"
EnableLoadOnDemand="true" ShowMoreResultsBox="true" EnableVirtualScrolling="true"
MarkFirstMatch="false" >
</telerik:RadComboBox>
</EditItemTemplate>
</telerik:GridTemplateColumn>
How can I ensure that the user's choice from the RadComboBox is still visible?
Related
In my webpage, I have a RadTabStrip containing RadTab:s which will decide which page view the webpage that is shown.
<telerik:RadTabStrip ID="rtsTabs2" runat="server" MultiPageID="rmpMultiPage2"
AutoPostBack="True" SelectedIndex="0" OnTabClick="rtsTabs2_TabClick">
<Tabs>
<telerik:RadTab Text="Page 1" PageViewID="pvPage1" />
<telerik:RadTab Text="Page 2" PageViewID="pvPage2" />
</Tabs>
</telerik:RadTabStrip>
The page views are defined like this:
<telerik:RadMultiPage ID="rmpMultiPage2" runat="server">
<telerik:RadPageView ID="pvPage1" runat="server">
RadGrids etc
</telerik:RadPageView>
<telerik:RadPageView ID="pvPage2" runat="server">
More RadGrids etc
</telerik:RadPageView>
</telerik:RadMultiPage>
The page views contains numerous components that will be populated from the database.
However, I will only be interested in populate those when a page view containing them is displayed.
Which event should I listed at to determine when to populate components?
The OnLoad event in RadPageView is triggered when the page load, regardless if the page view is shown or not.
The OnPreRender event in RadPageView is also triggered on page load.
The OnNeedDataSource event in GridView is the same, the event triggers when the page loads.
Using Visible="False" in a RadPageView only results in page views that will never show up even if the corresponding RadTab is clicked.
I'm facing a problem with Rad Gird inside Rad Ajax Panel
First in kept my RadGrid inside asp:panel here is works fine
<asp:Panel ID="Panel1" runat="server">
When i replace asp:panel with RadAjaxpanel edit and add buttons are not working
Here is my code
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadAjaxPanel ID="div" runat="server" EnableAJAX="true" >
<telerik:RadGrid ID="rdgOpData" runat="server" CssClass="value"
AllowPaging="true" AllowSorting="true" AllowFilteringByColumn="false"
OnNeedDataSource="rdgOpData_NeedDataSource"
OnItemDataBound="rdgOpData_ItemDataBound"
OnInsertCommand="rdgOpData_InsertCommand"
OnUpdateCommand="rdgOpData_UpdateCommand">
<MasterTableView CommandItemDisplay="Top"
AutoGenerateColumns="false" DataKeyNames="LNK_ORIGINATEDBY_CN%%TXT_NAMELAST"
CommandItemSettings-AddNewRecordText="Add Opp" EditMode="EditForms"
InsertItemPageIndexAction="ShowItemOnCurrentPage">
<EditFormSettings>
<EditColumn UniqueName="EditCommandColumn" InsertText="Add" CancelText="Cancel" UpdateText="Update" ButtonType="PushButton">
</EditColumn>
</EditFormSettings>
<Columns>
<telerik:GridEditCommandColumn ButtonType="ImageButton" EditImageUrl="~/Images/Edit.gif">
</telerik:GridEditCommandColumn>
No firing even itemdatabound on edit button click .
Help me through this issue
Sometimes it may happen, for best results use RadAjaxManager.
Add the RadAjaxManager in page, then click on open Configuration, the configuration is easy.
Imagine the (One to One) case. Click on any of the control (cause) and map the another control (effect). Just checkbox clicks.. Go ahead here's the documentation.
Read about RadAjaxManger here
I'd like to be able to access the value of the item chosen from the radcombobox in the code behind. What can I write to access it when the user clicks insert?
(Please note that the comboboxes are dynamically generated so I cannot select a specific box)
<telerik:GridTemplateColumn UniqueName="UserCol" HeaderText="proto user" DataField="UserID">
<EditItemTemplate>
<telerik:RadComboBox ID="RadComboBox1" runat="server" AutoPostBack="false">
</telerik:RadComboBox>
</EditItemTemplate>
</telerik:GridTemplateColumn>
update: what I mean to say by 'dynamically generated' is that the Radgrid has a button called "add new record". Everytime this button is clicked, a new radcombobox is generated. The user may generate any number of them at runtime.
I have website written in ASP with searchTextBox with AutoPostBack and searchButton to search for value entered in searchTextBox.
Here is the code:
<asp:TextBox ID="searchTextBox" runat="server" AutoPostBack="True" Width="159px">enter value</asp:TextBox>
<asp:Button ID="searchButton" runat="server" Text="Search" Width="151px"
onclick="searchButton_Click" />
I would like to search for certain values using Ruby.
Here is my code:
search=#brows.text_field(:id=>'searchTextBox')
search.set(name)
#btnSearch=#brows.button(:id=>'searchButton')
#btnSearch.click
When I run script, value is entered, but before button is clicked it disapears.
How to stop this value disappearing?
When I do this manually value doesn't disappear. It is successfully send to next form.
I have a RadioButtonList control inside a nested user control. When one of its buttons is clicked, i want a panel to be refreshed with an ajax postback. I am using the telerik RadAjaxManager. The problem is that the list always triggers a FULL postback. markup is below
<telerik:RadAjaxManagerProxy runat="server" ID="RadAjaxManagerPRoxy1">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="btnAcceptReject">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="pnlControls" UpdatePanelRenderMode="Inline" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManagerProxy>
<asp:RadioButtonList runat="server" ID="btnAcceptReject" RepeatDirection="Horizontal" CssClass="checkboxlist borderless" ValidationGroup="data" AutoPostBack="true" OnSelectedIndexChanged="btnAcceptReject_SelectedIndexChanged">
<asp:ListItem Text="The edition is hereby validated for conformity to standards" Value="0" Selected="True"></asp:ListItem>
<asp:ListItem Text="The edition does not meet standards and still has to be reviewed" Value="1"></asp:ListItem>
</asp:RadioButtonList>
<asp:RequiredFieldValidator ID="vldAcceptReject" ControlToValidate="btnAcceptReject" runat="server" CssClass="text-error" Text="please check an option" ValidationGroup="data"></asp:RequiredFieldValidator>
<asp:Panel runat="server" ID="pnlControls">
I reviewed my code and markup over and over and it does not seem there's anything missing, this should run out of the box! i've been reading a lot online however about issues that controls like RadioButtonList and CheckBoxList have with ajax postbacks. does anyone know how to solve this?
You should move the radio button list inside the pnlControls ajax panel. Then It should not do the postback.