Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
151 views

Hi, we're got a RadGrid on a page with a RadAjaxManager and RadAjaxLoadingPanel. On the first operation, using any of the paging, filtering, sorting etc. the grid doesn't appear to be using ajax on postback. Every other operation after that is fine and works as expected. There are no errors on the client or server side. It's a pretty simple page using version 2018.1.117.40. Thanks!

ASPX

<telerik:RadGrid ID="rgDocuments" runat="server" GridLines="None" Skin="MetroTouch" OnNeedDataSource="rgDocuments_NeedDataSource" AllowPaging="True" PageSize="18" AllowFilteringByColumn="True" AllowSorting="True" GroupingSettings-CaseSensitive="false" EnableLinqExpressions="False" RenderMode="Lightweight">
    <MasterTableView AutoGenerateColumns="False" ClientDataKeyNames="docsref" TableLayout="Fixed">
        <Columns>
            <telerik:GridTemplateColumn DataField="docname" HeaderText="Document" SortExpression="docname" UniqueName="docname" HeaderStyle-Width="31%" ItemStyle-Width="31%" ShowFilterIcon="false" FilterControlWidth="400px" AutoPostBackOnFilter="true">
                <ItemTemplate>
                    <span title='<%# Eval("docname") %>'>
                        <%# Eval("docname") %></span>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn DataField="fcName" HeaderText="Area" SortExpression="fcName" UniqueName="fcName" HeaderStyle-Width="15%" HeaderStyle-Wrap="false" ItemStyle-Width="15%" ItemStyle-Wrap="false" ShowFilterIcon="false" AutoPostBackOnFilter="true">
                <FilterTemplate>
                    <telerik:RadComboBox ID="ddlArea" DataSourceID="sdsArea" DataTextField="fcName" DataValueField="fcName" Width="150px" Height="294px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("fcName").CurrentFilterValue %>' runat="server" OnClientSelectedIndexChanged="ddlAreaClientSelectedIndexChanged" Skin="MetroTouch" RenderMode="Lightweight">
                        <Items>
                            <telerik:RadComboBoxItem Text="All" />
                        </Items>
                    </telerik:RadComboBox>
                    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
                        <script type="text/javascript">
                            function ddlAreaClientSelectedIndexChanged(sender, args) {
                                var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                tableView.filter("fcName", args.get_item().get_value(), "EqualTo");
                        }
                        </script>
                    </telerik:RadScriptBlock>
                </FilterTemplate>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="type" HeaderText="Type" SortExpression="type" UniqueName="type" HeaderStyle-Width="15%" HeaderStyle-Wrap="false" ItemStyle-Width="15%" ItemStyle-Wrap="false" ShowFilterIcon="false" AutoPostBackOnFilter="true">
                <FilterTemplate>
                    <telerik:RadComboBox ID="ddlType" DataSourceID="sdsType" DataTextField="type" DataValueField="type" Width="150px" Height="294px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("type").CurrentFilterValue %>' runat="server" OnClientSelectedIndexChanged="ddlTypeClientSelectedIndexChanged" Skin="MetroTouch" RenderMode="Lightweight">
                        <Items>
                            <telerik:RadComboBoxItem Text="All" />
                        </Items>
                    </telerik:RadComboBox>
                    <telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">
                        <script type="text/javascript">
                            function ddlTypeClientSelectedIndexChanged(sender, args) {
                                var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                tableView.filter("type", args.get_item().get_value(), "EqualTo");
                        }
                        </script>
                    </telerik:RadScriptBlock>
                </FilterTemplate>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="subtype" HeaderText="Subtype (leg docs)" SortExpression="subtype" UniqueName="subtype" HeaderStyle-Width="15%" HeaderStyle-Wrap="false" ItemStyle-Width="15%" ItemStyle-Wrap="false" ShowFilterIcon="false" AutoPostBackOnFilter="true">
                <FilterTemplate>
                    <telerik:RadComboBox ID="ddlSubtype" DataSourceID="sdsSubtype" DataTextField="subtype" DataValueField="subtype" Width="150px" Height="294px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("subtype").CurrentFilterValue %>' runat="server" OnClientSelectedIndexChanged="ddlSubtypeClientSelectedIndexChanged" Skin="MetroTouch" RenderMode="Lightweight">
                        <Items>
                            <telerik:RadComboBoxItem Text="All" />
                        </Items>
                    </telerik:RadComboBox>
                    <telerik:RadScriptBlock ID="RadScriptBlock3" runat="server">
                        <script type="text/javascript">
                            function ddlSubtypeClientSelectedIndexChanged(sender, args) {
                                var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                tableView.filter("subtype", args.get_item().get_value(), "EqualTo");
                        }
                        </script>
                    </telerik:RadScriptBlock>
                </FilterTemplate>
            </telerik:GridBoundColumn>
            <telerik:GridDateTimeColumn DataField="reviewDate" HeaderText="Review Date" SortExpression="reviewDate" UniqueName="reviewDate" PickerType="DatePicker"
                DataFormatString="{0:dd/MM/yyyy}" HeaderStyle-Width="12%" HeaderStyle-Wrap="false" ItemStyle-Width="12%" ItemStyle-Wrap="false" AutoPostBackOnFilter="true" DataType="System.DateTime" ShowFilterIcon="false">
            </telerik:GridDateTimeColumn>
            <telerik:GridBoundColumn DataField="docsref" HeaderText="Doc No." SortExpression="docsref" UniqueName="docsref" HeaderStyle-Width="12%" HeaderStyle-Wrap="false" ItemStyle-Width="12%" ItemStyle-Wrap="false" ShowFilterIcon="false" AutoPostBackOnFilter="true">
            </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
    <ClientSettings EnableRowHoverStyle="true">
        <Resizing AllowColumnResize="true" />
        <ClientEvents OnRowClick="rgDocuments_RowClick" />
    </ClientSettings>
</telerik:RadGrid>
<asp:SqlDataSource ID="sdsArea" runat="server" ConnectionString="<%$ ConnectionStrings:IntranetConnectionString %>" SelectCommand="sp_docportal_ddl_area" SelectCommandType="StoredProcedure" CancelSelectOnNullParameter="false">
</asp:SqlDataSource>
<asp:SqlDataSource ID="sdsType" runat="server" ConnectionString="<%$ ConnectionStrings:IntranetConnectionString %>" SelectCommand="sp_docportal_ddl_type" SelectCommandType="StoredProcedure" CancelSelectOnNullParameter="false">
</asp:SqlDataSource>
<asp:SqlDataSource ID="sdsSubtype" runat="server" ConnectionString="<%$ ConnectionStrings:IntranetConnectionString %>" SelectCommand="sp_docportal_ddl_subtype" SelectCommandType="StoredProcedure" CancelSelectOnNullParameter="false">
</asp:SqlDataSource>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnablePageHeadUpdate="false">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="rgDocuments">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rgDocuments" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

 

CS

protected void rgDocuments_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    try
    {
        using (connection = new SqlConnection(@"Server=HA-SQL08;UID=*****;PWD=*****;database=intranet"))
        {
            dt = new DataTable();
            connection.Open();
            command = new SqlCommand("v3_docportal", connection);
            command.CommandType = CommandType.StoredProcedure;
            adapter = new SqlDataAdapter(command);
            adapter.Fill(dt);
            rgDocuments.DataSource = dt;
        }
    }
    catch (Exception ex)
    {
        throw ex;
    }
}

 

 

 

Eyup
Telerik team
 answered on 27 Feb 2018
3 answers
235 views

Hi,

I want to apply some additional styling on the thumbnails: 1px border and some margin.
Now the thumbnails presentation is starting to act a bit weird, I guess something to do with hover etc.

Do you think a styling like this is possible:

https://www.coolblue.nl/product/783943/samsung-ue43mu6100.html

Marc

Vessy
Telerik team
 answered on 27 Feb 2018
3 answers
497 views
  I want to find 2 radtextbox in clientside that is inside a radgrid ,and radgrid is inside a radlistview.But all examples on internet are for one root radgrid,so I need an example in which I can find the textboxes on clientside and use them for calculations.If the radtextboxes are in root page,i can use this easily,
function OnClientValueChanged(sender, args) {
 
               var tx_adet = $find("<%= RadTextBoxAdet.ClientID %>");
               var tx_birim = $find("<%= RadNumericTextBoxBirimFiyat.ClientID %>");
               var labeltoplam = $find("<%= RadNumericTextBoxToplam.ClientID %>");
               labeltoplam.set_value(tx_adet.get_value() * tx_birim.get_value());
             
           }

But in my scenario,these textboxes are inside 2 data components,root listview and inside listview a radgrid.

<telerik:RadListView ID="RadListView1" runat="server"
                              DataSourceID="SqlDataSourceAlimKalemiKategori0"
                              onitemdatabound="RadListView1_ItemDataBound">
                              <LayoutTemplate>
                                  <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
                              </LayoutTemplate>
                              <ItemTemplate>
                                   <asp:HiddenField ID="HiddenFieldid" runat="server" Value='<%# Eval("id") %>'/>
                  <h2>    <%# Eval("ad") %></h2>
           <telerik:RadGrid ID="RadGrid_alimedetaylar" runat="server"
                                       CellSpacing="0"  ShowFooter="true" AllowAutomaticUpdates="false" AllowAutomaticInserts="false"
                     DataSourceID="SqlDataSourceAlimKalemiGrid" GridLines="None" Culture="tr-TR"
                     OnItemCommand="RadGrid_alimedetaylar_ItemCommand"
                               onitemdatabound="RadGrid_alimedetaylar_ItemDataBound">
                     <MasterTableView DataSourceID="SqlDataSourceAlimKalemiGrid" AutoGenerateColumns="False" DataKeyNames="id" AllowAutomaticUpdates="false" AllowAutomaticInserts="false">
       <EditFormSettings EditFormType="Template">
               <EditColumn FilterControlAltText="Filter EditCommandColumn column" UniqueName="EditCommandColumn1">
               </EditColumn>
               <FormTemplate>
                  <telerik:RadScriptBlock ID="alimekalemirad" runat="server">
    
          <script type="text/javascript">
              function OnClientValueChanged(sender, args) {
                 //in here I want to find RadTextBoxAdet and RadNumericTextBoxBirimFiyat 

              
                  
              }
     </script>
     </telerik:RadScriptBlock>
                         <telerik:RadTextBox ID="RadTextBoxAdet" runat="server" EmptyMessage="Adet"
                                 InputType="Number" LabelCssClass="" LabelWidth="64px" Width="80px">
                                <ClientEvents OnValueChanged="OnClientValueChanged" />
                             </telerik:RadTextBox>
                         </td>
                         <td>
                             <telerik:RadNumericTextBox ID="RadNumericTextBoxBirimFiyat" runat="server"
                                 Culture="tr-TR" LabelCssClass="" LabelWidth="40px"
                                 Type="Currency" Width="100px" EmptyMessage="Birim Fiyat">
                                 <NumberFormat ZeroPattern="n TL" />
                                     <ClientEvents OnValueChanged="OnClientValueChanged" />
                             </telerik:RadNumericTextBox>
                         </td>
                         <td>
                             <telerik:RadNumericTextBox ID="RadNumericTextBoxToplam" runat="server"
                                 Culture="tr-TR" LabelCssClass="" LabelWidth="64px" Type="Currency"
                                 Width="100px" ReadOnly="True" Skin="Windows7">
                                 <NumberFormat ZeroPattern="n TL" />
                             </telerik:RadNumericTextBox>
               </FormTemplate>
           </EditFormSettings>
                        
                       
                         <Columns>
                           
                           
                             <telerik:GridBoundColumn DataField="toplam_fiyat" DataType="System.Decimal"
                                 FilterControlAltText="Filter toplam_fiyat column" HeaderText="Toplam Fiyat" FooterAggregateFormatString="{0:c}" Aggregate="Sum"  FooterText="Total: "
                                 SortExpression="toplam_fiyat" UniqueName="toplam_fiyat">
                             </telerik:GridBoundColumn>
                               
                     <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column"
                               HeaderText="Projelerini Göster" UniqueName="TemplateColumn">
                               <ItemTemplate>
                                   <a class="gridinserthref" href="#" onclick="return showradwindow('alim_kalemi_degistir');"
                           style="color: Red;">Yeni Kayıt Ekle +</a>
                                   </ItemTemplate>
                           </telerik:GridTemplateColumn>
                         </Columns>
                
                             
                     </MasterTableView>
                      
                     <FilterMenu EnableImageSprites="False">
                     </FilterMenu>
                 </telerik:RadGrid>
                      
                              </ItemTemplate>
                          </telerik:RadListView>
Any help is appreciated,thanks.
TUSHAR
Top achievements
Rank 1
 answered on 27 Feb 2018
6 answers
326 views

Is it possible to make progress bar "clickable" and it would re-direct to another web page?

 

Thx.

Rumen
Telerik team
 answered on 27 Feb 2018
2 answers
138 views
I am working on a project where at times I need to set the column width to a fixed value in javascript, and then I need to remove it, so that it expands 100%.  Setting the fixed width is easy using the built in js function...

grid.resizeColumn(cellIndex, width);

After this I also need to be able to remove that width so that the column will expand as needed.  Any suggestions on how to accomplish this?
Andres
Top achievements
Rank 1
Iron
 answered on 27 Feb 2018
3 answers
60 views
can we overlap two or more appointments in RadScheduler for show two or more event are on same time,right now RadScheduler  shows separtely in the same time slot, if i drag and drop apointment in a perticuler time slot, but i want to overlaap these apointments.
please reply if any one knows......


thanks
regarded as :
Muhammad Ali   
Peter Milchev
Telerik team
 answered on 27 Feb 2018
3 answers
101 views

I recently upgraded Ajax UI controls and Reporting to the latest version. Trying to pull up the pages with Telerik controls products an error seemingly unrelated to Telerik - but mismatched versions produced seemingly unrelated errors a few months back on a Telerik upgrade.

I manually went into the web config and changed the version on Reporting - but there is no explicit version for the controls
the only other Telerik dll referenced is the Web ReportViewer - which was not updated, either in development or on the production server
if the problem is a version mismatch how do I find out what it is?

 

 

Rumen
Telerik team
 answered on 27 Feb 2018
0 answers
105 views

Hi,

I have done everything i.e. the client side api in documentation shows, but dropdown list will not show the selected item. The item is selected when drop down list is expanded (i.e. dropped down ). It shows the item as yellow (highlighted). But after list is loaded it does not show the item in text element. This leads to false required field validator alarm in browser. User have to reselect item. I am getting lot of complaints regarding this and I have failed to find a solution. I tried to do force selection by but than required field validator still fails.

Here is the code:

var ddlRef = $find(controlIds.refNumDdlId);
ddlRef.trackChanges();
ddlRef.get_items().clear();
for (var i = 0; i < data.length; i++) {
    var comboItem = new Telerik.Web.UI.DropDownListItem();
    comboItem.set_text(data[i]);
    comboItem.set_value(data[i]);
    if (pceObject.ReferenceNumber && pceObject.ReferenceNumber == data[i]) {
        comboItem.select();
        scopeData.selectedRefNum = data[i];
    }
    ddlRef.get_items().add(comboItem);
}
if (scopeData.selectedRefNum) {
    var el = ddlRef.get_textElement();
    $(el).text(scopeData.selectedRefNum);
}
ddlRef.saveClientState();
ddlRef.commitChanges();

 

amarbir
Top achievements
Rank 1
 asked on 27 Feb 2018
7 answers
222 views
I'm curious if it's possible to display the column selector menu via Javascript? I'd like to add button that a user can click and select the column's he wants to view, without me having to explain that he shoudl right-click on the header, and select the columns menu.

Is this possible?

Thanks
John
Andres
Top achievements
Rank 1
Iron
 answered on 26 Feb 2018
1 answer
205 views
If you go to the demo at https://demos.telerik.com/aspnet-ajax/listview/examples/overview/defaultcs.aspx and increase the page size to 10, you'll see a bigger gap between the fieldsets on the first row as compared to the rest of the rows. I see the same behaviour in my app. Why is this happening?
Vessy
Telerik team
 answered on 26 Feb 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?