Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
101 views
I have an upload section and a grid showing uploaded files.  If you upload a file, then edit something in the grid, when the grid updates, the progress area shows itself while the grid is updating.  How do I make it not do that behaviour? 

All this is inside of an update panel:
<div style="padding: 3px; border: 1px solid #000000; width: 100%; margin-bottom: 20px;">
    <h3>Upload a New Document</h3>
    <table>
        <tr>
            <td align="right" valign="top" class="formlabel">
                Key Words:
            </td>
            <td>
              <asp:TextBox ID="txtKeywords" runat="server" Width="300" TextMode="MultiLine" MaxLength="3000"></asp:TextBox>
           </td>
           <td rowspan="2">
                <asp:Repeater ID="repeaterValidResults" runat="server" Visible="False">
                    <HeaderTemplate>
                        <div  style="color: green">Uploaded valid files:</div>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#DataBinder.Eval(Container.DataItem, "FileName")%>
                        (<%#DataBinder.Eval(Container.DataItem, "ContentLength").ToString() + " bytes"%>)<br /><br />
                    </ItemTemplate>
                </asp:Repeater>
                                     
                <asp:repeater id="repeaterInvalidResults" runat="server" visible="False">
                    <HeaderTemplate>
                        <div style="color: red; padding-top: 40px;">Invalid files:</div>
                    </HeaderTemplate>
                    <itemtemplate>
                        File: <%#DataBinder.Eval(Container.DataItem, "FileName") %>
                        (<%#DataBinder.Eval(Container.DataItem, "ContentLength").ToString() + " bytes"%>)
                        <br />
                        Mime-type: <%#DataBinder.Eval(Container.DataItem, "ContentType").ToString()%>
                    </itemtemplate>
                </asp:repeater>
 
           </td>
        </tr>
        <tr>
            <td align="right" valign="top" class="formlabel"> File:
            </td>
            <td>Allowed File Types: <%=String.Join(",", RadUpload1.AllowedFileExtensions)%><br />
                Max File Size: <%=RadUpload1.MaxFileSize.ToString("N0")%> Bytes
             <telerik:RadUpload ID="RadUpload1" runat="server" maxfilesize="50000000"
                InitialFileInputsCount="1"
                MaxFileInputsCount="1"
                AllowedFileExtensions=".doc,.docx,.pdf,.ppt,.pptx,.xls,.xlsx" ControlObjectsVisibility="None" EnableFileInputSkinning="true" InputSize="90" Width="500px" />
           </td>
        </tr>
    </table>
       <telerik:RadProgressManager id="Radprogressmanager1" runat="server" />
                                 
        <telerik:RadProgressArea id="progressArea1" runat="server"/>
        <asp:Button id="buttonSubmit" runat="server" CssClass="RadUploadSubmit" OnClick="buttonSubmit_Click" Text="Submit" style="MARGIN-TOP: 6px" />
</div>
 
<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" CellSpacing="0" DataSourceID="DocumentsSqlDataSource" GridLines="None" AutoGenerateColumns="False">
<MasterTableView DataKeyNames="DocumentID" DataSourceID="DocumentsSqlDataSource" AllowAutomaticUpdates="True"
                AllowAutomaticInserts="False" AllowAutomaticDeletes="true">
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
<RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
 
<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
 
    <Columns>
        <telerik:GridEditCommandColumn FilterControlAltText="Filter EditCommandColumn column" ItemStyle-Width="50px" HeaderStyle-Width="50px">
<HeaderStyle Width="50px"></HeaderStyle>
 
<ItemStyle Width="50px"></ItemStyle>
        </telerik:GridEditCommandColumn>
        <telerik:GridButtonColumn ConfirmText="Delete this Document? This cannot be undone." ConfirmDialogType="RadWindow"
        ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
        <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" Width="50" />
        </telerik:GridButtonColumn>
        <telerik:GridBoundColumn DataField="DocumentID" DataType="System.Int32" FilterControlAltText="Filter DocumentID column" HeaderText="DocumentID" ReadOnly="True" SortExpression="DocumentID" UniqueName="DocumentID" Visible="false">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="subCasIdx" DataType="System.Int32" FilterControlAltText="Filter subCasIdx column" HeaderText="subCasIdx" SortExpression="subCasIdx" UniqueName="subCasIdx" Visible="false" ReadOnly="true">
        </telerik:GridBoundColumn>
        <telerik:GridHyperLinkColumn DataNavigateUrlFields="FullPath" DataTextField="DocumentFileName" HeaderText="File" FilterControlAltText="Filter FullPathcolumn column" UniqueName="FullPathcolumn" ItemStyle-Wrap="false" Target="_blank">
        </telerik:GridHyperLinkColumn>
        <telerik:GridBoundColumn DataField="DocumentFileName" FilterControlAltText="Filter DocumentFileName column" HeaderText="DocumentFileName" SortExpression="DocumentFileName" UniqueName="DocumentFileName" Visible="false"  ReadOnly="true">
        </telerik:GridBoundColumn>
        <telerik:GridTemplateColumn DataField="Keywords" FilterControlAltText="Filter Keywords column"
            HeaderText="Keywords" SortExpression="Keywords" UniqueName="Keywords" Display="True">
            <EditItemTemplate>
                <asp:TextBox ID="KeywordsTextBox" runat="server" Text='<%# Bind("Keywords") %>' TextMode="MultiLine"
                    Width="300" Height="150"></asp:TextBox>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="KeywordsLabel" runat="server" Text='<%# Eval("Keywords") %>'></asp:Label>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridBoundColumn DataField="DocumentTypeID" DataType="System.Int32" FilterControlAltText="Filter DocumentTypeID column" HeaderText="DocumentTypeID" SortExpression="DocumentTypeID" UniqueName="DocumentTypeID" Visible="false" ReadOnly="true">
        </telerik:GridBoundColumn>
    </Columns>
 
    <EditFormSettings EditFormType="AutoGenerated" CaptionFormatString="Edit Details" >
        <EditColumn FilterControlAltText="Filter EditCommandColumn column"
            ButtonType="PushButton">
        </EditColumn>
        <FormTableButtonRowStyle Font-Bold="true" BackColor="Gainsboro" />
        <FormCaptionStyle Font-Bold="True" HorizontalAlign="Center" BackColor="Gainsboro" Font-Size="12pt" />
        <FormTableStyle BorderStyle="Solid" BorderColor="Black" BorderWidth="1px" Font-Bold="True" />
    </EditFormSettings>
</MasterTableView>
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
</telerik:RadGrid>
Plamen
Telerik team
 answered on 12 Sep 2012
2 answers
125 views
I'm trying to access the controls within a NoRecordsTemplate block in my code behind. Doing a search in these forums shows the following code snippet:

protected void RadGrid1_PreRender(object sender, EventArgs e)
{
    GridNoRecordsItem norecordItem = (GridNoRecordsItem)RadGrid1.MasterTableView.GetItems(GridItemType.NoRecordsItem)[0];
    Label lbl = (Label)norecordItem.FindControl("Label1");
}

However, when I try this, the GetItems method returns no items. My GridView control has definitely got NoRecordsTemplate section.

Any ideas why it can't find this?

Thanks for your help,
Dan
Dan
Top achievements
Rank 1
 answered on 12 Sep 2012
1 answer
104 views
Hi,

like the title says, I am trying to bind a date to a date picker.

Here is my code:

<telerik:RadDatePicker ID="rdpDateDebut" runat="server" SelectionOnFocus="SelectAll"
    Width="100px" DbSelectedDate='<%# Bind("Date") %>'>
</telerik:RadDatePicker>

This is inside a ascx used in an edit form UserControl.

I always got the same error:

Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Impossible de créer un objet de type 'System.Nullable`1[[System.DateTime, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' à partir de sa représentation sous forme de chaîne, '', pour la propriété 'SelectedDate'.  

My code looks very simple and I don't understand this error.

Sorry, the error is in french.

Thanks.
Vasil
Telerik team
 answered on 12 Sep 2012
9 answers
428 views
Dear supporter
is there any program to implement persian calendar in your scheduler controls?

tanx

Plamen
Telerik team
 answered on 12 Sep 2012
1 answer
55 views
radnumericbox inside radgrid return different value from javascript after upgrade the telerik version

Dear Sir:
   I found the radnumericbox inside radgrid return different value from javascript after upgrade the telerik version (from 2010 q3 to 2012 q2)
e.g.   the rntbox_EntitleRate has value 50000

Old version:
masterTable.get_dataItems()[row].findElement(

 

"rntbox_EntitleRate").value 
return 50000

new Version:
 

 

 masterTable.get_dataItems()[row].findElement("rntbox_EntitleRate").value 
return 50,000.00


The new version return the value with currency format. is there other related change from the update version?
Vasil
Telerik team
 answered on 12 Sep 2012
1 answer
109 views
Hi!

I have a grid with drag and drop rows, all is works correclty but i have a bug.

I need show the "spot line" such as captura.

It is special css?? 

this is my code:

<div class="tabContainter">


<telerik:RadCodeBlock ID="codeBlock" runat="server">


  <script type="text/javascript">


   function GridCreated(sender, eventArgs) {sender.add_rowDragging(RowDraggingIcon);}
   function RowDraggingIcon(sender, eventArgs) { rowDraggingIcon(sender, eventArgs); }


</script>
</telerik:RadCodeBlock>
    <div class="exampleView">
        <div class="title">
            <asp:Label ID="lblShowAsTitle" runat="server" />
             
        </div>
        <div class="label">
           <asp:Label ID="lblShowAS" runat="server" />
        </div>
    </div>
   
    <div class="clear">
    </div>
<div class="exampleView">
    <div id="Manage" runat="server" class="exampleView">
        <telerik:RadGrid runat="server" ID="MyGrid" AutoGenerateColumns="false" Skin="Vista" 
            AllowMultiRowSelection="True" PageSize="10" AllowPaging="true" EnableViewState="false">
            <MasterTableView DataKeyNames="StringMaskId,Id" CommandItemDisplay="Top" EditMode="InPlace">
                <Columns>
                
                    <telerik:GridClientSelectColumn CommandName="Select" UniqueName="Select" HeaderStyle-Width="30px"
                        Resizable="false" />
                    <telerik:GridEditCommandColumn HeaderStyle-Width="25px" UniqueName="EditCommandColumn"
                        ButtonType="ImageButton" EditImageUrl="/UI/Images/grid_edit.png" Resizable="false">
                    </telerik:GridEditCommandColumn>
                    <telerik:GridButtonColumn UniqueName="btnDelete" ConfirmDialogType="RadWindow" ButtonType="ImageButton"
                        CommandName="Delete" ConfirmDialogHeight="100px" ConfirmDialogWidth="300px" HeaderStyle-Width="25px"
                        Resizable="false" ImageUrl="/UI/Images/cross.png" />
                    <telerik:GridTemplateColumn DataField="Id" HeaderText="Id" UniqueName="Id" Visible="false"
                        ConvertEmptyStringToNull="true">
                        <InsertItemTemplate>
                            <telerik:RadTextBox ID="lblId" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Id") %> '
                                Width="150px" ReadOnly="true" Enabled="false" CssClass="labelGrid" />
                        </InsertItemTemplate>
                        <EditItemTemplate>
                            <telerik:RadTextBox ID="txtId" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Id") %> '
                                Width="150px" CssClass="labelGrid" ReadOnly="true" />
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn DataField="Position" HeaderText="Position" UniqueName="Position" Visible="false" HeaderStyle-Width="1px" 
                        ConvertEmptyStringToNull="true">
                            <EditItemTemplate>
                            <asp:Label ID="lblPosition" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Position") %> '
                                Width="150px" CssClass="labelGrid" ReadOnly="true" />
                        </EditItemTemplate>
                         <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Position") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="Type" DataField="TypeId">
                        <EditItemTemplate>
                            <telerik:RadComboBox runat="server" ID="cbType" EnableLoadOnDemand="True" DataTextField="CDetailText"
                                DataValueField="CDetailId" HighlightTemplatedItems="true" Width="90%" CausesValidation="false" AutoPostBack="true"  OnSelectedIndexChanged="cbType_SelectedIndexChanged"/>
                            <br />
                            <asp:RequiredFieldValidator ID="frSecurity" runat="server" ErrorMessage="*" CssClass="validator"
                                Display="Dynamic" ControlToValidate="cbType"></asp:RequiredFieldValidator>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lblDatatype" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Type") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="Char" DataField="Char" HeaderStyle-Width="80px"  FilterControlWidth="40px" >
                        <EditItemTemplate>
                            <telerik:RadTextBox ID="txtChar" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Char") %> '
                                Width="50px" CssClass="labelGrid" MaxLength="1" />
                           <br />
                           <asp:CustomValidator ID="cvChar" runat="server" ErrorMessage="*" CssClass="validator"
                                Display="Dynamic" ControlToValidate="txtChar"  OnServerValidate="cvChar_ServerValidate"></asp:CustomValidator>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lblChar" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Char") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="Match" DataField="MatchId">
                        <EditItemTemplate>
                            <telerik:RadComboBox runat="server" ID="cbMatch" EnableLoadOnDemand="True" DataTextField="CDetailText"
                                DataValueField="CDetailId" HighlightTemplatedItems="true" Width="90%" CausesValidation="false" AutoPostBack="true" OnSelectedIndexChanged="cbMatch_SelectedIndexChanged"/>
                            <br />
                          <asp:RequiredFieldValidator ID="frMatch" runat="server" ErrorMessage="*" CssClass="validator"
                                Display="Dynamic" ControlToValidate="cbMatch"></asp:RequiredFieldValidator>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lblMatch" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Match") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="Amount" DataField="Amount" HeaderStyle-Width="110px" FilterControlWidth="40px">
                        <EditItemTemplate>
                            <telerik:RadNumericTextBox ID="txtAmount" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Amount") %> '
                                CssClass="labelGrid" ShowSpinButtons="true" Width="50px" Type="Number" MinValue="0"
                                MaxValue="99">
                                <NumberFormat GroupSeparator="" DecimalDigits="0" />
                            </telerik:RadNumericTextBox> 
                            <br />
                          
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lblAmount" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Amount") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                     
                </Columns>
                <CommandItemTemplate>
                    <div class="quickAdd">
                        <asp:LinkButton ID="lnkqQuitInsert" runat="server" CommandName="InitInsert">
                            <asp:ImageButton ID="imgQuickAdd" runat="server" ImageUrl="/UI/Images/add.png" />
                            <asp:Label ID="lblQuickAdd" runat="server" /></asp:LinkButton>&nbsp;&nbsp;
                        <asp:LinkButton ID="lnkDeleteSelected" CommandName="SelectRow" runat="server" OnClick="DeleteSelectedItems">
                            <asp:ImageButton ID="imgDeleteSelected" runat="server" ImageUrl="/UI/Images/cross.png" />
                            <asp:Label ID="lblDeleteSelected" runat="server" /></asp:LinkButton>&nbsp;&nbsp;
                        <asp:LinkButton ID="lnkDeleteAllValues" runat="server" OnClick="DeleteValues">
                            <asp:ImageButton ID="imgDeleteAllValues" runat="server" ImageUrl="/UI/Images/delete_all.png" />
                            <asp:Label ID="lblDeleteAllValues" runat="server" /></asp:LinkButton>&nbsp;&nbsp;
                    </div>
                </CommandItemTemplate>
            </MasterTableView>
             <ClientSettings AllowRowsDragDrop="True">
                    <Selecting AllowRowSelect="True" EnableDragToSelectRows="false" />
                    <ClientEvents   OnGridCreated="GridCreated" />  


                </ClientSettings>   
            <PagerStyle Mode="NumericPages" />
        </telerik:RadGrid>
    </div>
</div>
</div>



the js file:
function rowDraggingIcon(sender, eventArgs) {
    var row = sender._draggedRow;
    row.innerHTML = "<img  src='/UI/Images/fields.png' />";
    row.style.width = 0 + "px";
    row.style.height = 0 + "px";
}



thanks

Antonio Stoilkov
Telerik team
 answered on 12 Sep 2012
1 answer
108 views

hi

div.RadUpload .ruButtonHover Does not work in chrome!

please fix this.

Kate
Telerik team
 answered on 12 Sep 2012
1 answer
115 views

Hello Telerik Team,

I have used RadCombox in my site extensively, and also I have used the “EmptyMessage” property. Recently I have updated the Telerik version to “2012.2.724.35” and after that i am facing too many issues related to RadCombox.

Older Version we were using: 2011.1.519.35
New Version currently we are using: 2012.2.724.35

In Telerik “2012.2.724.35” version, i have used the following RadComboBox In my web page. Now the issue is, if I do not change the default selection of following ddlStatus i.e. the ddlStatus is set to “-Select One-” and when I trying to access the “SelectedItem” property of ddlStatus from code behind, then it gives a null value whereas with the previous telerik version (2011.1.519.35), if the ddlStatus is set to default selection i.e. “-Select One-” and if I trying to access the “SelectedItem” property of ddlStatus then it gives the object of 0th position item i.e. <telerik:RadComboBoxItem Text="" Value="0" />. Besides that, in “2012.2.724.35” version, for the default selection of ddlStatus, the ddlStatus.SelectedValue property gives the Empty string where as in older version(2011.1.519.35) it gives the value of 0th element i.e. "0".   

<telerik:RadComboBox ID="ddlStatus" runat="server" Width="60px" EmptyMessage="-Select one-">

       <Items>

              <telerik:RadComboBoxItem Text="" Value="0" />

              <telerik:RadComboBoxItem Text="No" Value="1" />

              <telerik:RadComboBoxItem Text="Yes" Value="2" />

       </Items>

</telerik:RadComboBox>

 

This changed behavior of RadComboBox encounters so many issues in my website. Is there any generic way to resolve this issue?

Please suggest the workaround to resolve this issue.

Thanks,
Ashish

 

Cat Cheshire
Top achievements
Rank 1
 answered on 12 Sep 2012
1 answer
138 views

how to get gridview column header name event on button click?



Thanks
Priya
Shinu
Top achievements
Rank 2
 answered on 12 Sep 2012
2 answers
102 views
Hello,

I'm encountering a smaal issue: (in fireFox, but I think Chrome too)

In the page_Load I do this:

RadNotification1.ShowInterval = 12000 ' 2 minutes
RadNotification1.AutoCloseDelay = 10000 ' 10 sec
lbl_NotifyText.Text = Format(Now, "HH:mm"' a label within the RadNotification1

So, say I start the page at 11:00, I want to see the notification at 11:02
But during this time I do some PostBacks, until 11:01, what should reset the RadNotification1 to 11:03 and the text in the label to "11:03". Well.. It doesn't...

Although the code is executed (breakpoint) and the new timer values are added and the text was changed, I still get a message at 11:02 with the label text "11:02".

How can I change this behaviour?


Kind regards and thanks in advance,

Erik
   
Erik
Top achievements
Rank 2
 answered on 12 Sep 2012
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?