I have a radgrid with command buttons to edit items or insert new items. When editing items, my edit form template has several checkboxes. I bind the "checked" attribute of these checkboxes to bits in the database to see if they should be checked when the form loads, like so:
This works just fine when editing, but it doesn't work when inserting a new item since it's a new item and there is no database value to bind to. So I found code that lets you specify if it is and insert item or not. The problem is I can't figure out how to do a database bind when using it. I need something like this:
when I try this I get the follwing error:
Error 24 The name 'Bind' does not exist in the current context
I have to believe this is possible, my context is just wrong. Does anyone know what I am doing wrong?
Hello,
I have a Gridview with a autocompletbox and other types of fields inside. The gridview is binded by Sql (SqlDataSource1) and all fields are populated in both Item and Insert mode without any problem, except the Autocompletebox.
The Autocompletebox works fine, meaning that it contains all the values from the SqlDataSource (SqlDataSource4 below) but the value that appears in the item mode (that uses SqlDataSource1) is not populated in editmode.
What is wrong with my code to retreave the SqlDataSource1 value? A codebehind is needed?
Thanks in advance.
<MasterTableView DataSourceID="SqlDataSource1" AutoGenerateColumns="False" DataKeyNames="FlowID" CommandItemDisplay="Top " ItemStyle-CssClass="grid">
<Columns>
<telerik:GridBoundColumn DataField="BudgetCode" HeaderText="Budget" SortExpression="BudgetCode" UniqueName="BudgetCode" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" ShowFilterIcon="false" FilterControlWidth="80" HeaderStyle-Width="100" ></telerik:GridBoundColumn>
</Columns>
<EditFormSettings EditFormType="Template">
<EditColumn ButtonType="ImageButton" />
<FormTemplate>
<telerik:RadAutoCompleteBox ID="ddlBudgetCode" runat="server" DataSourceID="SqlDataSource4" DataTextField="BudgetCode" DataValueField="BudgetCodeId" InputType="Token">
</telerik:RadAutoCompleteBox>
</FormTemplate>
</EditFormSettings>
</MasterTableView>
Hello,
I am having a hard time finding a concrete definition or documentation on how to retrieve range values from RadSlider. I have tried several ideas I found going through these forums, the demos, and other sites online but to no avail have I found a solution. Is there something I am missing?
Lines 1-2 return the index of the currently selected items, but not the value itself. I found this in the RadSlider demo, but I am not sure how this would work for a date range (represented as a string).
Lines 4-5 allows me to see one of the values, but I am not sure how to get the range and not just one value.
Lines 7-8 allowed me to see the values that I wanted, but when I tried converting the values to datetime variables, Visual Studio returned an error stating that I couldn't convert decimals to datetime.
The end goal is to connect the RadSlider to the RadHtmlChart and have the dates of the chart correlate with what the user chooses in the slider; an example of this would be the Olympic Medal site on the Telerik demos.
Any help would be greatly appreciated!
1.
Dim
temp1
As
String
= rsDateRange.SelectionStart.ToString()
2.
Dim
temp2
As
String
= rsDateRange.SelectionEnd.ToString()
3.
4.
Dim
value
As
Integer
= rsDateRange.Value
5.
Dim
str
As
String
= rsDateRange.Items(value).Value.ToString()
6.
7.
Dim
tempStart
As
RadSliderItem = rsDateRange.Items(rsDateRange.SelectionStart)
8.
Dim
tempEnd
As
RadSliderItem = rsDateRange.Items(rsDateRange.SelectionEnd)
Hello,
I would like to change the value of the editor numAmount based on the selected item in ddlCharge (client side). Using the event OnClientSelectedIndexChanged I can get the selected value but how can I update the numAmount value?
I tried something like this, but it doesn't affect the displayed value on the RadNumericTextBox
function SetDefaultAmountCombo(sender, eventArgs) {
var selected = eventArgs.get_item().get_value();
if
(selected !=
null
) {
$telerik.findControl(document,
"numAmount"
).set_value(40);
}
}
Thanks
<telerik:RadGrid ID="gridOthers" runat="server" GridLines="None" AllowAutomaticDeletes="true" AllowAutomaticInserts="true" AllowAutomaticUpdates="true" DataSourceID="dsOthers"
PageSize="10" AllowPaging="true" AutoGenerateColumns="false" OnBatchEditCommand="gridOthers_BatchEditCommand" ShowFooter="true" Width="700px" HorizontalAlign="Right"
OnItemUpdated="gridOthers_ItemUpdated" OnItemInserted="gridOthers_ItemInserted" OnItemDeleted="gridOthers_ItemDeleted">
<ClientSettings Resizing-AllowColumnResize="false">
<ClientEvents />
</ClientSettings>
<MasterTableView CommandItemDisplay="Top" DataKeyNames="DriverSettlementDetailId" HorizontalAlign="NotSet" EditMode="Batch" DataSourceID="dsOthers"
AutoGenerateColumns="false">
<BatchEditingSettings EditType="Row" />
<SortExpressions>
<telerik:GridSortExpression FieldName="ChargeDate" SortOrder="Ascending" />
</SortExpressions>
<Columns>
<telerik:GridBoundColumn DataField="DriverSettlementDetailId" ReadOnly="true" HeaderText="Id" UniqueName="DriverSettlementDetailId">
<HeaderStyle HorizontalAlign="Center" Width="50px" />
<ItemStyle HorizontalAlign="Center" />
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderText="Type" UniqueName="ChargeId" DataField="ChargeId" DefaultInsertValue="Fuel">
<ItemTemplate>
<%# Eval("Charge.ChargeDesc") %>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadComboBox runat="server" ID="ddlCharge" DataValueField="ChargeId" OnClientSelectedIndexChanged="SetDefaultAmountCombo"
DataTextField="ChargeDesc" DataSourceID="dsChargesOthers" Width="110px">
</telerik:RadComboBox>
</EditItemTemplate>
<HeaderStyle HorizontalAlign="Center" Width="150px" />
<ItemStyle HorizontalAlign="Center" />
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="Notes" HeaderText="Notes" SortExpression="Notes" ColumnEditorID="editorNotes"
UniqueName="Notes" FooterText="Total: ">
<HeaderStyle HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Left" />
<FooterStyle Font-Bold="true" HorizontalAlign="Right" />
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderText="Amount" SortExpression="Amount" UniqueName="Amount"
DataField="Amount" FooterAggregateFormatString="{0:C2}" Aggregate="Sum">
<ItemTemplate>
<asp:Label runat="server" ID="lblAmount" Text='<%# Eval("Amount", "{0:C}") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<span>
<telerik:RadNumericTextBox Width="95px" runat="server" ID="numAmount" Type="Currency">
</telerik:RadNumericTextBox>
<span style="color: Red">
<asp:RequiredFieldValidator ID="rfvAmount"
ControlToValidate="numAmount" ErrorMessage="*Required" runat="server" Display="Dynamic">
</asp:RequiredFieldValidator>
</span>
</span>
</EditItemTemplate>
<HeaderStyle HorizontalAlign="Center" Width="100px" />
<ItemStyle HorizontalAlign="Right" />
<FooterStyle HorizontalAlign="Right" />
</telerik:GridTemplateColumn>
<telerik:GridButtonColumn ConfirmText="Delete this record?<br/><strong><i>Remember to click Save Changes before leaving the form</i></strong>" ConfirmDialogType="RadWindow"
ConfirmTitle="Delete" HeaderText="Delete" HeaderStyle-Width="50px" ButtonType="ImageButton"
CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
<HeaderStyle HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Center" />
</telerik:GridButtonColumn>
</Columns>
</MasterTableView>
<
telerik:RadDatePicker
ID
=
"iInicioPeriodo"
ClientIDMode
=
"Static"
runat
=
"server"
Width
=
"80"
Style
=
"margin-right: 10px;"
DateFormat
=
"dd/MM/yyyy"
>
</
telerik:RadDatePicker
>
até
<
telerik:RadDatePicker
ID
=
"iTerminoPeriodo"
ClientIDMode
=
"Static"
runat
=
"server"
Width
=
"80"
Style
=
"margin-left: 10px;"
DateFormat
=
"dd/MM/yyyy"
>
</
telerik:RadDatePicker
>
Hi. When we use the old version of telerik and write code like this
<telerik:RadGrid runat="server" ID="RadGridDocuments" AllowPaging="True"
Width="100%" Height="100%"
<PagerStyle Mode="NextPrevAndNumeric" HorizontalAlign="Right" AlwaysVisible="True" />
<ClientSettings EnableAlternatingItems="True" EnableRowHoverStyle="True">
ResizeGridOnColumnResize="True" />
</ClientSettings>
<MasterTableView TableLayout="Auto" >
<Columns>
<telerik:GridTemplateColumn HeaderText="<%$Resources:Resource, Document_Name%>" UniqueName="DocumentName" SortExpression="DocumentName">
<ItemStyle Wrap="False" />
<ItemTemplate>
<telerik:RadButton ID="LinkButtonDocumentName" ButtonType="LinkButton" CssClass="LinkButton" runat="server" ToolTip='<%# DataBinder.Eval(Container.DataItem, "DocumentName")%>'
Text='<%# DataBinder.Eval(Container.DataItem, "DocumentName")%>' />
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
that generate radbutton with type linkbutton to anchor element
<a id="ctl00_ContentPlaceHolder1_RadGridUploadedFiles_ctl00_ctl04_LinkButtonUploadedFileName" title="testUpload" class="RadButton RadButton_Default rbLinkButton LinkButton" href="/AppNew/FileManagement/ViewerModel.aspx?source_id=1efdf640-793d-434f-a41a-fcbc263a57f6&viewer_code=ecodomus&facility_id=2fb3a9f8-da52-4d71-aa98-13c526a5eb50"><span class="rbText">testUpload (EcoDomus Model Viewer)</span><input id="ctl00_ContentPlaceHolder1_RadGridUploadedFiles_ctl00_ctl04_LinkButtonUploadedFileName_ClientState" name="ctl00_ContentPlaceHolder1_RadGridUploadedFiles_ctl00_ctl04_LinkButtonUploadedFileName_ClientState" type="hidden" autocomplete="off"></a>
but last version of telerik generate a span
<span id="ctl00_ContentPlaceHolder1_RadGridUploadedFiles_ctl00_ctl04_LinkButtonUploadedFileName" title="house" class="RadButton RadButton_Default rbLinkButton LinkButton rbHovered" tabindex="0"><span class="rbText">house (EcoDomus Model Viewer)</span><input id="ctl00_ContentPlaceHolder1_RadGridUploadedFiles_ctl00_ctl04_LinkButtonUploadedFileName_ClientState" name="ctl00_ContentPlaceHolder1_RadGridUploadedFiles_ctl00_ctl04_LinkButtonUploadedFileName_ClientState" type="hidden" autocomplete="off"></span>
I want anchor element, how can I make telerik to generate the correct markup?
Hi!
Q1 2015 - .Net 4.0 - IE11
Just a simple save of the editor content, which is inside a RadAjaxPanel. It won't save.
I've added the App_Browser IE11 Fix. Also have hidden Div with an editor in it.
The only way I can get it to save is by using the developer tools in IE and emulating IE8
Everything working as expected on all other browsers.
All help appreciated.
Cheers,
Jon