Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
510 views
Hi,
i am using Q2 2009 version.I am having a problem with RadDatePicker control.I want to set  focus to the raddatepicker when the page gets loaded. i am using myraddatepicker.dateinput.focus() on my page_load function,But the focus is not setting to raddatepicker.

Please give me the solution ASAP.

Regards
Rahul Khinvasara.
Big
Top achievements
Rank 1
 answered on 16 Sep 2011
1 answer
111 views
Hello,

Our core web application is using several telerik charting controls. Customers have asked us to implement a radar type of chart control. From what I understand telerik is not supporting this type of control in its suite of chart types.

The microsoft controls on the other hand do support this type in "System.Web.DataVisualization". Most logical sollution would be to combine the 2. While doing this I run into a spot of trouble. Both sollutions require several similar web.config alterations. Added hanlers "chartimagehandler" pointing towards "ChartImg.axd".

How can I solve this situation. Of course I can drop telerik charting tools in favour of the ms version. But at this point we are rather satisfied how the telerik controls work.

Some guidance would be appreciated.

-- jan willem







jan willem fransen
Top achievements
Rank 1
 answered on 16 Sep 2011
3 answers
152 views
I took a break from ASP.NET development for several months but now I'm coming back to it.  I still prefer web forms to MVC, but for this discussion that may be irrelevant.  I have a Premium Collection license and I'm always interested in what can be done to maximize my efficiency in the use of these tools.

Coming back to this after some time off I'm struck by the labor involved to manifest extremely common functionality.  Specifically, I'm talking about binding data to controls, with subsequent sort, filter, and paging abilities where supported by the controls (like RadGrid).  I know this applies to all ASP.NET development but I'm wondering what we can use in RadControls to simplify our development - or if there is something else I should be considering to merge with RadControls.

We can create classes to support ObjectDataSource but there is always the question of whether the source object should be a DataSet, DataTable, DataView, etc.  A basic List<T> doesn't provide extended functionality.  I want my UI controls to allow the user to filter and sort client-side data without going back to the server.  When going back to the server, the Select DataMethod should provide server-tier filtering and sorting.  Paging from a data set created on the server should be as fast as possible, without rebuilding the data set each time to extract a new page.

The ObjectDataSource itself is limited. Manuel Abadia offers customized ODS components to overcome the limitations.  Scott Gu is writing a series of blogs on upcoming "vNext" improvements in databinding and related functionality.  Many of us choose not to use the ODS for some projects, preferring to bind strongly typed classes directly to the DataSource property of controls and then manually handling the events for all functionality.

Given all of that, we keep rebuilding the same functionality over and over.  Has anyone adopted a set of classes that is specifically designed to handle all of these situations?  Is there a book that describes the best practices for each case of client- or server-side processing of data sources for specific kinds of components?  Is there something special in .NET 4 that addresses a lot of these concerns?  Does Telerik have blogs or other documentation that goes in-depth on the best ways to handle NeedsDataSource and other events?  ... And I don't mean the same documentation that we've seen over many years, but something new and fresh that picks up where the old documentation leaves off.

I want to put all of this behind me.  I want to make use of the latest knowledge and code advances to code faster and more effectively.  I want information or an SDK (FOSS or commercial) that does for databinding what RadControls does for the user interface.  I want to spend my time on actual functionality rather than on all of this plumbing.

Thanks for your consideration and responses.
Veli
Telerik team
 answered on 16 Sep 2011
5 answers
321 views
Hi all, how can i FindControl GridTableView when i click "Next" button :((. i try to find control "<asp:Label ID="OrderIDLabel" runat="server" Text='<%# Eval("OrderID") %>'></asp:Label> "
  but i can't, who can help me now
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
 
 
        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" GridLines="None"
            ShowGroupPanel="True" Skin="Outlook" OnDetailTableDataBind="RadGrid1_DetailTableDataBind"
            HorizontalAlign="Left" DataMember="T_Company"    
                    onitemcommand="RadGrid1_ItemCommand"
                    onneeddatasource="RadGrid1_NeedDataSource"
                    onitemdatabound="RadGrid1_ItemDataBound" onprerender="RadGrid1_PreRender">
            <ClientSettings AllowDragToGroup="True">
            </ClientSettings>
            <MasterTableView Name="abc_" AutoGenerateColumns="false" AllowMultiColumnSorting="True" GridLines="Horizontal"
                DataKeyNames="CompanyID" DataMember="T_Company"
                GroupsDefaultExpanded="true">
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="CustomerID" MasterKeyField="CustomerID" />
                </ParentTableRelation>
                <ExpandCollapseColumn Visible="True">
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridBoundColumn DataField="CompanyName" HeaderText="Dịch Vụ" UniqueName="column2">
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn DataField="Deposit" HeaderText="Đặt Cọc" UniqueName="column">
                        <EditItemTemplate>
                            <asp:Label ID="DepositLabel" runat="server" Text='<%# Eval("Deposit") %>'></asp:Label>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:TextBox ID="DepositTextBox" runat="server" Text='<%# Bind("Deposit") %>'></asp:TextBox>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="column1" HeaderText="Người Thanh Toán">
                        <EditItemTemplate>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:DropDownList ID="DropDownList2" runat="server" DataSourceID="SqlDataSource1"
                                DataTextField="GuiderName" DataValueField="GuiderID">
                            </asp:DropDownList>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
                <DetailTables>
                    <telerik:GridTableView Name="show_" runat="server" Visible="true" DataKeyNames="CompanyID"
                        DataMember="CompanyID" Width="100%" AutoGenerateColumns="false" GridLines="Horizontal"
                        ShowFooter="True" Font-Bold="False" Font-Italic="False"
                        Font-Overline="False" Font-Strikeout="False" Font-Underline="False"
                        ForeColor="Blue">
                        <ParentTableRelation>
                            <telerik:GridRelationFields DetailKeyField="CompanyID" MasterKeyField="CompanyID" />
                        </ParentTableRelation>
                        <Columns>
                            <telerik:GridTemplateColumn DataField="OrderID" HeaderText="ID" UniqueName="column1">
                                <EditItemTemplate>
                                    <asp:TextBox ID="OrderIDTextBox" runat="server" Text='<%# Bind("OrderID") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="OrderIDLabel" runat="server" Text='<%# Eval("OrderID") %>'></asp:Label>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridBoundColumn DataField="ProvideName" HeaderText="Dịch Vụ" UniqueName="column2">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="CurrentPrice" HeaderText="Đơn Giá" UniqueName="column3">
                            </telerik:GridBoundColumn>
                            <telerik:GridTemplateColumn DataField="BookQty" HeaderText="SL Dự Kiến" UniqueName="column4">
                                <EditItemTemplate>
                                    <asp:TextBox ID="BookQtyTextBox" runat="server" Text='<%# Bind("BookQty") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="BookQtyLabel" runat="server" Text='<%# Eval("BookQty") %>'></asp:Label>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn DataField="PriceOper" HeaderText="TT Dự Kiến" UniqueName="column5">
                                <EditItemTemplate>
                                    <asp:TextBox ID="PriceOperTextBox" runat="server" Text='<%# Bind("PriceOper") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="PriceOperLabel" runat="server" Text='<%# Eval("PriceOper") %>'></asp:Label>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn DataField="CurrentQty" HeaderText="SL thực Tế" UniqueName="column6"
                                DataType="System.Int32">
                                <EditItemTemplate>
                                    <asp:Label ID="CurrentQtyLabel" runat="server" Text='<%# Eval("CurrentQty") %>'></asp:Label>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:TextBox ID="CurrentQtyTextBox" runat="server" Width="50" Text='<%# Eval("CurrentQty") %>'></asp:TextBox>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn DataField="CurrentPay" HeaderText="TT Thực Tế" UniqueName="column7"
                                DataType="System.Int32">
                                <EditItemTemplate>
                                    <asp:Label ID="CurrentPayLabel" runat="server" Text='<%# Eval("CurrentPay") %>'></asp:Label>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:TextBox ID="CurrentPayTextBox" runat="server" Width="50" Text='<%# Eval("CurrentPay") %>'></asp:TextBox>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridBoundColumn DataField="DifferenceQty" HeaderText="SL Phát Sinh" UniqueName="column9">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="DifferencePrice" HeaderText="CP Phát Sinh" UniqueName="column10">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="TotalPrice" HeaderText="Thành Tiền" UniqueName="column11">
                            </telerik:GridBoundColumn>
                        </Columns>
                        <FooterStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                            Font-Underline="False" ForeColor="Red" Wrap="True" />
                    </telerik:GridTableView>
                </DetailTables>
            </MasterTableView>
        </telerik:RadGrid>
<asp:Button ID="Button1" runat="server" Text="Tiếp Tục"
                    onclick="Button1_Click" />
Ho Tri
Top achievements
Rank 1
 answered on 16 Sep 2011
7 answers
378 views
In using the radgrid control we want the scroll bars to behave as if in auto mode, displaying the scroll bars when there's more data to display. However if we set one of the columns to frozen, I see that the control builds it's own horizontal scrollbar overwriting the one set by the browser. We currently use the grid allowing the users to customize the columns to be displayed, thus they are able to display fewer columns which doesn't fill their browser width. This *should* result in the scroll bar getting hidden, and in IE8 under compatibility mode it does. However for our users not using compatibility mode they continue to see the scrollbar even when there's nothing to scroll to. The scroll bar is displaying properly in that it's grayed out showing there's nothing to scroll ( basically functioning as if the scroll mode is set to overflow: scroll vice overflow: auto), however we'd like to hide the scroll bar if there is nothing to scroll to see (overflow: auto).

Thanks
Bryant
Pavlina
Telerik team
 answered on 16 Sep 2011
9 answers
1.5K+ views
Version: Q1 2009 (.NET 3.5)
Language: C#
Dev: VS 2005

I have a page that allows the user to select a database table from a dropdown list and display the data in a RadGrid.  The RadGrid is set to automatically generate columns and allow scrolling and sorting.  If I switch between tables without sorting, I get no errors.  However, if I pick a table, sort on a column, and then select another table to view, I get a runtime error of "[column] is neither a DataColumn nor a DataRelation for table [tablename]."   Code snippet below. 

protected void RefreshData() 
        { 
          DataSet  ds; 
          string   query; 
          string   tableName; 
           
          // clear old data 
          UserMsg.Text = ""; 
          Cache.Remove("wadv_ds"); 
          clearGrid(); 
 
          // get data 
          tableName = cbTableList.SelectedValue; 
          query = @"SELECT * FROM " + tableName; 
          ds = dba.ReadData(query, tableName); 
 
          // update grid 
          if (ds == null) 
            { 
              UserMsg.Text = "DataSet is null."; 
            } 
           else if (ds.Tables[0].Rows.Count == 0) 
            { 
              UserMsg.Text = "Table has no data."; 
            } 
           else 
            { 
              Cache["wadv_ds"] = ds.Tables[0]; 
 
              rgData.DataSource = ds.Tables[0]; 
              rgData.DataBind();                               //  <=== ERROR OCCURS HERE 
            } 
        } 
        //------------------------------------------------------------------------- 
    protected void clearGrid() 
    { 
      rgData.DataSource = null; 
      rgData.DataBind(); 
      rgData.Columns.Clear(); 
    } 
    //------------------------------------------------------------------------- 

Any help resolving this would be greatly appreciated.  Thanks.
Swapna
Top achievements
Rank 1
 answered on 16 Sep 2011
3 answers
176 views
I have a method that I use to reset a form after a submit or if the user chooses to click a reset button. For the most part it works, however if Im using a combobox that is tied to a LoadOnDemand event, the selected item is still displayed. It does appear that the remaining items are reloaded when I click the dropdown arrow.

Here is the code I'm using:

public static void resetForm(Control parent)
 {
     foreach (Control c in parent.Controls)
     {
         if (c.Controls.Count > 0)
         {
             resetForm(c);
         }
         else
         {
             switch (c.GetType().ToString())
             {
                 case "Telerik.Web.UI.RadTextBox":
                     ((RadTextBox)c).Text = "";
                     break;
 
                 case "Telerik.Web.UI.RadComboBox":
                     ((RadComboBox)c).ClearSelection();
                     ((RadComboBox)c).Text = string.Empty;
 
                     break;
 
                 case "Telerik.Web.UI.RadTimePicker":
                     ((RadTimePicker)c).Clear();
                     break;
 
                 case "Telerik.Web.UI.RadDatePicker":
                     ((RadDatePicker)c).Clear();
                     break;
 
                 case "System.Web.UI.WebControls.CheckBox":
                     ((CheckBox)c).Checked = false;
                     break;
 
             }
         }
     }
 }

Thanks,
Kalina
Telerik team
 answered on 16 Sep 2011
13 answers
366 views
Hi

I am trying to get Template columns Total to be updated on Footer  and Label outside the Grid

Here is my scenario

i have qty,price,discount and total(which is calculated client side). So when the user enters the qty and selects the price and
 discounts(if any)  i calculate the total on client side.
As user can select multiple items, total is calculated accordingly. But i want the Sum of total in the footer and also label which is outside the grid. Can we show the sum in the footer  and also  in the label using client side functions

Please suggest

Thank you
Kavya
Kavya
Top achievements
Rank 2
 answered on 16 Sep 2011
5 answers
178 views
I am having an issue with my radmenu submenu not closing when I have EnableRootItemScroll = "true".

I found the same bug here on the website in this location: http://demos.telerik.com/aspnet-ajax/menu/examples/functionality/scrolling/defaultcs.aspx

To reporduce:
Mouse over "Format"
Then "Font"
Them mouse over one of the fonts(ex. Verdana)
Then move your mouse up out of the menu.

All the submenu's should stay open. All the browsers I have tested this on have the same result.

If somebody knows a fix to this that would be a great help.

Thanks
Zach
Kate
Telerik team
 answered on 16 Sep 2011
2 answers
136 views
I want to make Organization Chart  with asp.net that Gets It's Data from sql database
is there any Telerik control can do this
thanks
michel
Top achievements
Rank 1
 answered on 16 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?