Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
100 views
Hi folks,

I've got a RadGrid with a GridDateTimeColumn. In edit mode the textbox is only 4px wide. This is only happens for the first time I edit a row after the page is loaded! When I click Cancel to exit edit mode and then edit again, the width is 120px. I've got this issue in IE8. Works fine in Firefox. Have tested with different skins, all give the same result. Also see attached screenshot.

Below is the .aspx code. The column that shows the issue is "betaaldatum". Als interesting is that the ItemStyle width of 60px is completely ignored.

 

<telerik:RadGrid ID="gridTermijnen" runat="server" Width="610px" OnItemDataBound="gridTermijnen_ItemDataBound" 
                                    AllowSorting="True" CellSpacing="0" GridLines="None" OnNeedDataSource="gridTermijnen_NeedDataSource" OnInsertCommand="gridTermijnen_InsertCommand"  
                                    OnDeleteCommand="gridTermijnen_DeleteCommand" OnUpdateCommand="gridTermijnen_UpdateCommand" OnItemCommand="gridTermijnen_ItemCommand" OnDataBound="gridTermijnen_DataBound" LocalizationPath="~/creditmanagement/Telerik_localization">
                                <ClientSettings EnableRowHoverStyle="true" >
                                    <Selecting AllowRowSelect="true" />
                                    <ClientEvents OnRowDblClick="RowDblClick" />
                                    <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" ScrollHeight="120" />
                                </ClientSettings>
                                <MasterTableView DataKeyNames="nr" AllowSorting="true" ShowFooter="true" NoMasterRecordsText=" Geen termijnen gevonden" AutoGenerateColumns="false" 
                                    CommandItemDisplay="Top" EditMode="InPlace">
                                    <Columns>
                                        <telerik:GridTemplateColumn UniqueName="RowNumber" HeaderText="Nr.">
                                            <ItemTemplate>
                                                <asp:Label ID="numberLabel" runat="server" Width="30px" />
                                            </ItemTemplate>
                                            <HeaderStyle Width="30px" />
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridDateTimeColumn DataField="betaaldatum" SortExpression="Betaaldatum" UniqueName="Betaaldatum" HeaderText="Betaaldatum" DataFormatString="{0:d/M/yyyy}" FilterControlWidth="100px" HeaderStyle-Width="140px" AllowFiltering="true">
                                            <ItemStyle Width="60px" />
                                        </telerik:GridDateTimeColumn
                                        <telerik:GridNumericColumn DataField="termijnbedrag" UniqueName="Termijnbedrag" HeaderText="Termijnbedrag" NumericType="Currency" Aggregate="Sum" FooterAggregateFormatString="Totaal: {0:C}" />
                                        <telerik:GridTemplateColumn DataField="nagekomendatum" UniqueName="Nagekomendatum" HeaderText="Datum nagekomen">
                                            <ItemTemplate>
                                                <asp:Label ID="nagekomendatumLabel" runat="server" Text='<%# Eval("nagekomendatum", "{0:d/M/yyyy}") %>' Width="100%" />
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridEditCommandColumn UniqueName="EditColumn" CancelText="Annuleren" UpdateText="Wijzigen" InsertText="Toevoegen" EditText="Bewerken"><HeaderStyle Width="120px" /></telerik:GridEditCommandColumn>
                                        <telerik:GridButtonColumn UniqueName="DeleteColumn" CommandName="Delete" ButtonType="LinkButton" Text="Verwijderen" ConfirmText="Weet u zeker dat u de geselecteerde termijn wilt verwijderen?" />
                                    </Columns>
                                    <CommandItemSettings AddNewRecordText="Toevoegen nieuwe termijn" ShowRefreshButton="false" />
                                    <SortExpressions>
                                        <telerik:GridSortExpression FieldName="betaaldatum" SortOrder="Ascending" />
                                    </SortExpressions>
                                </MasterTableView>
                            </telerik:RadGrid>

The html source code that is generated for IE first edit, IE second edit and Firefox edits:
IE, 1st edit - 4px column!
<input name="gridTermijnen_ctl00_ctl05_RDIPBetaaldatum_dateInput_text" class="riTextBox riEnabled" id="gridTermijnen_ctl00_ctl05_RDIPBetaaldatum_dateInput_text" style="width: 4px;" type="text" _events="[object Object]" value="25-10-2012"/>
  
IE, 2nd edit - fine, though it seems hardcoded to 120px which is not a setting I applied anywhere:
<input name="gridTermijnen_ctl00_ctl05_RDIPBetaaldatum_dateInput_text" class="riTextBox riEnabled" id="gridTermijnen_ctl00_ctl05_RDIPBetaaldatum_dateInput_text" style="width: 120px;" type="text" _events="[object Object]" value="25-10-2012"/>
  
Firefox - always fine.
<input maxlength="2147483647" value="25-10-2012" id="gridTermijnen_ctl00_ctl05_RDIPBetaaldatum_dateInput_text" name="gridTermijnen_ctl00_ctl05_RDIPBetaaldatum_dateInput_text" class="riTextBox riEnabled" style="width:100%;" type="text">

I've no idea where this 4px comes from. Also because it's hardcoded in the html I can't use CSS to override it.

Any suggestions are much appreciated!

Rick
Rick
Top achievements
Rank 1
 asked on 06 Aug 2012
1 answer
181 views
Hi All,

I have a RadGrid control and can access the controls inside it (server-side or client-side).

Now, I have a RadGrid inside that RadGrid and I want to access the controls inside that inner grid, but cannot access the controls either server-side or client-side. Especially, I want to access table or div inside the inner grid.

Please help me in this regards...Thanks in advance.

Dhaval
Shinu
Top achievements
Rank 2
 answered on 06 Aug 2012
2 answers
101 views
Is it possible to export to excel from two or more radgrids in to the same excelsheet at once?

If so, how to do?
Alexander
Top achievements
Rank 1
 answered on 06 Aug 2012
1 answer
80 views
I'm getting Invalid JSON primitive: .  when I try to export to Excel or CSV.  The column names contain various symbols, so I think that might be the cause, but I don't know how to fix it because the column names cannot be changed.  Is there any way around this?
Daniel
Telerik team
 answered on 06 Aug 2012
5 answers
356 views
Hi,

I want the (default value on load in)rendering in datepicker to be __/__/__ on load, and user should be able to insert dates, without having to enter the '/'. I am using Telerik Q1 2009.

I learn from the forum that raddatepicker's dateinput had this property which was removed in the later version to apply free form logic.

In one of the threads, you have explained how to achieve this on blur.

I would like to do this on load (and not on blur). Is there way to do this, without writing the masking logic in javascript ?

Thanks & Regards,
Sachin

Vasil
Telerik team
 answered on 06 Aug 2012
3 answers
75 views
Hi, 

I have a dynamically created datagrid and two dynamically created button columns in that data grid as well. Whenever I press any of the custom button to perform an event the other columns get disappeared. I couldn't find any suitable solution. If anybody faced such type of problem and solved it could you please share it with me.


Looking forward for feedback.

Thanks
Pavlina
Telerik team
 answered on 06 Aug 2012
1 answer
47 views
are there any project that contains advanced form and service?
thanks
Plamen
Telerik team
 answered on 06 Aug 2012
2 answers
80 views
Hi

I am using RadGrid with client side binding.  I have 2 issue acording to default sortexpressions.

1. I have defined the sortexpressions to sort default by Date. When user clicks other column it is sort by the new column but the arrow near Date column is not hidding. I need to click several times to the Date column to hide the arrow, then everything works great.

2. The sortexpression gives the column the rgSort class and it changes the color of the column, but when I click to another column the color is not changing to new column. If I dont have defined sortexpressions the color change wont appear at all.

Thanks

Vitalij
Vitalij
Top achievements
Rank 1
 answered on 06 Aug 2012
1 answer
66 views
Hello,
I have some custom commands that are working fine, and I am able to pass client data to the code-behind using the commandArgument. However, if I try to do the same thing for the built in AddText functionality, the popup dialog never displays.

//Javascript
//If this is done, the text editor dialog won't show. Not sure why.
Telerik.Web.UI.ImageEditor.CommandList.AddText = function (imageEditor, commandName, args) {
    var commandText = "AddText";
    var commandArgument = customClientSideDataHere;
    imageEditor.editImageOnServer(commandName, commandText, commandArgument, callbackFunction);
};

I am currently reading the custom data here:
protected void RadImageEditor1_ImageEditing(object sender, ImageEditorEditingEventArgs args)
{
 string text = args.Argument;
}

If I comment out the client-side code above, the Add Text popup works as expected. Is there something I am doing wrong, or is there another way to pass client side data to the code-behind?
Thanks,
Adrian
Vessy
Telerik team
 answered on 06 Aug 2012
2 answers
112 views
How do I get RadFilter to work with RadTreeList and an OpenAccess DataSource?

...this seems to do nothing

<telerik:RadFilter runat="server" FilterContainerID="locationTreeList"
    ID="ctl00" CssClass="RadFilter RadFilter_Default " Skin="Transparent">
    <FieldEditors>
        <telerik:RadFilterTextFieldEditor TextBoxWidth="120" FieldName="LocationName" />
    </FieldEditors>
</telerik:RadFilter>
<telerik:RadTreeList ID="locationTreeList" runat="server" AllowPaging="false" AutoGenerateColumns="false"
    DataSourceID="locationDS" AllowSorting="True" DataKeyNames="LocationID"
    ParentDataKeyNames="ParentID">
    <Columns>
        <telerik:TreeListBoundColumn DataField="LocationID" HeaderText="Location ID" />
        <telerik:TreeListBoundColumn DataField="LocationName" HeaderText="Name" />
        <telerik:TreeListBoundColumn DataField="ShortCode" HeaderText="Short Code" />
        <telerik:TreeListCheckBoxColumn DataField="IsTest" HeaderText="Test Location" />
        <telerik:TreeListBoundColumn DataField="AddressID" HeaderText="Address ID" />
    </Columns>
</telerik:RadTreeList>
<telerik:OpenAccessDataSource ID="locationDS" runat="server"
    EnableDelete="False" ObjectContextProvider="AuthDB.Model.Context, AuthDB"
    OrderBy="LocationName, ParentLocation.LocationName"
    TypeName="AuthDB.Model.CommonLocation" />
Priyanka
Top achievements
Rank 1
 answered on 06 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?