Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
84 views
I'm trying to store the pivotgrid state in a database but I don't know the  layout of the table.

I'm assuming it's a simple table with a string key and a string data field. Is this correct?
Laurens
Top achievements
Rank 1
 answered on 30 Dec 2014
3 answers
50 views
I have radGrid with datetime field which I filter by default range filters. here is my markup for this field

<telerik:GridDateTimeColumn DataField="REGISTRATION_DATE" EnableRangeFiltering="true" EnableTimeIndependentFiltering="true" FilterControlWidth="90px" FilterControlAltText="Filter VatQty column" HeaderText="თარიღი" SortExpression="REGISTRATION_DATE" UniqueName="REGISTRATION_DATE" DataType="System.DateTime" CurrentFilterFunction="EqualTo" ShowFilterIcon="true" AutoPostBackOnFilter="True">
                </telerik:GridDateTimeColumn>  

When I filter by one day then all the records that have time between 23:59:00 and 23:59:59 in the same day doesn't return by filter. 
Do you know of any workaround or fix for this problem?
Eyup
Telerik team
 answered on 30 Dec 2014
4 answers
345 views
Hi,

I am using the radasyncupload in a RadGrid.The MasterTavleView is set up to EditMode="Batch" and i use a GridtemplateColumn for the radasyncupload :

<telerik:GridTemplateColumn HeaderText="AttachedFile" UniqueName="UploadColumn">
<ItemTemplate>
<telerik:RadListBox runat="server" ID="listBox1">
 <ItemTemplate>
<a href="<%# DataBinder.Eval(Container.DataItem, "Url")%>">Lien <%# DataBinder.Eval(Container.DataItem,"Name")%></a>
 </ItemTemplate>
</telerik:RadListBox>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadAsyncUpload runat="server" D="AsyncUpload1" OnFileUploaded="AsyncUpload1_FileUploaded" AllowedFileExtensions="jpg,jpeg,png,gif,pdf" MaxFileSize="1048576"  MultipleFileSelection="Automatic">
</telerik:RadAsyncUpload>
</EditItemTemplate>
</telerik:GridTemplateColumn>

When the user finish to edit a row i can find the RadAsync control in  BatchEditCommand event :

protected void RadGrid1_BatchEditCommand(object sender, GridBatchEditingEventArgs e)
    {
        foreach (GridBatchEditingCommand command in e.Commands)
        {
            if ((command.Type == GridBatchEditingCommandType.Update))
            {
                Hashtable newValues = command.NewValues;
 
                if (newValues != null)
                {
                    RadAsyncUpload asyncUpload = RadGrid1.FindControl(RadGrid1.MasterTableView.ClientID + "_UploadColumn").FindControl("AsyncUpload1") as RadAsyncUpload;
                    //Here i need to get files by row or DataKeyNames
                    foreach (var item in asyncUpload.UploadedFiles)
                    {
 
                    }
                }
            }
        }
    }


The radAsyncControl show me all the file uploaded so i can't get the file uploaded by row. I need to know files uploaded by row to save them in database.
Is there a way to get file uploaded by row or DataKeyNames with EdimtMode="Batch" ?




Konstantin Dikov
Telerik team
 answered on 30 Dec 2014
3 answers
1.2K+ views
I am using the below code for displaying crew qualification in a radgrid.

<telerik:GridTemplateColumn DataField="CrewQualification"
FilterControlAltText="Filter CrewQualification column" HeaderText="Crew Details"
UniqueName="CrewQualification" FilterControlWidth="40px">
<ItemTemplate>
<asp:HyperLink ID="CrewInfoLink" Font-Underline="true" runat="server" Text="Edit" CssClass="mousechange"></asp:HyperLink>
<asp:Label ID ="CrewLabel" runat="server" Text="Edit" ></asp:Label>
</ItemTemplate>
<HeaderStyle Width="80px" />
</telerik:GridTemplateColumn>

But the filter in that column is not working despite of adding 'AllowFilteringByColumn,AllowFiltering,AutoPostBackOnFilter' and also 'Datatype' properties to this grid template column.Please help me in this
Konstantin Dikov
Telerik team
 answered on 30 Dec 2014
4 answers
136 views
I am using a hierarchical radgrid with scrolling detail tables. The master table itself does not have a horizontal scrollbar, only the the detail tables. After exporting and upon the next postback that refreshes the screen, my radgrid's detail table widths are expanded to their full width so that the scroll bars on the detail table become disabled (because the width of the div is equivalent to the width of the content) and the master table generates a horizontal scroll bar to compensate for the increase in width.

I know that actual export commands are causing the issue, because if I comment them out, the problem ceases to occur. I am not performing any modifications to the radgrid from the auto-fired events once the exportToX command is run. So the source of the issue is definitely in the Telerik exportTo commands.

Now, I figured that I would be able to easily patch over the underlying issue by modifying the css for specific radgrid-created class, such as rgMasterTable. Unfortunately, the screen will not render my now 10em table as 10 ems, but will continue to make it 100% width no matter how many "!importants;" I use. I can use developer tools to see that, indeed, that the source code for the table's in-line CSS is 10em. Unfortunately, it is not rendered as such. I would also be willing to wager that the issue is not in how IE9 interprets HTML and CSS. I am at a loss for what to attempt next though.

So, to recap, scrollable detail tables in an Ajaxified RadGrid ignores CSS on postback after exportToX command.
Zachary
Top achievements
Rank 1
 answered on 29 Dec 2014
2 answers
451 views
Good afternoon,

I have the following which nicely formats the exported column to currency (ex. $12,345.60):
((GridBoundColumn)exportGrid.Columns[13]).DataFormatString = "{0:C2}";

When the Excel export is done (BIFF format), the data comes out as text as "$12,345.60".  It looks pretty, but the user wants to be able to perform calculations.

I have changed the text value in ItemDataBound to be preceded with an equal (=), which makes the exported data calculate right, but now the complaint is that it doesn't look like currency.  It shows 12345.6.

Is there a way to get a BIFF export to look like currency and be treated as a numeric for calculations?

Thanks,
Steve
SickPup404
Top achievements
Rank 1
 answered on 29 Dec 2014
2 answers
194 views
I have this RadDatePicker:

<tr>
 <td class="auto-style1">Birth Date: *</td>
 <td class="auto-style2">
   <
telerik:RadDatePicker ID="RadDatePicker1" runat="server" Culture="it-IT" MaxDate="2015-12-31" MinDate="1920-01-01">
 </telerik:RadDatePicker>
 <asp:RequiredFieldValidator runat="server" ID="datevalidator" ControlToValidate="RadDatePicker1" Display="Dynamic" ForeColor="#FF3300" ErrorMessage="Enter a date!">
</asp:RequiredFieldValidator>
 </td>
</tr>

and I call this JS
<asp:Panel ID="Panel1" runat="server">
 <script type="text/javascript">
 function ageProb() {
 var DatePicker1 = $find("<%= RadDatePicker1.ClientID %>");
 DatePicker1.get_dateInput()._textBoxElement.style.backgroundColor = "yellow";
 DatePicker1.get_dateInput().focus();
 }
 </script>
</asp:Panel>

With this line of code:
ScriptManager.RegisterStartupScript(this, GetType(), "ageProb", "ageProb();", true);

I have two problems with the above:

1)
I had to put the JS in the body section otherwise I get an error saying: "Impossible to modify the Controls collection because the control contains code blocks (like <% ... %>)".

2) The JS script does not have effect on the RadDatePicker, I mean the background color does not change and I do not get the focus either.

How can I change the background color and get the focus on the RadDatePicker?

Thanks for supporting



Felice
Top achievements
Rank 1
 answered on 29 Dec 2014
2 answers
108 views
Hi, I have a grid which is setup as batch edit. One of the columns defined the following way:

 <telerik:GridTemplateColumn HeaderText="% Local" HeaderStyle-Width="50px" SortExpression="LPC" UniqueName="LPC"
                                                DataField="LPC">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="lblLPC" Text='<%# Eval("LPC", "{0:P2}") %>'></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <span>
                                <telerik:RadNumericTextBox ID="tbLPC" Width="50px" runat="server">
                                </telerik:RadNumericTextBox>
                                <span style="color: Red">
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1"
                                        ControlToValidate="tbLPC" ErrorMessage="*" runat="server" Display="Dynamic"
                                        ToolTip="Required"
                                        style="color:Red;font-size:30px; font-weight:bold;">
                                    </asp:RequiredFieldValidator>
                                    <asp:RangeValidator ID="rvtbLPC" runat="server"
                                                ControlToValidate="tbLPC" ToolTip="Must be numeric value between 0 and 1"
                                                ErrorMessage="*" style="color:Red;font-size:30px; font-weight:bold;"
                                                MinimumValue="0" MaximumValue="1" Display="Dynamic">
                                    </asp:RangeValidator>
                                </span>
                            </span>
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>

Validation always think that field is invalid. I even tried to increase MaximumValue to 100.
Please
David
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 29 Dec 2014
1 answer
182 views
This is my button. Adding onclick event disables

1. the mouseover / mouseout css
2. click event on server side
3. client javascript function is not working

<telerik:RadButton ID="btnEdit" runat="server" Icon-PrimaryIconCssClass="rbEdit" Icon-PrimaryIconLeft="4" Icon-PrimaryIconTop="3" Width="20px" ToolTip="Edit" OnClick="btnEdit_Click" OnClientClicked="return checkId();"></telerik:RadButton>

function checkId() {
            if (document.getElementById("<%=hidPointId.ClientID%>").value == '')
            { return false; }
else
{ return true; }
        }
Konstantin Dikov
Telerik team
 answered on 29 Dec 2014
8 answers
684 views
I have designed my radgrid with gridtemplatecolumns as follows .. Sample one

<telerik:GridTemplateColumn DataField="FirstName" AllowFiltering="true" HeaderText="First Name"
                   UniqueName="FirstName">
                   <ItemTemplate>
                       <%# Eval("FirstName")%>
                   </ItemTemplate>
                   <EditItemTemplate>
                       <telerik:RadTextBox ID="rdtxtFrstName" runat="server" Text='<%# Eval("FirstName") %>'
                           Width="150px" />
                   </EditItemTemplate>
               </telerik:GridTemplateColumn>

I would like to find this textbox with out adding the FirstName to Datakey in RadGrid_UpdateCommand can some one help me
Eyup
Telerik team
 answered on 29 Dec 2014
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?