| <tlk:RadGrid ID="oGrid" runat="server" AutoGenerateColumns="False" Height="470px" |
| AllowPaging="True" PageSize="100" |
| OnNeedDataSource="oGrid_NeedDataSource" AllowSorting="True" |
| OnInsertCommand="oGrid_InsertCommand" OnUpdateCommand="oGrid_UpdateCommand" OnDeleteCommand="oGrid_DeleteCommand" |
| OnItemDataBound="oGrid_ItemDataBound" OnCancelCommand="oGrid_CancelCommand" |
| GridLines="None" EnableViewState="false"> <MasterTableView CommandItemDisplay="Top" EditMode="InPlace" DataKeyNames="IDUser" InsertItemPageIndexAction="ShowItemOnCurrentPage" EnableNoRecordsTemplate="true"> <CommandItemSettings AddNewRecordImageUrl="~/Images/add.png" RefreshImageUrl="~/Images/blank.gif" RefreshText="" /> <NoRecordsTemplate> <div> </div> </NoRecordsTemplate> <Columns> <tlk:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" CancelImageUrl="~/Images/failed.png" InsertImageUrl="~/Images/ok.png" UpdateImageUrl="~/Images/ok.png" Resizable="false"> <ItemStyle HorizontalAlign="Center" CssClass="CursorHand" /> </tlk:GridEditCommandColumn> |
| function js_fahrteingabe_zeitControl_setDate(controlId, dateIn){ |
| var tmpCtrlZeit = $find(controlId); |
| var currentDateTime=tmpCtrlZeit.get_timeView().getTime(); |
| var actTime=dateToTimeString( currentDateTime ); |
| var newDateTime = datetimeStringToDate(dateToDateString(dateIn) + " " + actTime); |
| tmpCtrlZeit.set_selectedDate(newDateTime); |
| var date = tmpCtrlZeit.get_selectedDate(); |
| date.setDate(newDateTime); |
| tmpCtrlZeit=null; |
| } |
Thanks much for the info...
chris
I'm trying to call some javascript which returns true/false depending if it passes a test. I want my page to post back when a button is clicked but it isn't posting back if I set the update control or if I return true/false in my javascript. here is sample of my code.
This is a user control which is part of page which has other user controls.
<
script type="text/javascript">
function ValidateWithRegEx()
{
var myRegxp =/^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+(.pdf|.PDF|.doc|.DOC|.xls|.XLS|.jpeg|.JPEG|.gif|.GIF|.tiff|.TIFF|.jpg|.JPG|.fla|.FLA|.avi|.AVI|.mov|.MOV|.wma|.WMA|.wmv|.WMV|.docx|.DOCX|.xlsx|.XLSX|.vsd|.VSD|.txt|.TXT)/;
var fileUploaderValue = document.getElementById("ctl00_cphCenterPane_UxAttachments1_FIPSFileUploader").value;
if( myRegxp.test(fileUploaderValue) )
{
return true;
}
else
{
alert(
'File trying to upload is invalid');
return false;
}
}
</
script>
<
table runat="server" id="masterTable">
<tr>
<td style="width: 453px">
<asp:FileUpload ID="FIPSFileUploader" runat="server" Width="446px" /></td>
</tr>
<tr>
<td style="width: 453px">
<asp:Button ID="UploadFileButton" runat="server" Text="Upload File" OnClientClick="return ValidateWithRegEx();" OnClick="UploadFileButton_Click" />
<asp:Label ID="lblError" runat="server" ForeColor="Red" Width="422px"></asp:Label></td>
</tr>
</
table>
<
telerik:RadAjaxManagerProxy ID="AjaxManagerProxy" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="UploadFileButton">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="AttachmentsRadGrid" LoadingPanelID="UploadingPanel" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</
telerik:RadAjaxManagerProxy>
<br />
<
telerik:RadAjaxLoadingPanel ID="UploadingPanel" runat="server" Height="75px" Width="75px" InitialDelayTime="1">
<img alt="Loading..." src="../Images/animated_loading.gif" style="border-right: 0px;border-top: 0px; border-left: 0px; border-bottom:0px"/>
</
telerik:RadAjaxLoadingPanel>
<
telerik:RadGrid ID="AttachmentsRadGrid" runat="server" AutoGenerateColumns="False" GridLines="None" Skin="Forest">
<MasterTableView Caption="<b>Attachments</b>" CellSpacing="-1">
<Columns>
<telerik:GridBoundColumn DataField="InspectionAttachmentId" ReadOnly="True" UniqueName="InspectionAttachmentId" Visible="False">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="FileLocation" UniqueName="FileLocation" Visible="False">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="FileName" HeaderText="File Name" UniqueName="FileName">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Description" HeaderText="Description" UniqueName="Description">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CreatedDate" HeaderText="Created Date" UniqueName="CreatedDate">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ModifiedDate" HeaderText="Modified Date" UniqueName="ModifiedDate">
</telerik:GridBoundColumn>
<telerik:GridEditCommandColumn>
</telerik:GridEditCommandColumn>
<telerik:GridButtonColumn CommandArgument="Delete" CommandName="Delete" Text="Remove" UniqueName="column">
</telerik:GridButtonColumn>
</Columns>
<EditFormSettings>
<EditColumn UniqueName="EditCommandColumn1">
</EditColumn>
</EditFormSettings>
</MasterTableView>
</
telerik:RadGrid>


Are there known problems of a RadListBox with transfer turned on working when in a RadXMLHttpPanel? Outside of the panel the transfer (Telerik's example) works fine, but, when I place it in a working RadXMLHttpPanel, it looses it's transfer functionality?
Note: The RadXMLHttpPanel that I'm putting the listbox control in works fine and is updating my controls asynch. It's the listbox transfer functionality that is not working.
Any ideas? I really need the list transfer functionality, I could use a JQuery one, but prefer to stick to the Telerik control.
Below is code example with html and javascript. Thanks much in advance...chris
***** Javascript ********
function
SecurityRowClick(sender, eventArgs)
{
try
{
var userId = eventArgs.getDataKeyValue(userIdFieldName);
var xmlPanel = $find(userDetailsXMLPanelClientId);
xmlPanel
.set_value(userId);
}
catch (e)
{
alert
(e.message);
}
}
******** HTML ***********
<
telerik:RadXmlHttpPanel
ID="ui_UserDetailsXMLPanel"
runat="server"
OnServiceRequest="UserXmlPanelBind"
OnClientResponseEnded="UserDetailsBound">
<div id="UserDetails">
<!-- command icons start -->
<div style="padding-top: 10px;">
<!-- edit icon start -->
<div id="EditUserAccount_Cmd" style="clear: both; width: 735px;">
<div id="UserRemove" onclick="DeleteUser()" style="float: right;">delete</div>
<div style="float: left; width: 15px; float: right;"> </div>
<div id="UserEdit" onclick="EditUser()" style="float: right;">edit</div>
</div>
<!-- edit icon end -->
<!-- save / cancel icon start -->
<div id="SaveUserAccount_Cmd" style="clear: both; width: 730px;">
<div id="Stop" onclick="CancelUpdate()" style="float: right;">cancel</div>
<div style="float: left; width: 15px; float: right;"> </div>
<div id="Save" onclick="UpdateUser()" style="float: right;">update</div>
</div>
<!-- save / cancel icon end -->
</div>
<!-- command icons end -->
<!-- user info start -->
<div style="clear: both;">
<!-- user details start -->
<div style="float: left; width: 360px;">
<div class="section_header">
User Details
</div>
<!-- full name start -->
<div id="FullName">
<div class="form_title_data_container">
<div class="form_field_title">
Name
</div>
<div style="float: left;">
<span id="ui_Name_valueContainer">
<div id="ui_Name_value" runat="server"></div>
</span>
</div>
</div>
</div>
<!-- full end -->
<!-- name details start -->
<div id="ui_NameDetails" runat="server">
<!-- first name start -->
<div class="form_title_data_container" style="padding-bottom: 5px;">
<div class="form_field_title">
First Name
</div>
<div style="float: left;">
<div id="ui_FirstName_value" runat="server"></div>
<input id="ui_FirstName_edit" type="text" class="textbox" runat="server" />
</div>
</div>
<!-- first name end -->
<!-- middle initial start -->
<div class="form_title_data_container">
<div class="form_field_title">
Middle Initial
</div>
<div style="float: left;">
<div id="ui_MiddleInitial_value" runat="server"></div>
<input id="ui_MiddleInitial_edit" type="text" class="textbox" runat="server" />
</div>
</div>
<!-- middle initial end -->
<!-- last name start -->
<div class="form_title_data_container">
<div class="form_field_title">
Last Name
</div>
<div style="float: left;">
<div id="ui_LastName_value" runat="server"></div>
<input id="ui_LastName_edit" type="text" class="textbox" runat="server"/>
</div>
</div>
<!-- last name end -->
</div>
<!-- name details end -->
<!-- email start -->
<div class="form_title_data_container">
<div class="form_field_title">
</div>
<div style="float: left;">
<div id="ui_Email_value" runat="server"></div>
<input id="ui_Email_edit" type="text" class="textbox" runat="server"/>
</div>
</div>
<!-- email end -->
<!-- username start -->
<div class="form_title_data_container">
<div class="form_field_title">
Username:
</div>
<div style="float: left;">
<div id="ui_Username_value" runat="server"></div>
<input id="ui_Username_edit" type="text" class="textbox" runat="server" />
</div>
</div>
<!-- username end -->
<!-- password start -->
<div class="form_title_data_container">
<div class="form_field_title">
Password
</div>
<div style="float: left;">
<div id="ui_Password_value" runat="server"></div>
<input name="ui_Password_edit" id="ui_Password_edit" type="text" class="textbox" runat="server" />
</div>
</div>
<!-- password end -->
<!-- account enabled start -->
<div class="form_title_data_container">
<div class="form_field_title">
Account Enabled
</div>
<div style="float: left;">
<div id="ui_Status_value" runat="server"></div>
<asp:DropDownList runat="server" ID="ui_Status_edit" CssClass="textbox">
<asp:ListItem Text="Enabled" Value="false"></asp:ListItem>
<asp:ListItem Text="Disabled" Value="true"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<!-- account enabled end -->
<!-- last login start -->
<div class="form_title_data_container">
<div class="form_field_title">
Last Login
</div>
<div style="float: left;">
<div id="ui_LastLogin_value" runat="server"></div>
</div>
</div>
<!-- last login end -->
</div>
<!-- user details end -->
<!-- margin start -->
<div style="float: left; width: 20px;">
</div>
<!-- margin end -->
<!-- roles start -->
<div style="float: left; width: 360px;">
<div class="section_header">
Roles
</div>
<telerik:RadListBox runat="server" ID="RadListBoxSource" Height="200px" Width="150px"
AllowTransfer="true" TransferToID="RadListBoxDestination">
<Items>
<telerik:RadListBoxItem Text="Argentina" />
<telerik:RadListBoxItem Text="Australia" />
<telerik:RadListBoxItem Text="Brazil" />
<telerik:RadListBoxItem Text="Canada" />
<telerik:RadListBoxItem Text="Chile" />
<telerik:RadListBoxItem Text="China" />
<telerik:RadListBoxItem Text="Egypt" />
<telerik:RadListBoxItem Text="England" />
<telerik:RadListBoxItem Text="France" />
<telerik:RadListBoxItem Text="Germany" />
<telerik:RadListBoxItem Text="India" />
<telerik:RadListBoxItem Text="Indonesia" />
<telerik:RadListBoxItem Text="Kenya" />
<telerik:RadListBoxItem Text="Mexico" />
<telerik:RadListBoxItem Text="New Zealand" />
<telerik:RadListBoxItem Text="South Africa" />
<telerik:RadListBoxItem Text="USA" />
</Items>
</telerik:RadListBox>
<telerik:RadListBox runat="server" ID="RadListBoxDestination" Height="200px" Width="150px" />
</div>
<!-- roles end -->
</div>
<!-- user info end -->
</div>
</telerik:RadXmlHttpPanel>