The scenario:
I have a MasterTableView and it contains one DetailsTable. And the GridTableView contains a button in its CommandItemTemplate section. I want to manipulate that button programatically on its own click. For example, change its caption or visibility when it is clicked by certain user etc.
The markup for the CommandItemTemplate is below:
<CommandItemTemplate>
<div style="padding: 5px 5px; text-align:right" >
<asp:Button ID="btnSaveAction" runat="server" SkinID="Save"
CausesValidation="false" Text='Save' CommandName="Save" CommandArgument='<%# Eval("ID") %>' />
</div>
</CommandItemTemplate>
Hi,
Is there a way to enable groupable: true after a grid was created?
Thks
I have a TreeView and buttons to expand and collapse the tree within an AjaxPanel.
When the Expand or Collapse button is clicked, I call a js function to perform the action. However, there's a slight delay and it looks like nothing is occurring.
I'd like to show the Loading Panel over the TreeView at this time. I've seen the demo to explicitly show the LoadingPanel but that does not seem to be working. In our application, the treeview will either use load on demand or client side loading. I can get the Loading panel to appear for the LOD tree. But when the tree is loading client side, the Loading Panel does not appear. I assume because there is no postback?
How can I get the panel to appear in this case?
I'm using EditItemTemplate. I have included a user control in it.The user control has 2 drop downs. When I click update on the form, I want to retrieve the selected values from these 2 drop downs. How can do this using the ExtractValue method of RadDataFormEditableItem.
Thanks in Advance,
Siddharth Tandon.
The documentation here:
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/data-binding/model-binding-and-strongly-typed-data-controls-support
gives a Signature for Modelbinding Delete like this.
public void DeleteProduct(int ProductID
)
I tried to implement it, but first I get an ASP.NET error, saying the Method has to allow Reference-Types, because the Grid wants to pass NULL to it.
I changed it to (int? ProductID), the error disappeared, but still the key ID null, although I have specified the
DataKeyNames="ProductID"
Also:
SelectMethod="Select" DeleteMethod="Delete" UpdateMethod ="Update" InsertMethod ="Insert"
Attributes in the RadGrid Tag, sometimes in the MasterTableView Tag, does this make a difference ?
The question is not just on Delete, Update behaves in the same way, saying it hast to be an "int?"
May be I'm mixing up different binding models here ?
Why is Delete(int ProductId) not working ?
Is thery any Switch to say "I want to do Model binding" ?
Can I use the control to upload (by drag and drop) a folder ( folder and all files)?
Thanks
PaoloHi all,
How to export RadChart to pdf ?
I have tried and generated pdf but not able to download.
Please help me.
Thanks
I have a grid on a page, and for the edit settings, I have it set to Template with my own built add/edit area. In this area, I have a RadEditor and two RadDateTimePickers. On my MasterPage, I have the Telerik ScriptManager with some JS files loaded. When I try to add or edit an item for my grid, I am presented with my entry area BUT I am unable to select a date from either of the RadDateTimePickers. The console shows "Uncaught TypeError: p.onEvent is not a function" in the Telerik.Web.UI.WebResource.axd.
My markup is this:
<
asp:Content
ID
=
"Content2"
ContentPlaceHolderID
=
"MainContent"
runat
=
"server"
>
<
div
class
=
"grid-outline"
>
<
b
>Alerts</
b
>
<
telerik:RadAjaxLoadingPanel
runat
=
"server"
ID
=
"radLpAlerts"
></
telerik:RadAjaxLoadingPanel
>
<
telerik:RadGrid
runat
=
"server"
ID
=
"radAlerts"
AllowPaging
=
"True"
AllowSorting
=
"True"
ShowHeader
=
"True"
GridLines
=
"None"
OnNeedDataSource
=
"radAlerts_OnNeedDataSource"
OnItemCommand
=
"radAlerts_OnItemCommand"
OnItemDataBound
=
"radAlerts_OnItemDataBound"
OnInsertCommand
=
"radAlerts_OnInsertCommand"
OnUpdateCommand
=
"radAlerts_OnUpdateCommand"
OnDeleteCommand
=
"radAlerts_OnDeleteCommand"
>
<
ClientSettings
AllowColumnsReorder
=
"False"
EnableRowHoverStyle
=
"True"
EnablePostBackOnRowClick
=
"True"
>
<
Selecting
AllowRowSelect
=
"True"
></
Selecting
>
<
Scrolling
UseStaticHeaders
=
"True"
></
Scrolling
>
</
ClientSettings
>
<
MasterTableView
DataKeyNames
=
"alert_id"
AutoGenerateColumns
=
"False"
AllowMultiColumnSorting
=
"True"
EnableHeaderContextMenu
=
"True"
CommandItemDisplay
=
"TopAndBottom"
Height
=
"100%"
>
<
NoRecordsTemplate
>No Active Alerts.</
NoRecordsTemplate
>
<
CommandItemSettings
ShowAddNewRecordButton
=
"True"
ShowCancelChangesButton
=
"False"
ShowSaveChangesButton
=
"False"
ShowRefreshButton
=
"True"
/>
<
Columns
>
<
telerik:GridEditCommandColumn
ButtonType
=
"ImageButton"
UniqueName
=
"EditCommandColumn"
>
<
HeaderStyle
Width
=
"1%"
></
HeaderStyle
>
<
ItemStyle
VerticalAlign
=
"Top"
HorizontalAlign
=
"Left"
Width
=
"1%"
></
ItemStyle
>
</
telerik:GridEditCommandColumn
>
<
telerik:GridButtonColumn
ConfirmText
=
"Deactivate this item?"
ConfirmDialogType
=
"RadWindow"
ConfirmTitle
=
"Deactivate"
ButtonType
=
"ImageButton"
CommandName
=
"Delete"
ConfirmDialogHeight
=
"160px"
ConfirmDialogWidth
=
"250px"
UniqueName
=
"DeleteColumn"
>
<
HeaderStyle
Width
=
"1%"
></
HeaderStyle
>
<
ItemStyle
VerticalAlign
=
"Top"
Width
=
"1%"
></
ItemStyle
>
</
telerik:GridButtonColumn
>
<
telerik:GridBoundColumn
DataField
=
"alert_id"
HeaderText
=
"ID"
Visible
=
"False"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"alert_text"
HeaderText
=
"Type"
AutoPostBackOnFilter
=
"True"
>
<
HeaderStyle
Width
=
"50%"
></
HeaderStyle
>
<
ItemStyle
VerticalAlign
=
"Top"
HorizontalAlign
=
"Left"
></
ItemStyle
>
</
telerik:GridBoundColumn
>
<
telerik:GridDateTimeColumn
DataField
=
"start_date"
HeaderText
=
"Start Date"
FilterControlWidth
=
"80%"
AutoPostBackOnFilter
=
"True"
>
<
HeaderStyle
Width
=
"10%"
></
HeaderStyle
>
<
ItemStyle
VerticalAlign
=
"Top"
HorizontalAlign
=
"Left"
></
ItemStyle
>
</
telerik:GridDateTimeColumn
>
<
telerik:GridDateTimeColumn
DataField
=
"end_date"
HeaderText
=
"End Date"
FilterControlWidth
=
"80%"
AutoPostBackOnFilter
=
"True"
>
<
HeaderStyle
Width
=
"10%"
></
HeaderStyle
>
<
ItemStyle
VerticalAlign
=
"Top"
HorizontalAlign
=
"Left"
></
ItemStyle
>
</
telerik:GridDateTimeColumn
>
<
telerik:GridCheckBoxColumn
DataField
=
"inactive"
HeaderText
=
"Inactive"
AutoPostBackOnFilter
=
"True"
>
<
HeaderStyle
Width
=
"5%"
></
HeaderStyle
>
<
ItemStyle
VerticalAlign
=
"Top"
HorizontalAlign
=
"Left"
Width
=
"5%"
></
ItemStyle
>
</
telerik:GridCheckBoxColumn
>
</
Columns
>
<
EditFormSettings
EditFormType
=
"Template"
>
<
EditColumn
UniqueName
=
"alert_id"
></
EditColumn
>
<
FormTemplate
>
<
table
class
=
"editTable"
>
<
tr
>
<
td
style
=
"width: 50%;"
>
<
telerik:RadEditor
runat
=
"server"
ID
=
"radAlertText"
RegisterWithScriptManager
=
"True"
EnableResize
=
"True"
Width
=
"100%"
></
telerik:RadEditor
>
<
asp:RequiredFieldValidator
runat
=
"server"
ID
=
"rvAlertText"
ControlToValidate
=
"radAlertText"
ErrorMessage
=
"Please enter alert text"
Display
=
"Dynamic"
>*</
asp:RequiredFieldValidator
>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
telerik:RadDateTimePicker
runat
=
"server"
ID
=
"radAlertStartDateTime"
Width
=
"90%"
>
<
Calendar
>
<
SpecialDays
>
<
telerik:RadCalendarDay
Repeatable
=
"Today"
>
<
ItemStyle
BackColor
=
"LightGray"
Font-Bold
=
"True"
BorderStyle
=
"Solid"
BorderColor
=
"Black"
BorderWidth
=
"1px"
></
ItemStyle
>
</
telerik:RadCalendarDay
>
</
SpecialDays
>
</
Calendar
>
<
TimeView
Interval
=
"00:15:00"
Columns
=
"6"
></
TimeView
>
<
DateInput
DisplayDateFormat
=
"yyyy-MM-dd h:mm tt"
DateFormat
=
"yyyy-MM-dd h:mm tt"
EmptyMessage
=
"Alert Start Date/Time"
></
DateInput
>
</
telerik:RadDateTimePicker
>
<
asp:RequiredFieldValidator
runat
=
"server"
ID
=
"rvStartDate"
ControlToValidate
=
"radAlertStartDateTime"
ErrorMessage
=
"Please enter a Starting Date"
Display
=
"Dynamic"
>*</
asp:RequiredFieldValidator
>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
telerik:RadDateTimePicker
runat
=
"server"
ID
=
"radAlertEndDateTime"
Width
=
"90%"
>
<
Calendar
>
<
SpecialDays
>
<
telerik:RadCalendarDay
Repeatable
=
"Today"
>
<
ItemStyle
BackColor
=
"LightGray"
Font-Bold
=
"True"
BorderStyle
=
"Solid"
BorderColor
=
"Black"
BorderWidth
=
"1px"
></
ItemStyle
>
</
telerik:RadCalendarDay
>
</
SpecialDays
>
</
Calendar
>
<
TimeView
Interval
=
"00:15:00"
Columns
=
"6"
></
TimeView
>
<
DateInput
DisplayDateFormat
=
"yyyy-MM-dd h:mm tt"
DateFormat
=
"yyyy-MM-dd h:mm tt"
EmptyMessage
=
"Alert End Date/Time"
></
DateInput
>
</
telerik:RadDateTimePicker
>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
asp:CheckBox
runat
=
"server"
ID
=
"cbInactive"
Text
=
"Inactive"
Checked
=
"False"
/>
</
td
>
</
tr
>
<
tr
>
<
td
colspan
=
"2"
>
<
telerik:RadSpell
runat
=
"server"
ID
=
"rsSpell"
ControlsToCheck
=
"txtGradeType"
IsClientID
=
"True"
SpellCheckProvider
=
"PhoneticProvider"
/>
</
td
>
</
tr
>
<
tr
>
<
td
colspan
=
"2"
> </
td
>
</
tr
>
<
tr
>
<
td
colspan
=
"2"
style
=
"text-align: left"
>
<
asp:Button
runat
=
"server"
ID
=
"btnUpdate"
Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' />
<
asp:Button
runat
=
"server"
ID
=
"btnCancel"
Text
=
"Cancel"
CommandName
=
"Cancel"
CausesValidation
=
"False"
/>
</
td
>
</
tr
>
</
table
>
</
FormTemplate
>
</
EditFormSettings
>
</
MasterTableView
>
</
telerik:RadGrid
>
</
div
>
</
asp:Content
>
Is there something I have to do to get the controls to play nice on the page?
I have been battling with this for days and cannot find a solution. There is not a hard-coded height anywhere. Why is the height of this window so big overall and how can I fix it?