I added a RadDropDownList to my user control and added a OnSelectedIndexChanged but when I run the project and change the dropdown index, it doesn't hit the OnSelectedIndexChanged method.
<
telerik:RadDropDownList
ID
=
"RadDropDownList1"
runat
=
"server"
AutoPostBack
=
"true"
OnSelectedIndexChanged
=
"RadDropDownList1_SelectedIndexChanged"
>
<
Items
>
<
telerik:DropDownListItem
Text
=
"-- ALL --"
Value
=
"0"
/>
<
telerik:DropDownListItem
Text
=
"Test 1"
Value
=
"1"
/>
<
telerik:DropDownListItem
Text
=
"Test 2"
Value
=
"2"
/>
</
Items
>
</
telerik:RadDropDownList
>
protected void RadDropDownList1_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e)
{
int x = -1;
x = e.Index;
}
I put a breakpoint on the first line of the SelectedIndexChanged method and it never gets in there.
Hi.. I created a new theme (as you know)
When I apply the theme - the 'Expand' symbol/graph does not appear. See attachment. If i remove it I see the '>'.
Here's the generated CSS - how can I make the arrow appear or add my own image?
thx again!
.RadGrid_Flom .rgActiveRow td:not(.rgExpandCol) {
box-shadow: inset 0px 5px 5px -5px #676767, inset 0px -5px 5px -5px #676767;
}
.RadGrid_Flom .rgActiveRow td:first-child:not(.rgExpandCol),
.RadGrid_Flom GTT06222018 + td {
box-shadow: inset 0px 5px 5px -5px #676767, inset 0px -5px 5px -5px #676767, inset 5px 0px 5px -5px #676767;
}
.RadGrid_Flom .rgActiveRow td:not(.rgExpandCol):last-child {
box-shadow: inset 0px 5px 5px -5px #676767, inset 0px -5px 5px -5px #676767, inset -5px 0px 5px -5px #676767;
}
Based on RadioButtonList's selection, I determine the datasource of the RadGrid.
I have AutoPostBack to true for the RadioButtonList and do a Rebind in SelectedIndexChanged of RadioButton and it displays the data from different sources in the RadGrid just fine.
However, in the pager section, its not refreshing the number of items.
That is, say datasource A has 50 records and B has 100 records. Choosing between different radiobutton, it displays the records from A and B. But in pager section, it always shows number of items from datasource A.
I have a problem That I need help with. I have a simple grid using all GridBoundColumns, except for 2 dropdown lists.
AllowAutoInsert and Updates are enabled so I do not do any code to show the value when I do an update. All of my fields that are using a GridBoundColumn show the proper values from the database. Except for the 2 drop downs. Both of DropDowns show no value at all.
Note the dropdowns do work and I can select a value, but the data from the database is not shown. Can anyone please tell me how or provide a link that shows how I can get these values to populate the drop downs?
I have attached a screen shot that shows the form in edit mode
Thanks
I can't use the built-in command items and have defined my own command item template. However, all that happens when I click export or print is the command item header, footer, and paging disappear. I do not get a excel or pdf file. Here is my code. What should I do different? Thanks!
<
telerik:RadAjaxPanel
ID
=
"RadAjaxPanel1"
runat
=
"server"
EnableAJAX
=
"true"
>
<
telerik:RadGrid
RenderMode
=
"Lightweight"
ID
=
"RadGrid1"
GridLines
=
"None"
onitemdatabound
=
"RadGrid1_OnItemDataBound"
OnItemCommand
=
"RadGrid1_OnItemCommand"
AllowFilteringByColumn
=
"true"
runat
=
"server"
FilterType
=
"HeaderContext"
EnableHeaderContextMenu
=
"true"
skin
=
"Bootstrap"
EnableHeaderContextFilterMenu
=
"true"
AllowPaging
=
"True"
PagerStyle-AlwaysVisible
=
"true"
OnFilterCheckListItemsRequested
=
"RadGrid1_FilterCheckListItemsRequested"
AllowSorting
=
"true"
GroupingEnabled
=
"true"
>
<
ExportSettings
FileName
=
"Inventory"
IgnorePaging
=
"True"
SuppressColumnDataFormatStrings
=
"True"
ExportOnlyData
=
"True"
OpenInNewWindow
=
"True"
>
<
Excel
Format
=
"Xlsx"
/>
</
ExportSettings
>
<
MasterTableView
AutoGenerateColumns
=
"False"
DataKeyNames
=
"InventoryId"
CommandItemDisplay
=
"TopAndBottom"
>
<
CommandItemTemplate
>
<
div
class
=
"right"
>
<
asp:ImageButton
runat
=
"server"
id
=
"btnNew"
ImageUrl
=
"/images/icons/add.png"
tooltip
=
"Add New Inventory"
alternateText
=
"Add New Inventory"
commandName
=
"New"
/>
<
asp:ImageButton
runat
=
"server"
id
=
"btnPrint"
ImageUrl
=
"/images/icons/print.png"
tooltip
=
"Print"
alternateText
=
"Print"
commandName
=
"Print"
/>
<
asp:ImageButton
runat
=
"server"
id
=
"btnExport"
ImageUrl
=
"/images/icons/save.png"
tooltip
=
"Export to Excel"
alternateText
=
"Export to Excel"
commandName
=
"Export"
/>
</
div
>
</
CommandItemTemplate
>
<
Columns
>
<
telerik:GridBoundColumn
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"InventoryName"
FilterControlAltText
=
"Filter Inventory Name column"
HeaderText
=
"Name"
SortExpression
=
"InventoryName"
UniqueName
=
"InventoryName"
/>
<
telerik:GridBoundColumn
display
=
"False"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"InventoryDescription"
FilterControlAltText
=
"Filter Inventory Description column"
HeaderText
=
"Description"
SortExpression
=
"InventoryDescription"
UniqueName
=
"InventoryDescription"
/>
<
telerik:GridBoundColumn
ReadOnly
=
"True"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"BuildingName"
FilterControlAltText
=
"Filter Building Name column"
HeaderText
=
"Building"
SortExpression
=
"BuildingName"
UniqueName
=
"BuildingName"
/>
<
telerik:GridBoundColumn
ReadOnly
=
"True"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"SpaceName"
FilterControlAltText
=
"Filter Space Name column"
HeaderText
=
"Space"
SortExpression
=
"SpaceName"
UniqueName
=
"SpaceName"
/>
<
telerik:GridBoundColumn
ReadOnly
=
"True"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"InventoryTypeName"
FilterControlAltText
=
"Filter Inventory Type column"
HeaderText
=
"Type"
SortExpression
=
"InventoryTypeName"
UniqueName
=
"InventoryTypeName"
/>
<
telerik:GridBoundColumn
ReadOnly
=
"True"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"CategoryName"
FilterControlAltText
=
"Filter Inventory Category column"
HeaderText
=
"Category"
SortExpression
=
"CategoryName"
UniqueName
=
"CategoryName"
/>
<
telerik:GridBoundColumn
ReadOnly
=
"True"
display
=
"False"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"UnitQuantityAbbreviation"
FilterControlAltText
=
"Filter Unit Abbreviation"
HeaderText
=
"Unit"
SortExpression
=
"UnitQuantityAbbreviation"
UniqueName
=
"UnitQuantityAbbreviation"
/>
<
telerik:GridBoundColumn
display
=
"False"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"UnitPrice"
DataFormatString
=
"{0:C}"
FilterControlAltText
=
"Filter Unit Price"
HeaderText
=
"Price"
SortExpression
=
"UnitPrice"
UniqueName
=
"UnitPrice"
/>
<
telerik:GridBoundColumn
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"CurrentQuantity"
FilterControlAltText
=
"Filter Current Quantity"
HeaderText
=
"Quantity"
SortExpression
=
"CurrentQuantity"
UniqueName
=
"CurrentQuantity"
/>
<
telerik:GridBoundColumn
display
=
"False"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"MinimumQuantity"
FilterControlAltText
=
"Filter Minimum Quantity"
HeaderText
=
"Minimum"
SortExpression
=
"MinimumQuantity"
UniqueName
=
"MinimumQuantity"
/>
<
telerik:GridBoundColumn
display
=
"False"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"PartNumber"
FilterControlAltText
=
"Filter Part Number"
HeaderText
=
"Part"
SortExpression
=
"PartNumber"
UniqueName
=
"PartNumber"
/>
<
telerik:GridBoundColumn
display
=
"False"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"ModelNumber"
FilterControlAltText
=
"Filter Model Number"
HeaderText
=
"Model"
SortExpression
=
"ModelNumber"
UniqueName
=
"ModelNumber"
/>
<
telerik:GridBoundColumn
display
=
"False"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"StockNumber"
FilterControlAltText
=
"Filter Stock Number"
HeaderText
=
"Stock"
SortExpression
=
"StockNumber"
UniqueName
=
"StockNumber"
/>
<
telerik:GridBoundColumn
display
=
"False"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"Manufacturer"
FilterControlAltText
=
"Filter Manufacturer"
HeaderText
=
"Mfr."
SortExpression
=
"Manufacturer"
UniqueName
=
"Manufacturer"
/>
<
telerik:GridBoundColumn
display
=
"False"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"Url"
FilterControlAltText
=
"Filter Url"
HeaderText
=
"Url"
SortExpression
=
"Url"
UniqueName
=
"Url"
/>
<
telerik:GridButtonColumn
ConfirmText
=
"Delete this inventory?"
ConfirmDialogType
=
"RadWindow"
EnableHeaderContextMenu
=
"False"
ConfirmTitle
=
"Delete"
Exportable
=
"False"
Reorderable
=
"False"
ButtonType
=
"ImageButton"
ImageUrl
=
"/images/icons/delete.png"
ColumnGroupName
=
"Action"
CommandName
=
"Delete"
Text
=
"Delete"
UniqueName
=
"DeleteColumn"
>
<
HeaderStyle
CssClass
=
"rgHeader ButtonColumnHeader"
></
HeaderStyle
>
<
ItemStyle
CssClass
=
"ButtonColumn"
/>
</
telerik:GridButtonColumn
>
<
telerik:GridButtonColumn
Text
=
"Edit"
CommandName
=
"Edit"
Exportable
=
"False"
Reorderable
=
"False"
EnableHeaderContextMenu
=
"False"
FilterCheckListEnableLoadOnDemand
=
"False"
ButtonType
=
"ImageButton"
ImageUrl
=
"/images/icons/edit.png"
ColumnGroupName
=
"Action"
/>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
</
telerik:RadAjaxPanel
>
Protected
Sub
RadGrid1_NeedDataSource(
ByVal
source
As
Object
,
ByVal
e
As
Telerik.Web.UI.GridNeedDataSourceEventArgs)
Handles
RadGrid1.NeedDataSource
RadGrid1.DataSource = InventoryController.GetInventoriesForList()
End
Sub
Protected
Sub
RadGrid1_OnItemCommand(sender
As
Object
, e
As
GridCommandEventArgs)
Select
Case
e.CommandName
Case
"New"
Response.Redirect(
"InventoryManage.aspx"
)
Case
"Edit"
Response.Redirect(
String
.Format(
"InventoryManage.aspx?id={0}"
, GetInventoryIdFromGridItem(e.Item)))
Case
"Delete"
InventoryController.DeleteInventory(GetInventoryIdFromGridItem(e.Item))
Case
"Print"
RadGrid1.MasterTableView.ExportToPdf()
Case
"Export"
RadGrid1.MasterTableView.ExportToExcel()
End
Select
End
Sub
Hi..
How do you set the width of the Calendar - the Input ?
I'd like the Input to be 100px and the 'popup' to fit in the 100px
thx in advance
<td>
<telerik:RadDatePicker rendermode="Lightweight" Skin="Flom" EnableEmbeddedSkins="false" runat="server" ID="RadDatePickerFROM" AutoPostBack="true" Width="100px" Calendar-ShowRowHeaders="false" Calendar-ShowOtherMonthsDays="false" DateInput-EmptyMessage="Start Date" OnSelectedDateChanged="RadDatePickerFROM_SelectedDateChanged">
<Calendar ID="Calendar1" runat="server" EnableKeyboardNavigation="true">
</Calendar>
</telerik:RadDatePicker>
</td>
Hi.
When I apply my custom theme the RadDatePicker does not show the small calendar icon on the right in the input text field.
Any ideas?
thx
Hello,
I have the following problem.
I have a Radgrid with cells default value=0
When i edit these cells for example i put the number 3 in the cell and click on save button
I get always "0" when i read the cell value instead of the Value 3 which i entered.
This is my code:
telerik:RadGrid ID="GridVK" runat="server" Culture="de-DE" AutoGenerateColumns="False" MasterTableView-EditMode="InPlace">
<
GroupingSettings
CollapseAllTooltip
=
"Collapse all groups"
></
GroupingSettings
>
<
ClientSettings
>
<
ClientEvents
OnBatchEditClosed
=
"batchEditClosed"
/>
</
ClientSettings
>
<
MasterTableView
EditMode
=
"Batch"
>
<
BatchEditingSettings
OpenEditingEvent
=
"MouseUp"
EditType
=
"Cell"
/>
<
RowIndicatorColumn
Visible
=
"False"
>
</
RowIndicatorColumn
>
<
ExpandCollapseColumn
Created
=
"True"
>
</
ExpandCollapseColumn
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"name"
FilterControlAltText
=
"Filter column1 column"
HeaderText
=
"Name"
UniqueName
=
"ColName"
>
</
telerik:GridBoundColumn
>
<
telerik:GridNumericColumn
DataField
=
"Sells"
DecimalDigits
=
"2"
FilterControlAltText
=
"Filter column column"
HeaderText
=
"Sells"
UniqueName
=
"ColSells"
EmptyDataText
=
"0"
>
</
telerik:GridNumericColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
in VB:
For Each item As GridDataItem In GridVK.Items
vk = New Selldata
vk.vkname = item("colname").Text
vk.solljanuar = item("ColSells").Text
next
Why did i get always "0" instead the value i entered?
Sorry for my english.
Regards
Manuel