Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
118 views
I have a requiredfieldvalidator for a raddropdownlist in a radgrid and it will not fire in editmode or insert.  The other requried validators in the grid are firing, but this one doesn't want to work.  What is the problem?  Here is the code-

 <telerik:GridTemplateColumn HeaderStyle-Width="200px" HeaderText="Fund" UniqueName="fund_id_fk"
                            DataField="fund_id_fk">
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblFund" Width="200px" Text='<%# Eval("unit_ep_funds.fund_name") %>'></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <telerik:RadDropDownList runat="server" ID="FundIDDropDown" DataValueField="fund_id"
                                    SelectedValue='<%# Bind("fund_id_fk") %>' DataTextField="fund_name" DataSourceID="EntityDataFunds"
                                    AppendDataBoundItems="true">
                                    <Items>
                                        <telerik:DropDownListItem Text="Select a fund" Value="-1" />
                                    </Items>
                                </telerik:RadDropDownList>
                                <asp:RequiredFieldValidator InitialValue="-1" ID="RequiredFieldValidator11" ControlToValidate="FundIDDropDown"
                                    ErrorMessage="**Required" runat="server">
                                </asp:RequiredFieldValidator>
                            </EditItemTemplate>
                        </telerik:GridTemplateColumn>
Princy
Top achievements
Rank 2
 answered on 29 Oct 2013
7 answers
797 views
This related to my support request http://www.telerik.com/account/support-tickets/view-ticket.aspx?threadid=447674

I have a hierarchical grid. The hierarchy is as follows
Specimen-->Part-->Block-->Slide

The Part table has 2 children. Tracking records and Blocks. All the grid expansion is at client side. 
Sometimes there might not be any tracking records. 
I have 2 questions 
  1. How do I hide the headers and footers (from javascript) for the details table if there is no data. 
  2. If there are no records, I bind the grid to an empty string. This displays the message 'No child records to display.'. How can I set my custom message?


I have searched the forums for this without luck. 
Please help. 

Thanks in advance
   
Kostadin
Telerik team
 answered on 29 Oct 2013
3 answers
166 views

I am having trouble getting the Q3 2013 PivotGrid (most recent release) to display data from the Pivot Grid control.


My pivot grid definition (I have no code-behind related to it) is below, along with some code I have in the PageLoad function of the page.  The code from the PageLoad function works fine, but I can't seem to get anything to display in the PivotGrid.  According to the SQL 2012 docs, we don't need to use msmdpump.dll anymore for remote access.  Is that part of my problem? 



I have the Microsoft.AnalysisServices.AdomdClient (v11) referenced and in the bin folder of the web site.



Pivot Grid code:

<telerik:RadPivotGrid ID="RadPivotGrid1" runat="server">
        <PagerStyle ChangePageSizeButtonToolTip="Change Page Size" PageSizeControlType="RadComboBox"/>
         
        <OlapSettings ProviderType="Adomd">
            <AdomdConnectionSettings 
                Cube="UtilitySmart" 
                Database="UtilitySmart" 
                ConnectionString="Data Source=SERVERNAME; Catalog=UtilitySmart;">
            </AdomdConnectionSettings>
                
        </OlapSettings>
         
        <Fields>
            <telerik:PivotGridRowField DataField="[Dim Utility Smart Property].[Portfolio]" Caption="Portfolio" UniqueName="Portfolio"/>
            <telerik:PivotGridAggregateField DataField="[Measures].[AmtPaid]" Caption="Amount Paid" UniqueName="AmtPaid"/>
        </Fields>       
 
        <ConfigurationPanelSettings EnableOlapTreeViewLoadOnDemand="True" LayoutType="OneByFour"/>
    </telerik:RadPivotGrid>




PageLoad code:

var conn = new AdomdConnection("Data Source=SERVERNAME;Catalog=UtilitySmart;");
               conn.Open();
 
               var cmd = new AdomdCommand("SELECT [Dim Utility Smart Property].[Portfolio].Members ON ROWS, [Measures].[Amt Paid] ON COLUMNS FROM [UtilitySmart] ", conn);
 
               var resultObj = cmd.Execute();








Antonio Stoilkov
Telerik team
 answered on 29 Oct 2013
2 answers
79 views



I have a grid that is adding combo boxes to the autogenerated header rows and when 
the user clicks a button on the page I will need to determine what they selected in these combo boxes...

So I have been playing around with a foreach loop and trying to get a hock into the column's header and get the combo's.... Any suggestions?

protected void ValidateButton_Click(object sender, EventArgs e)
        {
  
// Foreach loop that will need to access the header controls and determine what a user selected in a dynamically injected //combobox...
//
}

Method that populates the Header row with combo boxes

protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridHeaderItem)
            {
                GridHeaderItem item = e.Item as GridHeaderItem;
                var columnName = "Column";
                var columnCount = 0;
                foreach (GridColumn col in RadGrid1.MasterTableView.AutoGeneratedColumns)
                {
                    RadComboBox radCombo = new RadComboBox();
                    radCombo.ClientIDMode = ClientIDMode.Static;
                    radCombo.ID = "Column" + columnCount;
                    radCombo.EmptyMessage = "Select Field";
 
                    //Need to get fields and etc,then loop and add
                    var receiveByTagsFields = GetReceiveByTagFields(Convert.ToInt32(PurchaseShipmentUid));
                    foreach (var field in receiveByTagsFields.ReceiveByTagImportFields.OrderBy(x => x.Label))
                    {
                        RadComboBoxItem CBitem = new RadComboBoxItem();
                        CBitem.ClientIDMode = ClientIDMode.AutoID;
                        CBitem.Text = field.Label;
                        CBitem.Value = field.Id.ToString();
                        radCombo.Items.Add(CBitem);
                    }
 
                    if (receiveByTagsFields.MetaFields.Count() != 0)
                    {
                        foreach (var field in receiveByTagsFields.MetaFields.OrderBy(x => x.Label))
                        {
                            RadComboBoxItem CBitem = new RadComboBoxItem();
                            CBitem.ClientIDMode = ClientIDMode.AutoID;
                            CBitem.Text = field.Label;
                            CBitem.Value = field.InventoryMetaUid.ToString();
                            radCombo.Items.Add(CBitem);
                        }
                    }
 
                    LinkButton link = new LinkButton();
                    link.ClientIDMode = ClientIDMode.AutoID;
                    link.Text = "Edit";
                    LiteralControl br = new LiteralControl("<br />");
                    if (col.ColumnType == "GridBoundColumn" || col.ColumnType == "GridNumericColumn")
                    {
                        item[col.UniqueName].Controls.Add(br);
                        item[col.UniqueName].Controls.Add(radCombo);
                    }
                    radCombo.Items.Add(new RadComboBoxItem("Do not import", "-1"));
                    columnCount++;
 
                }
            }
        }


Konstantin Dikov
Telerik team
 answered on 29 Oct 2013
1 answer
76 views
Hi,
I would a grid with many ImageButtons on the row that call many different function.
In this row I've yet the button of Select and Delete.

How can I do this ?

Thanks
Princy
Top achievements
Rank 2
 answered on 29 Oct 2013
2 answers
86 views
Hello friends,
I am working on a new project which is having about 15 different big modules. we are having requirement like each module should be having its own recognition factor by color. That means Module1 is having Red, Module2 is having Blue, Module3 is having Green and so on. This means when a user get inside the module all look and feel should resemble this color across controls. If user get inside Module1 (which should be using Red color), then all controls (RadGrid, RadCombo or whatever control that is used) should give look and feel of Red. This will give a recognition factor to user.
So, I am trying to figure this out in Telerik Controls. As, we also require to use some advanced functionalities like scheduler, advanced functionality in Grid. My question is; does telerik controls having  any type of mechanism to change the color of the controls based on the theme color of the module? I see that it has only some few set of read available skins. So, any option to above specified requirement?
Thanks for any help
Bozhidar
Telerik team
 answered on 29 Oct 2013
1 answer
106 views
RadFileExplorer:remove the delete and rename option for particular folder

i have one root node name :myfile
    subfolder:PrivateFolder


i want remove the delete and rename option for this private folder only how to achieve this

code :
private void RemoveUploadAndDelete(RadFileExplorer fileExplorer)
    {
        int i;// Global variable for that function


        RadToolBar toolBar = fileExplorer.ToolBar;
        // Remove commands from the ToolBar control;
        i = 0;
        while (i < toolBar.Items.Count)
        {
            if (toolBar.Items[i].Value == "Delete")
            {
                toolBar.Items.RemoveAt(i);
                continue;// Next item
            }

            else if (toolBar.Items[i].Value == "Rename")
            {
                toolBar.Items.RemoveAt(i);
                continue; // Next item
            }

            i++;// Next item
        }

        RadContextMenu treeViewContextMenu = fileExplorer.TreeView.ContextMenus[0];
        // Remove commands from the TreeView's ContextMenus control;

        i = 0;
        while (i < treeViewContextMenu.Items.Count)
        {
            if (treeViewContextMenu.Items[i].Value == "Delete")
            {
                treeViewContextMenu.Items.RemoveAt(i);
                continue;// Next item
            }

            else if (treeViewContextMenu.Items[i].Value == "Rename")
            {
                treeViewContextMenu.Items.RemoveAt(i);
                continue;// Next item
            }

            i++;// Next item
        }


        RadContextMenu gridContextMenu = fileExplorer.GridContextMenu;
        // Remove commands from the GridContextMenu control;

        i = 0;
        while (i < gridContextMenu.Items.Count)
        {
            if (gridContextMenu.Items[i].Value == "Delete")
            {
                gridContextMenu.Items.RemoveAt(i);
                continue;// Next item
            }

            else if (gridContextMenu.Items[i].Value == "Rename")
            {
                gridContextMenu.Items.RemoveAt(i);
                continue;// Next item
            }

            i++;// Next item
        }
    }


But it remove the option all the folder.i want remove the delete and rename option private folder only
 
Vessy
Telerik team
 answered on 29 Oct 2013
3 answers
109 views

this attached example (including radchart, multipage, pageviews) is decent but i found slow loading if the record amount is huge. i d like to modify it like programmatic binding with radGrid fires the DetailTableDataBind event. how can it do? can you show me the example?

Shinu
Top achievements
Rank 2
 answered on 29 Oct 2013
1 answer
752 views
Hi Guys,

I have a radbarcode with output type set to embeddedpng. Can someone help me to access the generated PNG image and save it in a memory stream?

Thanks for all your help,
Dan
Shinu
Top achievements
Rank 2
 answered on 29 Oct 2013
1 answer
86 views
With the following code I have been able to pop-up a Radwindow with the results of my Radgrid populated.  What I would like is for the user to be able to now work with the data within that window.  (Sort, export, filter, etc.)  However whenever I go to do that it closes the window and I have to click the button again to see the filtered results.  Any suggestions on how to get it to stay?

When I have "EnableAJAX" set to false the result RadGrid show properly in the Results Window, however if I set it to "True" then it will not display properly. 

Suggestions on how to get this all to work as I hope it would? 
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server"
    LoadingPanelID="RadAjaxLoadingPanel1" Width="100%" EnableAJAX="True">


<telerik:RadWindowManager ID="RadWindowManager1" runat="server" width="700px" Height="525px" ReloadOnShow="True">
<Windows>
<telerik:RadWindow runat="server" ID="Window"
 
            Behaviors="Move, Resize, Close, Reload"
 
            VisibleStatusbar="false">
 
               <ContentTemplate>
               <telerik:RadGrid ID="_SearchResults" runat="server"
    AllowPaging="True" CellSpacing="0"
    GridLines="None" ShowGroupPanel="True"
    AllowSorting="True" PageSize="25" Width="100%" Height="700px"
    AllowFilteringByColumn="True" OnItemCommand="_SearchResults_ItemCommand">
    <GroupingSettings CaseSensitive="False" />
    <ExportSettings IgnorePaging="True" OpenInNewWindow="True"
        ExportOnlyData="True" FileName="CUCustomSearch">
        <Excel AutoFitImages="True" Format="ExcelML" />
        <Pdf PageHeight="210mm" PageWidth="297mm" DefaultFontFamily="Arial Unicode MS" PageTopMargin="45mm"
            BorderStyle="Medium" BorderColor="#666666">
        </Pdf>
    </ExportSettings>
    <ClientSettings AllowDragToGroup="True" AllowColumnsReorder="True"
        ReorderColumnsOnClient="True">
        <Scrolling AllowScroll="True" UseStaticHeaders="True" />
    </ClientSettings>
    <MasterTableView CommandItemDisplay="Top" InsertItemDisplay="Bottom" TableLayout="Fixed">
    <CommandItemSettings ShowAddNewRecordButton="False"
        ShowExportToCsvButton="False" ShowExportToExcelButton="true" ShowRefreshButton="False" ShowExportToPdfButton="True" />
        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"
            Visible="True">
        </RowIndicatorColumn>
        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"
            Visible="True">
        </ExpandCollapseColumn>
        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
    </FilterMenu>
</telerik:RadGrid>
</ContentTemplate>
</telerik:RadWindow>
</Windows>
 
 
</telerik:RadWindowManager>
Protected Sub _btnUpdateResults_Click(sender As Object, e As System.EventArgs) Handles _btnUpdateResults.Click
    SetCriteria()
    PopulateDateResults()
    Dim script As String = String.Format("function ShowRadWindow() {{ $find(""{0}"").show(); Sys.Application.remove_load(ShowRadWindow); }} Sys.Application.add_load(ShowRadWindow);", Me.Window.ClientID)
 
    RadScriptManager.RegisterStartupScript(Page, Page.[GetType](), "ShowRadWindow", script, True)
End Sub
Marin Bratanov
Telerik team
 answered on 29 Oct 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?