Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
141 views

This is odd, I am using the latest SP1 libraries and have followed all the steps and only see this in the WPF application. The Activities column should look like a drop-down combo box when the green checkbox is showing. Obviously, I am missing something, but not sure what it is. I hope I can look at it fresh in the morning and figure it out, but if there are tips, please let me know.

My XAML has this definition for the column:

<telerik:GridViewComboBoxColumn Header="Activities" Width = "271" DataMemberBinding = "{Binding Description}" SelectedValueMemberPath = "SicCodeValue" DisplayMemberPath = "SicCodeDescription" IsLightweightModeEnabled="true" IsComboBoxEditable="True">
</telerik:GridViewComboBoxColumn>


and I set up my itemssource via code using the following line on data load:

(this.myList.Columns[2] as GridViewComboBoxColumn).ItemsSource = (ViewModel as MyViewModel).SicCodes;

Pavel
Top achievements
Rank 1
Iron
Iron
 asked on 08 Jul 2021
37 answers
1.8K+ views
Hi,

I am using a RadGrid (Q1 2009) to edit a column of "percentages" and I am not getting the behaviour I would expect - though my expectation may be wrong.

The values stored in the database are "factors" i.e. 0.015 (for a number which the user should "see" as 1.5%), and, if I set the DataFormatString to be {0:p4} my values are displayed as expected (they are multiplied by 100 and displayed to 4 decimal places).

I would like the user to edit the values in the same way i.e. they edit/enter 12.5600% and what gets written to the database is 0.125600 and what is then re-displayed is 12.5600 %. But leaving the NumericType as "Number" ignores the DataFormatString (the value is displayed as 0.1256), and setting the NumericType to "percent" just results in a % sign being appended to the unmultiplied number (so they have to edit it as 0.125600%) which is frankly wrong.

It seems a little odd to me - is this intentional (by design), is there anything I can do to easily fix it?
Doncho
Telerik team
 answered on 07 Jul 2021
8 answers
601 views
Hi Telerik team,

In one of my asp page,i'm displaying the radgrid whose datasource is autogenerated columns[autogeneratedcolumns property is set to true for radgrid].Now my new requirement is ,i need to add a control [Link button]to the header of the each autogeneratedcolumn.
I have tried with ItemDataBound,ItemCreated,ColumnCreated events.
finding the header item in these events and then adding the control to the cell..
 if (e.Item is GridHeaderItem)
        {
            TableCell cell = new TableCell();
            LinkButton lnk_edit = new LinkButton();
            lnk_edit.ID = "lnk_" + e.Column.OrderIndex;
            lnk_edit.Text = "Edit";
            lnk_edit.Width = Unit.Pixel(50);
  cell.Controls.Add(lnk_edit);
}

But unable to add the LinkButton control to the header cell of each column.

Please reply ASAP.

Thankyou,
Pradeep
Edwin
Top achievements
Rank 1
Iron
 answered on 06 Jul 2021
1 answer
241 views

Hello!

Do you guys have any tips on how to design buttons so that they would look good after translation into foreign languages, like German or Korean? After translation text can be too long

Rumen
Telerik team
 answered on 06 Jul 2021
0 answers
108 views

Is there a way to properly set the localization culture for the month and year with month header when it is showing the month and date?

I have set the culture property and the days of the week are showing the correct localization based on the culture settings however the header is not

Attached is a screw grab showing the issue. The month and year should actually be Ago 2021 (localization is for it-IT)

Matt Smith
Top achievements
Rank 1
Iron
 asked on 02 Jul 2021
23 answers
1.7K+ views
Hello,

I've encountered a puzzling issue with the RadGrid when using static headers and scrolling. Initially, when there is no scrolling necessary, the grid renders as expected (see image 1).

However, once I add a new record that causes scrolling to occur, the grid expands horizontally, causing a horizontal scrollbar in the window, and the grid rows are no longer aligned with their headers (see image 2).

Oddly enough, the grid realigns itself when I move the cursor over one of the drop-down template items (see image 3).

Here is my grid definition:
<telerik:RadGrid ID="dtgUses" runat="server" AllowSorting="true" AllowMultiRowEdit="true"
                        AllowFilteringByColumn="true" PageSize="5" AutoGenerateColumns="false" ShowFooter="true"
                        EnableHeaderContextMenu="true" Width="96%" EnableHeaderContextFilterMenu="true"
                        OnPreRender="dtgUses_PreRender" OnNeedDataSource="dtgUses_NeedDataSource" OnItemDataBound="dtgUses_ItemDataBound"
                        OnItemCommand="dtgUses_ItemCommand" AllowCustomPaging="true">
                        <ClientSettings AllowGroupExpandCollapse="true">
                            <Scrolling AllowScroll="true" ScrollHeight="125px" UseStaticHeaders="true" />
                        </ClientSettings>
                        <PagerStyle Mode="NextPrevAndNumeric" />
                        <MasterTableView DataKeyNames="Id" GroupLoadMode="Server" AllowNaturalSort="true"
                            ShowGroupFooter="true" ItemStyle-Wrap="false" CommandItemDisplay="Top" CommandItemSettings-ShowRefreshButton="False"
                            EditMode="InPlace" IsFilterItemExpanded="false" FooterStyle-Wrap="false" TableLayout="Fixed">
                            <Columns>
                                <telerik:GridTemplateColumn UniqueName="Use" HeaderText="Occupancy" HeaderButtonType="TextButton"
                                    HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="125px" SortExpression="UseCodeDescr">
                                    <ItemTemplate>
                                        <%# Eval("UseCodeDescr")%>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <telerik:RadComboBox runat="server" ID="cbUseCode" DataTextField="Descr" DataValueField="Id"
                                            Width="100%" />
                                    </EditItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="Quality" HeaderText="Grade" HeaderButtonType="TextButton"
                                    HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="70px" SortExpression="QualityShortDescr">
                                    <ItemTemplate>
                                        <%# Eval("QualityShortDescr")%>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <telerik:RadComboBox runat="server" ID="cbQuality" DataTextField="Descr" DataValueField="Id"
                                            Width="100%" />
                                    </EditItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="Condition" HeaderText="Cond" HeaderButtonType="TextButton"
                                    HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="70px" SortExpression="ConditionShortDescr">
                                    <ItemTemplate>
                                        <%# Eval("ConditionShortDescr")%>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <telerik:RadComboBox runat="server" ID="cbCondition" DataTextField="Descr" DataValueField="Id"
                                            Width="100%" />
                                    </EditItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn DataField="EffectiveYearBuilt" HeaderButtonType="TextButton"
                                    HeaderStyle-HorizontalAlign="Right" HeaderText="Eff. Year" HeaderStyle-Width="50px"
                                    SortExpression="EffectiveYearBuilt" UniqueName="EffectiveYearBuilt" DataType="System.Int16">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="YearRemodeled" HeaderButtonType="TextButton"
                                    HeaderStyle-HorizontalAlign="Right" HeaderText="Remodel Year" HeaderStyle-Width="75px"
                                    SortExpression="YearRemodeled" UniqueName="YearRemodeled" DataType="System.Int16"
                                    FooterText="Total Area:" FooterStyle-HorizontalAlign="Right">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="ActualArea" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Right"
                                    HeaderStyle-HorizontalAlign="Right" HeaderText="Actual Area" HeaderStyle-Width="50px"
                                    ReadOnly="true" SortExpression="ActualArea" UniqueName="ActualArea" Aggregate="Sum"
                                    FooterAggregateFormatString="{0:G}" DataType="System.Decimal" FooterStyle-HorizontalAlign="Right">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Percent" HeaderButtonType="TextButton" DataType="System.Decimal"
                                    HeaderStyle-HorizontalAlign="Right" HeaderStyle-Width="50px" ItemStyle-HorizontalAlign="Right"
                                    HeaderText="% of Section" SortExpression="Percent" UniqueName="PercentOfSection"
                                    DataFormatString="{0:P}" ReadOnly="true">
                                </telerik:GridBoundColumn>
                                <telerik:GridButtonColumn UniqueName="Delete" CommandName="Delete" ButtonType="ImageButton"
                                    HeaderStyle-Width="20px" ImageUrl="~/skins/GovernBlue/Telerik/Grid/Delete.gif"
                                    ConfirmText="Are you sure you want to delete this use?" ItemStyle-HorizontalAlign="Center"
                                    ShowInEditForm="true" />
                            </Columns>
                        </MasterTableView>
                    </telerik:RadGrid>


What I'd really like is for the grid to maintain its alignment at all times (see image 4). The grid works just fine without static headers, but I need to keep the static headers because that is part of the requirement. I've spent hours researching these forums and tried countless solutions that have been suggested in other threads to no avail. Is there something I'm missing here? Thanks!
SMc
Top achievements
Rank 2
Iron
Veteran
Iron
 updated answer on 02 Jul 2021
1 answer
138 views

Hello,

In the day view, I want to show in the same day (column) an appointment that overlaps 2 days.

Example:  The first shift start "day 1" at 20:00 and stop "day 2" at 04:00. but I want to show it in a single day (column)

I did try to put those values: DayStartTime at 20:00 and DayEndTime at 04:00, but it does not work.

Is there any solution possible to achieve that?

Regards,

Maxime

Peter Milchev
Telerik team
 answered on 02 Jul 2021
1 answer
472 views

Hi.

We are changing the computer where we develop and we want to transfer our DevCraft License from the old computer to the new one. Can you help us with this?

Also we need the link to download the correct versions of telerik components

Telerik.reporting: 12.0.18.416

Telerik.reportviewer: 12.0.18.416

Telerik.web.ui: 2015.2.826.40

Telerik.web.ui.skins: 2015.2.826.40

Telerik.web.device.detector: 2015.2.826.40

Thanks!!!

Karina
Telerik team
 answered on 01 Jul 2021
1 answer
217 views

I have a radgrid with a Master and one Details table.  When scrolling, only the Master data scrolls.  How can I have both scroll at same time from the single horizontal scroll bar?  Not sure if it makes a difference but I am expanding and collapsing the details data client-side with the OnRowClick event and I am using frozen columns.

Thanks!

Attila Antal
Telerik team
 answered on 01 Jul 2021
0 answers
158 views
After the BatchEditCommand is ran for the update command the grid rebinds as it should but all the fields that were edited are still marked as edited.  Any ideas as to why?  I do edit several cells client-side (gridBatchEditManager.changeCellValue(cell, value)) and then using the built in save button of the grid to call BatchEditCommand.  Everything is updated properly in my sql database but the grid itself does not refresh as I would expect.  If I click the grids "Refresh" button it comes back properly.
Jerry
Top achievements
Rank 2
Iron
Iron
 asked on 30 Jun 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?