Telerik Forums
UI for ASP.NET AJAX Forum
15 answers
131 views
Hi,
  I have Firewall on my system and when we are trying to deploy the code on our internal deployment server i am getting some Web call Hit issue.
For example  in one of our page we have implemented RadComboBox as the page gets rendered  after deployment it is hitting some internet site may be some web call is hitting.Or may be the control is caliing some web call because of that it is causing hi to other internet site. Can you please suggest how we can disable that web call.


Thanks,
Neha
Mahesh
Top achievements
Rank 1
 answered on 26 Feb 2015
1 answer
147 views
Hi,

I have a requirement where I would like the following.

Hierarchal RadGrid which has a nested view showing an
information card – for example and then beneath this 2 or more repeaters which
are bound to different datasources.

Let’s say the parent datasource is people, you click on a
person which expands to show an information card on this but then there are two
bound repeaters.  One is bound to hobbies
(where there can be many) and the other is bound to favourite foods (again
multiple values). 

I can only seem to get the hierarchy working with a top
level datasource and one other for the detail. 


I have used gridtableview but the issue I have with this is
firstly the styling is not as flexible as a repeater but also when I expand
another person all of the dtail table to reflect that row.  They don’t seem to be bound to the row they
are contained within.

 

Has anybody dealt with anything similar and could point me
in the right direction please?

 

Viktor Tachev
Telerik team
 answered on 26 Feb 2015
6 answers
99 views
Hi,

I have a grid with detail table which has a button that can show/hide filter item. 
I also set ShowHeadersWhenNoRecords="false" declaratively in detail table by default.
However, when a user puts in filter criteria that's not in the detail table, the whole table disappears.
I tried various ways to set ShowHeadersWhenNoRecords="true" in the code-behind but it only works if I don't have validation above that line of code.
Could you tell me how to make the detail table not disappearing when there's no record during filtering?

Thanks,

Helen

Here's my ascx page:

<telerik:RadGrid ID="RadLeadsBySalesGrid" runat="server" AllowPaging="True" OnNeedDataSource="RadLeadsBySalesGrid_NeedDataSource" OnDataBinding="RadLeadsBySalesGrid_DataBinding" OnItemDataBound="RadLeadsBySalesGrid_ItemDataBound"
        OnDetailTableDataBind="RadLeadsBySalesGrid_DetailTableDataBind" AutoGenerateColumns="False" OnItemCommand="RadLeadsBySalesGrid_ItemCommand" ShowFooter="true"
        Width="1900" Height="830" Skin="Telerik" EnableEmbeddedSkins="false" PageSize="100" BorderStyle="None" >
        <GroupingSettings CaseSensitive="false" />
        <ClientSettings EnablePostBackOnRowClick="true" Selecting-AllowRowSelect="true" EnableRowHoverStyle="true" AllowColumnsReorder="true" ReorderColumnsOnClient="true" ColumnsReorderMethod="Reorder" >
            <%--<Scrolling AllowScroll="true" />--%>
            <ClientEvents OnRowClick="closePane" />
            <Resizing ClipCellContentOnResize="true" AllowColumnResize="true" EnableRealTimeResize="true" ResizeGridOnColumnResize="true" />             
        </ClientSettings>
    <MasterTableView DataKeyNames="office_id, sales_id" HierarchyDefaultExpanded="true" Width="99%" TableLayout="Auto"  >
        <DetailTables>            
            <telerik:GridTableView Name="LeadsTableView" runat="server" DataKeyNames="sales_id" AllowSorting="true" ShowFooter="true" Width="100%"
                        AllowFilteringByColumn="true" IsFilterItemExpanded="false" EnableHeaderContextMenu="true" PagerStyle-Mode="NextPrevNumericAndAdvanced" ShowHeadersWhenNoRecords="false"  >
                    <ParentTableRelation>
                        <telerik:GridRelationFields DetailKeyField="sales_id" MasterKeyField="sales_id" />
                    </ParentTableRelation>
                 
                    <Columns>
                        <telerik:GridBoundColumn  DataField="lead_id" ReadOnly="True" Display="false" HeaderText="lead_id" SortExpression="lead_id"  UniqueName="lead_id" DataType="System.Int32" FilterControlAltText="Filter lead_id column"
                            HeaderStyle-Font-Size="Smaller"  />
                        <telerik:GridBoundColumn DataField="sales_id" ReadOnly="True" Display="false" FilterControlAltText="Filter sales_id column" HeaderText="SalesId" SortExpression="sales_id" UniqueName="sales_id"
                            HeaderStyle-Font-Size="12px" HeaderStyle-ForeColor="Black" HeaderStyle-Font-Bold="true" ItemStyle-Font-Size="Smaller" ItemStyle-Font-Bold="true" ItemStyle-Width="20%" />
 
                        <telerik:GridBoundColumn DataField="last_action_dt" FilterControlAltText="Filter last_action_dt column" HeaderText="Last Action Dt" SortExpression="last_action_dt" UniqueName="last_action_dt"
                            HeaderStyle-Font-Size="12px" HeaderStyle-ForeColor="Black" HeaderStyle-Font-Bold="true" ItemStyle-Font-Size="Smaller" ItemStyle-Font-Bold="false"  FilterControlWidth="70%" />
                    </Columns>                     
 
            </telerik:GridTableView>
        </DetailTables>
        <Columns>
                <telerik:GridBoundColumn DataField="office_id" Display="false" ReadOnly="true" Visible="false" HeaderText="Office ID" SortExpression="office_id" UniqueName="office_id" FilterControlAltText="Filter office_id column" />
                <telerik:GridBoundColumn DataField="sales_id" Display="false" ReadOnly="true" Visible="false" HeaderText="Sales ID" SortExpression="sales_id" UniqueName="sales_id" FilterControlAltText="Filter sales_id column" />                   
                <telerik:GridTemplateColumn UniqueName="sales_name" DataField="sales_name"
                    ItemStyle-Font-Bold="true" ItemStyle-Font-Size="Smaller"  SortExpression="sales_name" FilterControlAltText="Filter sales_name column" >
                    <HeaderTemplate>
                        <asp:ImageButton runat="server" ID="ExpandPaneButton" ToolTip="Click to expand/collpase the results window" Width="32px" Height="32px"  CommandName="ExpandResultPane" ImageUrl="~/images/expandHorizontal.png" OnClientClick="expandCollapseResultPane();return false;" />
                        <asp:ImageButton runat="server" ID="RefreshButton" ToolTip="Click to refresh list" Width="32px" Height="32px"  CommandName="Refresh" ImageUrl="~/images/refresh24.jpg" />
 
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="SalesNameLabel" runat="server" ForeColor="Blue" Text='<%# DataBinder.Eval(Container.DataItem, "sales_name") %>' />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
        </Columns>
    </MasterTableView>    
</telerik:RadGrid>

My code-behind:

protected void RadLeadsBySalesGrid_ItemDataBound(object sender, GridItemEventArgs e)
{
 
    if (e.Item is GridFilteringItem && e.Item.OwnerTableView.Name == "LeadsTableView")
    {
        GridFilteringItem item = e.Item as GridFilteringItem;
        if (item.Expanded) // code works when I don't have if statement
        {
            RadLeadsBySalesGrid.MasterTableView.DetailTables[0].ShowHeadersWhenNoRecords = true;
        }
        else
        {
            RadLeadsBySalesGrid.MasterTableView.DetailTables[0].ShowHeadersWhenNoRecords = false;
        }
    }
}
 
protected void RadLeadsBySalesGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    SALTDALTableAdapters.OfficeTableAdapter officeTA = new SALTDALTableAdapters.OfficeTableAdapter();
    SALTDAL.OfficeDataTable officeDT = new SALTDAL.OfficeDataTable();
    if (SalesJobCode == "DSM")
        officeDT = saltBLL.GetDataByOfficeAndSalesId(OfficeId, SalesIdSelected.Replace('|',','));
    else
        officeDT = officeTA.GetDataBySalesId(SalesId);
 
    int count = officeDT.Count;
 
    RadLeadsBySalesGrid.DataSource = officeDT;
 
}  
 
protected void RadLeadsBySalesGrid_DetailTableDataBind(object sender, GridDetailTableDataBindEventArgs e)
{
 
    GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;
    string SalesIdSelected = dataItem.GetDataKeyValue("sales_id").ToString().Trim();
 
    if (e.DetailTableView.Name == "LeadsTableView")
    {
        _dt = (SALTSearchCriteriaDAL.SALTLeadDataTable)Session["SaltLeadsDT"];
        int oricount = _dt.Rows.Count;
        e.DetailTableView.DataSource = _dt;
 
        DataRow[] filterRows;
        filterRows = _dt.Select("sales_id=" + SalesIdSelected);
 
        SALTSearchCriteriaDAL.SALTLeadDataTable newDT = _dt.Clone() as SALTSearchCriteriaDAL.SALTLeadDataTable;
        foreach (DataRow row in filterRows)
        {
            try
            {
                newDT.ImportRow(row);
            }
            catch (Exception ex)
            {
                string errMsg = ex.Message;
                ShowErrorMessage(errMsg);
            }
        }
 
        e.DetailTableView.DataSource = newDT;
        _total = newDT.Rows.Count;
    }       
}  


Eyup
Telerik team
 answered on 26 Feb 2015
2 answers
259 views
Hello Team,

I am using Radgrid, I want All buttons inside grid as pushbutton with image inside it.


<telerik:GridTemplateColumn AllowFiltering="false">
                                                                   <ItemTemplate>
                                                                       <asp:ImageButton CommandName="Edit" runat="server" Text="Edit" ImageUrl="~/Images/Edit.png"></asp:ImageButton>
                                                                       <asp:LinkButton CommandName="Edit" runat="server" Text="Edit"></asp:LinkButton>
                                                                   </ItemTemplate>
                                                               </telerik:GridTemplateColumn>

I have placed template column for Edit button as above. but i need pushbutton with all skin changes and an image inside button at left side and text as right side.

Can any one help me out?

Thanks and Regards,
Ruchi Patel
Ruchi
Top achievements
Rank 1
 answered on 26 Feb 2015
1 answer
883 views
hi

How do i do a multiple if condition on a button text property?

This is my sample code and i could not get it to work.

Text='<%# If(Eval("status") = "Yes", "OK", else If(Eval("status") = "Pending", "Pending", "No"))%>'

Thanks a lot
Danail Vasilev
Telerik team
 answered on 26 Feb 2015
3 answers
62 views
Hi

This is my code (in a with statement)

.DayStartTime = cfg.DayStartTime
.DayEndTime = cfg.DayEndTime
.WorkDayStartTime = cfg.DayStartTime
.WorkDayEndTime = cfg.DayEndTime

Both cfg.DayStartTime and cfg.DayEndTime are Timespans

The .DayStartTime works as expected, but the .DayEndTime always shows 1800.

I currently have this in a function that gets the data in the PageLoad, but I have tried it in the OnPreRender and neither works the Scheduler defaults to 0800 & 1800.

Andy
Boyan Dimitrov
Telerik team
 answered on 26 Feb 2015
1 answer
76 views
I am added RadTreeNodes directly to the control. They are added like this...

new RadTreeNode(item.Name, item.Path)
{
    ImageUrl = GetNodeImage(item.TypeName),
    ToolTip = item.Name,
    PostBack = false
}
I added PostBack and in the past NavigateUrl = "#", but with no result. The message telling me that an attempt to navigate away is happening in Chrome. As a side note, if I do ever click on the "Ok" button nothing happens.
Ivan Danchev
Telerik team
 answered on 26 Feb 2015
3 answers
90 views
Hi,

I having trouble getting a Combobox to display its checked items when the page first loads.

There is enough space to fit all the items but it still reverts to the "# items checked". If I were to uncheck and then recheck one of the items, the items are displayed correctly. It is only when the page initially loads that the combobox only shows how many are checked, even when there is ample room.

Is there any way to force display of items when the page loads, but still reverts back to the number of items checked with the space is filled?

Any help is greatly appreciated,
Thanks.

Aneliya Petkova
Telerik team
 answered on 26 Feb 2015
1 answer
79 views
i want Grid DataSource When changes Context Menu Change Server-Side....

how to??

Eyup
Telerik team
 answered on 26 Feb 2015
3 answers
97 views
Hello,

This afternoon, I have been working with Visual Studio 2010 and Telerik controls.

My windows 8.1 computer suddenly became rather unstable - this normally happens when there are Windows Updates to be applied.
So I rebooted the machine and allowed the updates to be installed.

Since doing this, Telerik control databinds have become INCREDIBLY slow. For example, the following code:

DateTime startDate = new DateTime(viewDateStart.Year, viewDateStart.Month, 1);
DateTime endDate = startDate.AddMonths(1);

while ((int)startDate.DayOfWeek != 1) startDate = startDate.AddDays(-1);        // 0 = sunday
while ((int)endDate.DayOfWeek != 0) endDate = endDate.AddDays(1);               // 0 = sunday

while (startDate <= endDate) {
       dayList.Add(startDate);
       startDate = startDate.AddDays(7);
}

rptCalendar.DataSource = dayList;
rptCalendar.DataBind();

At the point of the data bind, the dayList item only contains 5 records. It takes a good 5 to 10 seconds to step over the DataBind() statement.

Similarly, RadGrid is also taking inordinate amounts of time to DataBind(). The data in this instance comes from a Linq call, but this too is virtually instant.

It seems that a Windows update has somehow crippled Telerik control data binding.

Has anyone heard of this happening ?



Eyup
Telerik team
 answered on 26 Feb 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
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
Iron
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?