Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
462 views

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

Vessy
Telerik team
 answered on 04 Jul 2018
1 answer
304 views

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

 

Eyup
Telerik team
 answered on 04 Jul 2018
5 answers
595 views

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>

Jonathan
Top achievements
Rank 1
Iron
Veteran
 answered on 03 Jul 2018
1 answer
349 views

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

Rumen
Telerik team
 answered on 03 Jul 2018
2 answers
418 views

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

 

 

Manuel
Top achievements
Rank 1
 answered on 03 Jul 2018
1 answer
340 views

Enable CheckBoxes in one radGrid after checked in other RadGrid.

I'm using <ClientEvents onSelected="func" /> and then I have finction ib JavaScript run on the other RadGrid. I know to to check them all (set_selected(true))

but I dont know how ot enable them all.

 

Thenks!

 

Eyup
Telerik team
 answered on 03 Jul 2018
1 answer
270 views

How to implement following scenario in a Grid which has a Master Table and a Detailed Table

"When all items in the detail table are selected then corresponding master table's parent item should also be selected"

Screen shot attached

Peter Milchev
Telerik team
 answered on 03 Jul 2018
4 answers
376 views
Hi Team,

We got a case that the datetimepicker not support the culture of Vietnam. It displays 6-May-2013, but after selected, it changes to 6-Jan-2005 or other incorrect date. I am not sure whether this is a bug in telerik control, but I heard that telerik not support some culture. Can you give me a conform for that? If it support or had fixed, please provide me the version number. 

Thanks,
Tony Zhao
Eyup
Telerik team
 answered on 03 Jul 2018
2 answers
254 views

Hi,

When I place RadSpreadsheet in a Radwindows ContentTemplate, no sheet is shown when I open the window.

The sheet is correctly shown when I click a toolbar item or switch Sheets.

I load the Excel in Page_Init, just like the demo page.

 

Can you reproduce this faulty behavior?

 

BR, Marc

Fit2Page
Top achievements
Rank 3
Bronze
Bronze
Iron
 answered on 03 Jul 2018
2 answers
226 views

Hi, I'm getting the following error from my RadGrid.. any ideas?
Thank you

Error: Value cannot be null. Parameter name: virtualPath

Stack Trace: at System.Web.VirtualPath.Create(String virtualPath, VirtualPathOptions options) at Telerik.Web.UI.GridEditFormItem.InitializeUserControlForm(GridColumn[] columns, ControlCollection controls, GridEditFormSettings formSettings) at Telerik.Web.UI.GridEditFormItem.InitializeEditForm(GridColumn[] columns) at Telerik.Web.UI.GridEditFormItem.Initialize(GridColumn[] columns) at Telerik.Web.UI.GridEditFormItem.SetupItem(Boolean dataBind, Object dataItem, GridColumn[] columns, ControlCollection rows) at Telerik.Web.UI.GridItemBuilder.CreateItems(GridGroupingContext group) at Telerik.Web.UI.GridTableView.CreateItems(IEnumerator enumerator, GridColumn[] columns, ControlCollection controls) at Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) at Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) at System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() at System.Web.UI.Control.EnsureChildControls() at Telerik.Web.UI.GridTableViewBase.get_Controls() at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Page.LoadAllState() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Chuks
Top achievements
Rank 1
 answered on 02 Jul 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?