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

What is the best alternative for a nestedviewtemplate when using a single datasource (mailmessages from which I want to show the body text in a second detailrow of a grid row) and  the Telerik suite version prior to Prometheus ?

Do you have an example of such a solution ?

thanks in advance
Sebastian
Telerik team
 answered on 14 Jul 2008
2 answers
104 views
Hi,

what I would like to do is to add or remove the edit column on postback. I tried setting the AutoGenerateEditColumn property in code without success.

Thanks in advance

Andreas
Andreas N.
Top achievements
Rank 2
 answered on 14 Jul 2008
3 answers
279 views
I love the ease of use for the RadWindow it would really be great to just embed some controls on the page and not have to use the external navigateurl property.

For instance, perhaps I want to display a checkboxlist of columns for the radgrid so the user can select what they want to see.  It sure would be nice to be able to do something like:

<telerik:RadWindow ID="RadWindow1" runat="server" Title="Test" VisibleOnPageLoad="true" ShowContentDuringLoad="true">
    
<asp:CheckBoxList ID="CheckBoxListColumns" runat="server" />
</telerik:RadWindow>

Can this be done?

Kevin White
Top achievements
Rank 2
 answered on 14 Jul 2008
3 answers
209 views

A have a user input form with tool tips for all controls, my preferred ShowEvent mode for the ToolTipManager is "Focus", checkboxes do not seem to like this however.

If I leave the ShowEvent as default or MouseOver, my checkbox ToolTip will display ok but if I change to Focus it doesn't work.  I have tried:

  •  Automatically and manually assigning the checkbox control to the ToolTipManager.
  • Assigning an individual RadToolTip just to the checkbox control.
  • Setting the checkbox with and without a Text property.

After some searching I haven't found any reference to this in the documentation, is there a solution (simple or otherwise) that I am overlooking?

Regards
Conan

Svetlina Anati
Telerik team
 answered on 14 Jul 2008
1 answer
66 views
Hi,

I have a RadGrid populated with more than 25 columns of data. When i export this data to pdf format using ExportTo.PDF() ,the PDF file that was created is trying to adjust all columns in one page. Due to insufficient space ,all the columns are getting overlapped and looking so clumpsy. Is there any property which sets the number of columns to displayed in each page?

Thanks,
Nataraj
Veli
Telerik team
 answered on 14 Jul 2008
6 answers
316 views
Hello,

I have the following problem: I have a module in my project which return DataTable by property (ie <object name>.Data is of DataTable type). Then I bind this to the RadGrid. Everything works fine to the moment when I'm trying to update the DataTable. In the beginning, I was able to get to edit mode but pressing Update didn't do the job (ie the row was still in edit mode). Now after some changes I'm not able even to get to edit mode. I'm using RadNumericTextBox in template fields. Version of RadControls is 2008.1 619. This my code:

[aspx]

<!-- I use master page that is why I decided to use RadAjaxManagerProxy -->
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="MarketShareRadGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="MarketShareRadGrid" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>

...

<!-- This is my RadGrid -->
<telerik:RadGrid ID="MarketShareRadGrid" AllowAutomaticUpdates="true" AllowAutomaticDeletes="false"
            Skin="Vista" Width="97%" AllowSorting="False" AutoGenerateColumns="false" GridLines="None"
            runat="server" ShowFooter="True" AllowMultiRowSelection="True" AllowMultiRowEdit="True"
            HorizontalAlign="NotSet" OnUpdateCommand="MarketShareRadGrid_UpdateCommand">
            <MasterTableView Width="100%" GridLines="None" CommandItemDisplay="Top" DataKeyNames="Intervention"
                EditMode="InPlace" HorizontalAlign="NotSet" AllowAutomaticInserts="True">
                <CommandItemTemplate>
                    <div style="padding: 0 5px;">
                        Custom command item template&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:LinkButton ID="btnEditSelected" runat="server" CommandName="EditSelected" Visible='<%# MarketShareRadGrid.EditIndexes.Count == 0 %>'><img style="border:0px;vertical-align:middle;" alt="" src="../../DataEditing/Img/Edit.gif" />Edit selected</asp:LinkButton>&nbsp;&nbsp;
                        <asp:LinkButton ID="btnUpdateEdited" runat="server" CommandName="UpdateEdited" Visible='<%# MarketShareRadGrid.EditIndexes.Count > 0 %>'><img style="border:0px;vertical-align:middle;" alt="" src="../../DataEditing/Img/Update.gif" />Update</asp:LinkButton>&nbsp;&nbsp;
                        <asp:LinkButton ID="btnCancel" runat="server" CommandName="CancelAll" Visible='<%# MarketShareRadGrid.EditIndexes.Count > 0 || MarketShareRadGrid.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="../../DataEditing/Img/Cancel.gif" />Cancel editing</asp:LinkButton>&nbsp;&nbsp;
                        <asp:LinkButton ID="LinkButton4" runat="server" CommandName="RebindGrid"><img style="border:0px;vertical-align:middle;" alt="" src="../../DataEditing/Img/Refresh.gif" />Refresh table</asp:LinkButton>
                    </div>
                </CommandItemTemplate>
                <Columns>
                    <telerik:GridBoundColumn HeaderText="Intervention" UniqueName="Intervention" DataField="Intervention" ReadOnly="true" />
                    <telerik:GridTemplateColumn HeaderText="Year 1" UniqueName="Year 1" DataField="Year 1">
                        <ItemTemplate>
                            <telerik:RadNumericTextBox ID="Year1Item" runat="server" Skin="Outlook" MinValue="0" MaxValue="100" Type="Percent" Enabled="false"
                                Value='<%# (float)Eval("Year 1") %>' />
                        </ItemTemplate>
                        <EditItemTemplate>
                            <telerik:RadNumericTextBox ID="Year1Edit" runat="server" Skin="Outlook" ShowSpinButtons="true" MinValue="0" MaxValue="100" Type="Percent"
                                Value='<%# (float)DataBinder.Eval(Container.DataItem, "Year 1") %>' />
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings>
                <Selecting AllowRowSelect="True" EnableDragToSelectRows="True" />
            </ClientSettings>
        </telerik:RadGrid>

[cs]

public partial class Screen1 : System.Web.UI.Page
{  
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            Calculations.MarketShare marketShareObject = new MarketShare(-1); // I'm creating the object of my module closed in DLL
            MarketShareRadGrid.DataSource = marketShareObject.Data; // The property Data returns DataTable
        }
    }

protected void MarketShareRadGrid_UpdateCommand(object source, GridCommandEventArgs e)
    {
        GridEditableItem editedItem = e.Item as GridEditableItem;

        int rowNumber = editedItem.ItemIndex; // I'm checking which row is edited

        double year1 = (double)(editedItem["Year 1"].Controls[1] as RadNumericTextBox).Value; // I'm taking a value which user provided

        try
        {
            ((DataTable)((RadGrid)source).DataSource).Rows[rowNumber]["Year 1"] = year1; // I'm writing this value to my DataTable
        }
        catch (Exception ex)
        {
            MarketShareRadGrid.Controls.Add(new LiteralControl("Unable to update value!"));
            e.Canceled = true;
        }
    }
}

Thank you in advance for your help.
Sebastian
Telerik team
 answered on 14 Jul 2008
1 answer
124 views
Hi

I am trying to create a hierarchical grid using code. I have a dataset that contains two tables, 'Categories' and 'Items'. The table 'Categories' has a field 'mastercategoryid' and the table 'Items' has a column 'categoryid'.

I am trying to build the grid as follows:

protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    FoodVanWCF wcf = new FoodVanWCF();
    DataSet menu = wcf.GetMenu();    
    RadGrid1.DataSource = menu.Tables["Categories"];
    RadGrid1.MasterTableView.DetailTables[0].DataSource = menu.Tables["Items"];
    RadGrid1.MasterTableView.DataKeyNames = new string[] { "mastercategoryid" };
    RadGrid1.MasterTableView.DetailTables[0].DataKeyNames = new string[]{ "categoryid" };

    GridRelationFields grf = new GridRelationFields();

    grf.MasterKeyField = "mastercategoryid";
    grf.DetailKeyField = "categoryid";

    RadGrid1.MasterTableView.DetailTables[0].ParentTableRelation.Add(grf);

}

However when I try to expand the grid I get the error

Parent table relations set, but no correspoding data-key name found

What am I doing wrong here?

Veli
Telerik team
 answered on 14 Jul 2008
4 answers
225 views
Hello Telerik:

I am using a few Telerik components in a panel. I am doing a callback and in this method   ( Server  Side), I want to update  all these Telerik components
 
Can i do it ?

Regards. Pablo
Kevin Babcock
Top achievements
Rank 1
 answered on 14 Jul 2008
6 answers
213 views
I have created a RadGrid with a child (details) grid expansion. All of the data is loading correctly, but I am having trouble accession the collection property for the details grid.

I would like to left justify two columns, while centering the rest.
 
If I go into the "Open Property Builder" section, choose the Details grid heirarchy object, tableview settings, and the toggle property grid functions, I get the properties for the details grid. If I scroll down to the "DetailsTables" section and choose the box with the three periods in it, it gives me the following error:

"Object reference not set to an instance of an object"

How can I obtain the properties for the individual columns in the details grid?
Philip
Top achievements
Rank 1
 answered on 14 Jul 2008
1 answer
184 views
Hi,
I am using the LoadOnDemand example, but i have this problem: the tabclick event fires just the first time.
When i click on the second tab it works, but after this when i click on the first tab, the event won't fires.
Here is my code:

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">  
    <script type="text/javascript">  
        function onTabSelecting(sender, args)  
        {  
             if (args.get_tab().get_pageView())    
             {    
                   args.get_tab().set_postBack(false);    
             }  
        }  
          
    </script> 
</telerik:RadCodeBlock> 
 
            <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1" SelectedIndex="0" OnClientTabSelecting="onTabSelecting" OnTabClick="RadTabStrip1_TabClick" /> 
            <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" OnPageViewCreated="RadMultiPage1_PageViewCreated" /> 
 
<telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel1">  
            <asp:Image runat="server" ID="LoadingImage1" ImageUrl="~/Ajax/Img/loading7.gif" AlternateText="Loading..." /> 
        </telerik:RadAjaxLoadingPanel> 
        <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="RadTabStrip1">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" /> 
                        <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="LoadingPanel1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="RadMultiPage1">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="LoadingPanel1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
 

 
 
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load  
                RadTabStrip1.Tabs.Add(New RadTab("FirstTab", "FirstValue"))  
                RadTabStrip1.Tabs.Add(New RadTab("SecondTab", "SecondValue"))  
                If Not Page.IsPostBack Then 
                    AddPageView(RadTabStrip1.FindTabByValue("FirstValue"))  
                End If 
End Sub 
 
        Protected Sub RadTabStrip1_TabClick(ByVal sender As Object, ByVal e As RadTabStripEventArgs)  
            If String.IsNullOrEmpty(e.Tab.PageViewID) Then 
                AddPageView(e.Tab)  
            End If 
            e.Tab.PageView.Selected = True 
        End Sub 
 
        Protected Sub RadMultiPage1_PageViewCreated(ByVal sender As Object, ByVal e As RadMultiPageEventArgs)  
            Dim strControl As String = "Controls/" & e.PageView.ID & ".ascx" 
            Dim Control As UserControl = Page.LoadControl(strControl)  
            Control.ID = e.PageView.ID + "_Control" 
            e.PageView.Controls.Add(Control)  
        End Sub 
 
        Private Sub AddPageView(ByVal Tab As RadTab)  
            Dim PageView As New RadPageView()  
            PageView.ID = Tab.Value  
            RadMultiPage1.PageViews.Add(PageView)  
            Tab.PageViewID = PageView.ID  
        End Sub 
Atanas Korchev
Telerik team
 answered on 14 Jul 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?