Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
166 views
I have few RadComboBox on asp.net Page, all Dropdown are being expading, except that one which i placed at the bottom of the page. When i place that last Dropdown on upper part of asp page then works fine, but not working at bottom. Please suggest.
Ameer
Top achievements
Rank 1
 asked on 12 Mar 2017
0 answers
77 views
hi when i export a grid with groups to excel footers dont show. Please help me to show footers in excel
maedeh
Top achievements
Rank 1
 asked on 12 Mar 2017
3 answers
769 views
Well I am trying to change the tab heading titles programmatically at runtime...just trying out the trial version...I am new...so please don't mind my ignorance...I tried to search but in vain.Everytime I tried to change the text property of the radtab from code behind...I end up with an object null reference error...lemme tell you what I tried...I need to know as to how do we set the title of a tab at runtime without ending up with an "Object reference not set to an instance of an object." error.


public partial class JobseekerHome : BasePage 
    #region RadStripBar 
    protected override void Page_Load(object sender, System.EventArgs e) 
    { 
        if (!Page.IsPostBack) 
        { 
            AddTab("LanguageUC""Mini profile"); 
            AddPageView(RadTabStrip1.FindTabByText("LanguageUC")); 
            AddTab("OrdersCS""Experience"); 
            AddTab("ProjectUC""Experience"); 
        } 
    } 
 
    private void AddTab(string tabValue, string tabName) 
    { 
        RadTab tab = new RadTab(); 
        tab.Text = tabValue; 
        tab.Value = tabName; 
        RadTabStrip1.Tabs.Add(tab); 
    } 
 
    protected void RadMultiPage1_PageViewCreated(object sender, RadMultiPageEventArgs e) 
    { 
        string userControlName = e.PageView.ID + ".ascx"
 
        Control userControl = Page.LoadControl(userControlName); 
        userControl.ID = e.PageView.ID + "_userControl"
 
        e.PageView.Controls.Add(userControl); 
        e.PageView.FindControl(RadTabStrip1.FindTabByText("LanguageUC").Text="Language"); 
        e.PageView.FindControl(RadTabStrip1.FindTabByText("OrdersCS").Text = "Orders"); 
    } 
 
    private void AddPageView(RadTab tab) 
    { 
        RadPageView pageView = new RadPageView(); 
        pageView.ID = tab.Text; 
        RadMultiPage1.PageViews.Add(pageView); 
        pageView.CssClass = "pageView"
        tab.PageViewID = pageView.ID; 
    } 
 
    protected void RadTabStrip1_TabClick(object sender, RadTabStripEventArgs e) 
    { 
        AddPageView(e.Tab); 
        e.Tab.PageView.Selected = true
    } 
    #endregion 

Alfonso
Top achievements
Rank 1
 answered on 12 Mar 2017
0 answers
205 views

I'm trying to replicate the behaviour in the attached series of jpgs. ( was going to be avideo but can't attach it ). If a user just clicks on a grid row then the row should highlight and an indicator should appear to the left of the grid. If the user actually clicks the check box the row is highlighted, has the indicator and the check box is ticked. There should also be a check box in the grid header to select all rows and show them as ticked or to reset all check boxes back to empty if it is itself ticked. The last clicked row should retain the indicator.

I thought i could use a GridClientSelectColumn to do this but it's behaviour is not quite what I want to replicate.

The application whose functionality i'm trying to replicate uses CSS to overwrite the different check box symbols. It has 4 images, 1 with an empty tick box, 1 with an empty tick box and the indicator, 1 with a ticked box and 1 with ticked box and indicator. I tried to do this by using a GridButtonColumn but that doen't put a button into the header row.

I have a sample app where I'm trying various method but again a can't attach it to the post so here's the code for my grid...

                    <telerik:RadGrid ID="rgProducts" runat="server" Width="100%" AllowMultiRowSelection="true"
                        AllowSorting="true" RenderMode="Lightweight" CssClass="RadGrid_RoundCorners" Skin="Max2017" EnableEmbeddedSkins="false"
                        OnNeedDataSource="rgProducts_NeedDataSource" OnItemCreated="rgProducts_ItemCreated" OnItemDataBound="rgProducts_ItemDataBound"
                        OnUpdateCommand="rgProducts_UpdateCommand" OnInsertCommand="rgProducts_InsertCommand" OnDeleteCommand="rgProducts_DeleteCommand"
                        OnItemCommand="rgProducts_ItemCommand">

                        <MasterTableView DataKeyNames="Product_Id" ClientDataKeyNames="Product_Id" AllowMultiColumnSorting="true" AutoGenerateColumns="false" CommandItemDisplay="Top" >

                            <Columns>
                                <telerik:GridBoundColumn DataField="Product_Id" UniqueName="ProductId" Display="false">
                                </telerik:GridBoundColumn>

                                <telerik:GridClientSelectColumn UniqueName="rgProductSelectCol">
                                    <HeaderStyle Width="30px" />
                                </telerik:GridClientSelectColumn>

                                <telerik:GridImageColumn UniqueName="gic" >
                                    <HeaderStyle CssClass="row_selector" Width="32px" />
                                    <ItemStyle CssClass="row_selector" />
                                </telerik:GridImageColumn>

                                <telerik:GridButtonColumn ButtonType="ImageButton" ButtonCssClass="row_selector" Resizable="false" UniqueName="freddy"
                                    CommandName="gbc" HeaderImageUrl="/images/ico_entry_unchecked.png">
                                    <HeaderStyle Width="32px" />
                                </telerik:GridButtonColumn>

                                <telerik:GridBoundColumn DataField="Product_Code" HeaderText="Product Code" SortExpression="Product_Code"
                                    UniqueName="ProductCode">
                                    <HeaderStyle Width="12%" Font-Bold="true" />
                                </telerik:GridBoundColumn>

                                <telerik:GridBoundColumn DataField="Product_Description" HeaderText="Product Description" SortExpression="Product_Description"
                                    UniqueName="ProductDescription">
                                    <HeaderStyle Width="30%" Font-Bold="true" />
                                </telerik:GridBoundColumn>

                                <telerik:GridNumericColumn DataField="Unit_Sell" HeaderText="Unit Sell" SortExpression="Unit_Sell"
                                    UniqueName="UnitSell" DataType="System.Double" DataFormatString="{0:#,##0.00}">
                                    <HeaderStyle Width="7%" HorizontalAlign="Right" Font-Bold="true" />
                                    <ItemStyle HorizontalAlign="Right" />
                                </telerik:GridNumericColumn>

                                <telerik:GridNumericColumn DataField="Unit_Cost" HeaderText="Unit Cost" SortExpression="Unit_Cost"
                                    UniqueName="UnitCost" DataType="System.Double" DataFormatString="{0:#,##0.00}">
                                    <HeaderStyle Width="7%" HorizontalAlign="Right" Font-Bold="true" />
                                    <ItemStyle HorizontalAlign="Right" />
                                </telerik:GridNumericColumn>

                                <telerik:GridNumericColumn DataField="Renewal_Cost" HeaderText="Renewal Cost" SortExpression="Renewal_Cost"
                                    UniqueName="RenewalCost" DataType="System.Double" DataFormatString="{0:#,##0.00}">
                                    <HeaderStyle Width="9%" HorizontalAlign="Right" Font-Bold="true" />
                                    <ItemStyle HorizontalAlign="Right" />
                                </telerik:GridNumericColumn>

                                <telerik:GridBoundColumn DataField="Comments" HeaderText="Comments" SortExpression="Comments"
                                    UniqueName="Comments">
                                    <HeaderStyle  Font-Bold="true" />
                                </telerik:GridBoundColumn>
                            </Columns>

                        </MasterTableView>

                        <ClientSettings AllowKeyboardNavigation="true" EnablePostBackOnRowClick="true" >
                            <Selecting AllowRowSelect="true" />
                            <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="100%" />
                            <%--<ClientEvents OnRowContextMenu="RowContextMenu" OnGridCreated="GridCreated" OnRowClick="GridRowClicked" />--%>
                            <ClientEvents OnGridCreated="GridCreated" OnRowClick="GridRowClicked" />
                        </ClientSettings>

                    </telerik:RadGrid>

And my CSS for the images ...

            .mainSelector{ cursor:pointer; width : 24px; float: left; clear: left; margin-top:2px; padding:0px; padding-top:2px; padding-bottom:2px; position:absolute; }
            .mainSelectorChecked{ width : 24px; float: left; clear: left; margin-top:2px; padding:0px; padding-top:2px; padding-bottom:2px; background-image:url(../images/ico_entry_checked.png); background-repeat:no-repeat; }
            .mainSelectorUnChecked { width : 24px; float: left; clear: left; margin-top:2px; padding:0px; padding-top:2px; padding-bottom:2px; background-image:url(../images/ico_entry_unchecked.png); background-repeat:no-repeat; }
                      
            .row_selector { background-image: url("../images/ico_entry_unchecked.png"); background-position: center 6px; background-repeat: no-repeat; clear: left; float: left; min-height: 18px; padding-top: 4px; width: 16px; }
            .row_selectorCurrent { }
            .row_selectorCurrentChecked { background-image: url("../images/ico_currrentEntry_checked.png"); }
            .row_selectorCurrentUnChecked { background-image: url("../images/ico_currrentEntry_unchecked.png"); }
            .row_selectorChecked { background-image: url("../images/ico_entry_checked.png"); }
            .row_selectorSelected { }

Has anyone any ideas how i might achieve this ?

CP
Top achievements
Rank 1
Iron
 asked on 10 Mar 2017
0 answers
149 views

I have set Radgrid EnableEmbeddedSkins="False" RenderMode="Lightweight".

When i allow filtering on one of the GridDateTimeColumn, the popup calendar has an invisible background. and doesnt show up properly. Can you please help. 

please see the attached screenshots.

 

   <asp:Panel runat="server" ID="pnlPasActivity">

                <telerik:RadGrid ID="rgPasActivity" runat="server" GridLines="None" AutoGenerateColumns="false"
                    AllowPaging="true" PageSize="20" EnableEmbeddedSkins="False" AllowSorting="false" AllowFilteringByColumn="true"
                    RenderMode="Lightweight" OnNeedDataSource="rgPasActivity_NeedDataSource" OnItemDataBound="rgPasActivity_ItemDataBound" EnableLinqExpressions="false">
                    <GroupingSettings CaseSensitive="false" />
                    <FilterMenu EnableEmbeddedSkins="true" RenderMode="Lightweight" ></FilterMenu>
                    <MasterTableView Name="PasActivity" CommandItemDisplay="None" EditMode="EditForms" AllowFilteringByColumn="true">
                        <PagerStyle Position="Top" />

                        <Columns>

                          
                            <telerik:GridDateTimeColumn DataField="StartDate" HeaderText="Date" SortExpression="Date" UniqueName="Date" Display="true" AllowFiltering="true" 
                                DataFormatString="{0:dd/MM/yyy }"  EnableRangeFiltering="true" MinDate="01/01/2000" >
                                <HeaderStyle Width="15%" />
                            </telerik:GridDateTimeColumn>

                            <telerik:GridBoundColumn DataField="StartDate" HeaderText="Time" SortExpression="Time" UniqueName="Time" Display="true" DataType="System.DateTime" DataFormatString="{0:HH:mm }" AllowFiltering="false">
                                <HeaderStyle Width="10%" />
                            </telerik:GridBoundColumn>

                            <telerik:GridBoundColumn DataField="Clino" HeaderText="Clinic/Ward" SortExpression="Clinic" UniqueName="Clinic" Display="true" AllowFiltering="false">
                                <HeaderStyle Width="10%" />
                            </telerik:GridBoundColumn>

                            <telerik:GridBoundColumn DataField="RecordType" HeaderText="Type" SortExpression="Type" UniqueName="Type" Display="true" AllowFiltering="false">
                                <HeaderStyle Width="10%" />
                            </telerik:GridBoundColumn>

                            <telerik:GridBoundColumn DataField="spellkey" HeaderText="Episode No" SortExpression="Episode" UniqueName="Episode" Display="false" AllowFiltering="false">
                            </telerik:GridBoundColumn>

                            <telerik:GridBoundColumn DataField="surname" HeaderText="Consultant" SortExpression="Consultant" UniqueName="Consultant" Display="true" AllowFiltering="false">
                                <HeaderStyle Width="15%" />
                            </telerik:GridBoundColumn>

                            <telerik:GridBoundColumn DataField="specname" HeaderText="Specialty" SortExpression="Specialty" UniqueName="Specialty" Display="true" AllowFiltering="false">
                                <HeaderStyle Width="5%" />
                            </telerik:GridBoundColumn>

           
                        </Columns>
                    </MasterTableView>

                    <PagerStyle PageSizes="5,10" PagerTextFormat="{4}<strong>{5}</strong> items matching your search criteria"
                        PageSizeLabelText="items per page:" />

                    <ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="true">
                        <Selecting AllowRowSelect="true" EnableDragToSelectRows="false" />
                        <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="" />

                    </ClientSettings>

                </telerik:RadGrid>
            </asp:Panel>

Sara
Top achievements
Rank 1
 asked on 10 Mar 2017
0 answers
77 views
So i have dynamically added a RadDateInput to my application. So by default if a user put in a number between 1-31 the dateinput-textbox reacts so it takes the current month and current year and then the number that the user have put in and then builds a date string automatically. if it is below 1 or over 31 the textbox will not accept. But if it is between 1-31 it will as i said take current month and year and then with the day number the user put in, it will automatically give me a date. For example if i put in 11 in the textbox the textbox will automatically giva me 2017/03/11. The problem is that if i put in for example 11 plus any letters it still gives me a date string with current year and current month(example: 11mfweieof would give me today 2017/03/10). But i want it to work if you put in any letters to the textbox i want the textbox to not accept it. Is this possible?
Robel
Top achievements
Rank 1
 asked on 10 Mar 2017
1 answer
548 views

Hi guys,

Question: Do I have to move my objectdatasource settings for code behind to codebehind in this scenario? If I have to how do I do it?
and in what event? I have been dabbling with this for 2 days now.

I have a Radgrid using the batch editing features of this demo:

http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultcs.aspx

But I have added with some cascading comboboxes to apply some pre-filtering for the entire radgrid. I have an objectdatasource connected to it but since I added the cascading comboboxes to my page. Can I still make the updates defined in my objectdatasource in the ASPX page as I had to move my selectmethods for the grid to codebehind?

On page_load I have the following code 

 if (RadComboBox1.SelectedValue != "" && RadComboBox2.SelectedValue != "" && RadComboBox3.SelectedValue != "")
        {
            Literal1.Text = string.Format(MessageTemplate, RadComboBox3.Text, RadComboBox2.Text, RadComboBox1.Text);
            Lower = RadComboBox2.Text;
            Higher = RadComboBox3.Text;
            GetCompared(Lower, Higher);
        }
        else
        {
            ods1.SelectMethod = "GetSensorBulkData";
        }

if the boxes are all selected I call GetCompared function

 protected void GetCompared(string Lower, string Higher)
    {
        NotifyUser("Är " + Lower + " lägre än " + Higher);
        ods1.TypeName = "DAL";
        ods1.SelectParameters.Clear();
        ods1.SelectParameters.Add("Low", TypeCode.String, Lower);
        ods1.SelectParameters.Add("High", TypeCode.String, Higher);
        ods1.SelectMethod = "GetSensorBulkDataCompared";

    }

I can also call the GetCompared from button click 

protected void Button1_Click(object sender, EventArgs e)
    {
        Literal1.Text = string.Empty;

        if (RadComboBox1.SelectedValue != "" && RadComboBox2.SelectedValue != "" && RadComboBox3.SelectedValue != "")
        {
            Literal1.Text = string.Format(MessageTemplate, RadComboBox3.Text, RadComboBox2.Text, RadComboBox1.Text);

            Lower = RadComboBox2.Text;
            Higher = RadComboBox3.Text;

            GetCompared(Lower, Higher);
        }

This pre filtering I have here is to compare different sites data to see if we have any deviations. and then Adjust settings accordingly if we need to make overrides.

I would prefer if I could tell my objectdatasource to use this update from the ASPX page but for some reasone I get the error 

ObjectDataSource 'ods1' could not find a non-generic method 'UpdateSensorBulkSettings' that has parameters: "all my parameters" + original_ID.

btw I added original_id to the updateparameters and trap it in my dataaccess layer as I didnt think I need it.

<asp:ObjectDataSource ID="ods1" TypeName="DAL" OldValuesParameterFormatString="original_{0}" UpdateMethod="UpdateSensorBulkSettings" runat="server">
        <UpdateParameters>
            <asp:Parameter Name="Id" Type="Int32" />
            <asp:Parameter Name="Site1Main1" Type="Double" />
            <asp:Parameter Name="Site1Main2" Type="Double" />
            <asp:Parameter Name="Site1Main3" Type="Double" />
            <asp:Parameter Name="Enabled" Type="Boolean" />
           <asp:Parameter Name="Site2Main1" Type="Double" />
           <asp:Parameter Name="MatchSite1Main1Settings" Type="Boolean" />
           <asp:Parameter Name="Site2Main2" Type="Double" />
           <asp:Parameter Name="MatchSite1Main2Settings" Type="Boolean" />
           <asp:Parameter Name="Site2Main3" Type="Double" />
           <asp:Parameter Name="MatchSite1Main3Settings" Type="Boolean" />

            <asp:Parameter Name="......other parameters...." Type="Double" />
            <asp:Parameter Name="Username" Type="String" />
            <asp:Parameter Name="original_ID" Type="Int32" />
        </UpdateParameters>
    </asp:ObjectDataSource>

Could anyone please help with this I'm staring myself blind and need some advice here.

I have posted some previous questions relating to this but as I got not answers on the previous post and I managed to fix all but this Issue.

Magnus
Top achievements
Rank 2
 answered on 10 Mar 2017
7 answers
625 views
Hi,

Is there a way to implement Captcha in MVC Framework?

Thanks,
Jessie
Rumen
Telerik team
 answered on 10 Mar 2017
9 answers
2.8K+ views
My RadGrid is allowing paging in design mode and runtime e.g. returns 100 rows displayed in 5 pages with the size of 20.

When I export to Excel for example, it exports only the page which is displayed whereas I'd need to export all the data.

I tried setting the
RadGrid1.ExportSettings.IgnorePaging = true;
and
 
RadGrid1.MasterTableView.AllowPaging = false;

Before running the export function but still behaves the same way.

How could I achieve this?
Dhruval
Top achievements
Rank 1
 answered on 10 Mar 2017
0 answers
114 views

I have the UI for Xamarin R3 2016 and i get not set to instance of object when I have below code in xaml.  This is a bug since it works when I remove this code below.  How can I go about this issue?

 

thanks 

Wil

 

<ContentPage.Resources>
     <ResourceDictionary> 
       <Style TargetType="Button" x:Key="ButtonStyle">
         <Style.Setters>
           <Setter Property="WidthRequest" Value="50"/>
           <Setter Property="BorderRadius" Value="0"/>
           <Setter Property="BackgroundColor" Value="Transparent"/>
           <Setter Property="VerticalOptions" Value="Fill"/>
           <Setter Property="HorizontalOptions" Value="Fill"/>
         </Style.Setters>
       </Style>  
     </ResourceDictionary>
    </ContentPage.Resources>

wil
Top achievements
Rank 1
 asked on 10 Mar 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?