Hello,
I'm New to telerik..Can any one tell me how to get preview of the image and also save to database ..Im using RadAsyncUpload...this is the code I'm Using
protected void RadAsyncUpload_FileUploaded(object sender, FileUploadedEventArgs e)
{
string path = Server.MapPath("~/Uploads/");
e.File.SaveAs(path + e.File.GetName());
string ext = e.File.GetExtension();
}
Thank you
When I uncheck an item in my RadCheckBoxList I would like to update something indicating that the use no longer wishes to include this item. I figured using the SelectedIndexChanged event along with the SelectedItem.value property would be the way to go. Boy was I wrong. Works great when you check an item...when you uncheck one you get a big value of nothing.
How do I get the ID of the item that was just unchecked in a RadCheckBoxList?
I downloaded the patch which only included Telerik.Web.UI.dll. After adding to my project, I got an error, please see the attach file.
Here is the setting in the config file
<add key="Telerik.Skin" value="WebBlue">
I understand both Teleik.Web.UI.dll and Telerik.Web.UI.Skin.dll must be the same version. But it is not found in the patch.
Anyone has the same issue?
I'm trying to implement a MaintainScrollPositionOnPostBack because I've had to move the 'overflow' from my BODY element to a child DIV (to resolve a touch-scrolling issue with RadComboBoxes in newer versions of Chrome.) The problem I'm running into is getting my hidden field AJAXified with the rest of my controls.
If I disable AJAX entirely, the script works perfectly (because the hidden field value is being persisted across postbacks.)
If I enable AJAX but exclude the hidden field from the RadAjaxManager AjaxSettings AjaxUpdatedControl the page works as expected, but the script doesn't (because the hidden field value isn't being persisted across postbacks.)
If I enable AJAX and include the hidden field in the RadAjaxManager's AjaxSettings AjaxUpdatedControl I get a "The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)." exception.
The page in question has no scripts on it. The MasterPage's scripts are all wrapped in RadCodeBlock tags. I can't remove the HEAD element's runat="server" because of use. The problem occurs with both and input "s. Wrapping the hidden field in a RadCodeBlock prevents the exception, but does not persist the hidden field's value across postbacks.
Any suggestions you could offer that might point me in the right direction would be appreciated. (And no, I can't post the code--the site part of is proprietary and extremely sprawling.)
Hello,
I'm using a couple RadDatePickers in my UI. I have two that loads on pageload. They are rendering as lightweight normally. Then I have two more in my radGrid's Editform. they are set to render as lightweight as well but when I click on the edit button to open the edit form in the radgrid, all the dropdowns render inproperly.
here is my RadGrid:
<
telerik:RadGrid
ID
=
"rgResults"
runat
=
"server"
HeaderStyle-Font-Bold
=
"true"
AllowPaging
=
"true"
PageSize
=
"10"
OnItemCommand
=
"rgResults_ItemCommand"
OnNeedDataSource
=
"rgResults_NeedDataSource"
OnItemDataBound
=
"rgResults_ItemDataBound"
OnPreRender
=
"rgResults_PreRender"
AutoGenerateColumns
=
"false"
>
<
ClientSettings
AllowKeyboardNavigation
=
"true"
EnablePostBackOnRowClick
=
"false"
>
<
Selecting
AllowRowSelect
=
"true"
UseClientSelectColumnOnly
=
"true"
></
Selecting
>
<
ClientEvents
OnRowDblClick
=
"rowDblClickCollectionBreak"
/>
</
ClientSettings
>
<
MasterTableView
DataKeyNames
=
"Accounts_Receivable_ID"
InsertItemPageIndexAction
=
"ShowItemOnCurrentPage"
Font-Size
=
"Smaller"
CommandItemDisplay
=
"Top"
>
<
HeaderStyle
CssClass
=
"TableHeader"
/>
<
AlternatingItemStyle
BackColor
=
"#DBDBDB"
/>
<
Columns
>
<
telerik:GridEditCommandColumn
EditImageUrl
=
"../Content/Images/checkGreen.png"
/>
<
telerik:GridTemplateColumn
UniqueName
=
"commandColumn"
>
<
ItemTemplate
>
<
asp:ImageButton
ID
=
"btnDelete"
runat
=
"server"
CommandName
=
"Delete"
Height
=
"30px"
Width
=
"30px"
ToolTip
=
"Delete"
ImageUrl
=
"~/Content/Images/minusImg.png"
/>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridBoundColumn
HeaderText
=
"Deposit Date"
DataField
=
"Deposited_Date"
UniqueName
=
"Deposited_Date"
/>
<
telerik:GridBoundColumn
HeaderText
=
"Company Name"
DataField
=
"Company_Name"
UniqueName
=
"Company_Name"
/>
<
telerik:GridBoundColumn
HeaderText
=
"Check Amount"
DataField
=
"Check_Amount"
UniqueName
=
"Check_Amount"
/>
<
telerik:GridBoundColumn
HeaderText
=
"Check #"
DataField
=
"Check_Number"
UniqueName
=
"Check_Number"
/>
<
telerik:GridBoundColumn
HeaderText
=
"Submitted"
DataField
=
"Submitted"
UniqueName
=
"Submitted"
/>
</
Columns
>
<
EditFormSettings
EditColumn-ButtonType
=
"ImageButton"
EditColumn-EditText
=
""
EditColumn-EditImageUrl
=
"../Content/Images/plus.png"
EditFormType
=
"Template"
>
<
FormTemplate
>
<
div
class
=
"pad"
>
<
div
class
=
"row"
>
<
div
class
=
"col-lg-3"
>
<
label
>Received Date: </
label
>
</
div
>
<
div
class
=
"col-lg-3"
>
<
telerik:RadDatePicker
RenderMode
=
"Lightweight"
runat
=
"server"
ID
=
"ReceiveDate"
Culture
=
"en-US"
Calendar-BackColor
=
"Teal"
DbSelectedDate='<%# Bind("Received_Date") %>' TabIndex="3" />
</
div
>
</
div
>
<
div
class
=
"row"
>
<
div
class
=
"col-lg-3"
>
<
label
>Deposited Date: </
label
>
</
div
>
<
div
class
=
"col-lg-3"
>
<
telerik:RadDatePicker
RenderMode
=
"Lightweight"
runat
=
"server"
ID
=
"DepositDate"
DbSelectedDate='<%# Bind("Deposited_Date") %>' TabIndex="4" />
</
div
>
</
div
>
<
div
class
=
"row"
>
<
div
class
=
"col-lg-3"
>
<
label
>Company Name:</
label
>
</
div
>
<
div
class
=
"col-lg-3"
>
<
telerik:RadTextBox
runat
=
"server"
ID
=
"tbCompanyName"
Text='<%# Bind("Company_Name") %>' TabIndex="5" />
</
div
>
</
div
>
<
div
class
=
"row"
>
<
div
class
=
"col-lg-3"
>
<
label
>Check Amount:</
label
>
</
div
>
<
div
class
=
"col-lg-3"
>
<
telerik:RadTextBox
runat
=
"server"
ID
=
"tbCheckAmount"
Text='<%# Bind("Check_Amount") %>' TabIndex="6" />
</
div
>
</
div
>
<
div
class
=
"row"
>
<
div
class
=
"col-lg-3"
>
<
label
>Check Number:</
label
>
</
div
>
<
div
class
=
"col-lg-3"
>
<
telerik:RadTextBox
runat
=
"server"
ID
=
"tbCheckNum"
Text='<%# Bind("Check_Number") %>' TabIndex="7" />
</
div
>
</
div
>
<
div
class
=
"row"
>
<
div
class
=
"col-lg-3"
>
<
label
>Description:</
label
>
</
div
>
<
div
class
=
"col-lg-3"
>
<
telerik:RadTextBox
runat
=
"server"
ID
=
"tbDesc"
Text='<%# Bind("Description_") %>' TabIndex="8" />
</
div
>
</
div
>
<
div
class
=
"row top-pad"
>
<
div
class
=
"col-lg-2"
>
<
asp:Button
ID
=
"btnUpdate"
CssClass
=
"btn btn-block btn-success"
Text='<%# (Container is GridEditFormInsertItem) ? "Add" : "Update" %>'
runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'></
asp:Button
>
</
div
>
<
div
class
=
"col-lg-2"
>
<
asp:Button
ID
=
"btnCancel"
CssClass
=
"btn btn-block btn-danger"
Text
=
"Cancel"
runat
=
"server"
CausesValidation
=
"False"
CommandName
=
"Cancel"
></
asp:Button
>
</
div
>
</
div
>
</
div
>
</
FormTemplate
>
</
EditFormSettings
>
</
MasterTableView
>
<
PagerStyle
Mode
=
"NextPrevAndNumeric"
></
PagerStyle
>
</
telerik:RadGrid
>
Here is my two DatePickers on page load:
<
div
class
=
"row text-center"
>
<
div
class
=
"col-lg-3"
>
<
div
class
=
"row"
>
<
div
class
=
"col-lg-3"
>
<
asp:Label
runat
=
"server"
Text
=
"From: "
/>
</
div
>
<
div
class
=
"col-lg-3"
>
<
telerik:RadDatePicker
RenderMode
=
"Lightweight"
ID
=
"SearchByDateFrom"
runat
=
"server"
Culture
=
"en-US"
/>
</
div
>
</
div
>
</
div
>
<
div
class
=
"col-lg-3"
>
<
div
class
=
"row"
>
<
div
class
=
"col-lg-3"
>
<
asp:Label
runat
=
"server"
Text
=
"To: "
/>
</
div
>
<
div
class
=
"col-lg-3"
>
<
telerik:RadDatePicker
RenderMode
=
"Lightweight"
ID
=
"SearchByDateTo"
runat
=
"server"
Culture
=
"en-US"
/>
</
div
>
</
div
>
</
div
>
<
div
class
=
"col-lg-3"
>
<
asp:Button
class
=
"btn btn-success btn-block"
runat
=
"server"
OnClientClick
=
"saveNewSearch()"
OnClick
=
"btnSearch_Click"
type
=
"button"
Text
=
"Search"
></
asp:Button
>
</
div
>
</
div
>
I am using RadListBox to show a list of items. Each item has an icon. The requirement is jumping on the item when a the first letter of that item is pressed.
For example: It should focus on "Dock" when letter "D" is pressed
Is there any built-in feature to accomplish this?
Hi Telerik,
I tried to find the text from combobox doesn't work using the normal dropdownlist javascript as below
<telerik:RadScriptBlock ID="rsbAction" runat="server">
<script type="text/javascript">
function action(sender, args) {
var rcbCategory = document.getElementById('<%=rcbCategory.ClientID %>');
var result = false;
if (rcbCategory != null)
if (rcbCategory.selectedIndex > 0)
result = true;
args.IsValid = result;
}
</script>
</telerik:RadScriptBlock>
I as well tried the code provided by the sample also doesn't work as below :
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
<script type="text/javascript">
function category(sender, args) {
var result = false;
var rcbCategory = $find("<%=rcbCategory.ClientID %>");
var rcbCategoryText = rcbCategory.get_text();
if (rcbCategoryText.Length > 1) {
var node = rcbCategory.findItemByText(rcbCategoryText);
if (node) {
var value = node.get_value();
if (value.length > 0 && value % 2 == 0)
result = true;
}
}
args.IsValid = result;
}
</script>
</telerik:RadScriptBlock>
Thank you.