Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
108 views
Hi,

          I am beginer using telerik controls. Grid is displaying only one column even i defined six columns.

           Grid is displaying properly when i add "CommandItemDisplay="Top""  in  MasterTableView section with "Add new Reord and refresh " options.

              I want to display the data with sorting and paging.

Can you please help to solve this issue?

Thanks
Ravi




<%

@ Control Language="C#" AutoEventWireup="true" ClassName="Vehicles" CodeFile="Vehicles.ascx.cs" Inherits="Dealer_Vehicles" %>

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<table style="width:95%;" border = "1">

<tr>

<td align="left">

<!-- <asp:Button ID="tempbtnSearch" runat="server" CausesValidation="false" OnClientClick="LookupParameter()" SkinID="DisplayButton"

Text="Search" /> -->

<!-- <asp:Button ID="btnSearch" runat="server" CausesValidation="false" SkinID="DisplayButton"

OnClientClick = "return ShowInsertForm();" Text="Search" /> -->

&nbsp;

</td>

</tr>

<tr>

<td >

<telerik:RadGrid

ID="grdVehicles"

runat="server"

AllowPaging="True"

AllowSorting="True"

PageSize="10"

GridLines="None"

OnNeedDataSource="RadGrid1_NeedDataSource"

EnableAJAX="true"

Skin="Vista"

ShowFooter="false"

ShowStatusBar = "false"

>

<PagerStyle Mode="NumericPages" />

<MasterTableView

AutoGenerateColumns="False"

Width="100%"

PageSize="15"

TableLayout="Fixed">

<Columns>

<telerik:GridBoundColumn

DataField="MODEL_YEAR"

HeaderText="Model year"

SortExpression="MODEL_YEAR"

UniqueName="MODEL_YEAR"

DataFormatString = "<nobr>{0}</nobr>"

ItemStyle-CssClass ="RadGridItemTemplate"

HeaderStyle-Wrap="false"

HeaderStyle-HorizontalAlign="Center"

ItemStyle-HorizontalAlign="Center"

HeaderStyle-Font-Bold="true"

>

</telerik:GridBoundColumn>

<telerik:GridBoundColumn

DataField="TYPE"

HeaderText="Product Type"

ReadOnly="True"

SortExpression="TYPE"

UniqueName="TYPE"

DataFormatString = "<nobr>{0}</nobr>"

ItemStyle-CssClass ="RadGridItemTemplate"

HeaderStyle-HorizontalAlign="Center"

ItemStyle-HorizontalAlign="Center"

HeaderStyle-Font-Bold="true"

HeaderStyle-Wrap = "false"

>

</telerik:GridBoundColumn>

<telerik:GridBoundColumn

DataField="VIN"

HeaderText="VIN"

SortExpression="VIN"

UniqueName="VIN"

DataFormatString = "<nobr>{0}</nobr>"

ItemStyle-CssClass ="RadGridItemTemplate"

HeaderStyle-HorizontalAlign="Center"

ItemStyle-HorizontalAlign="Center"

HeaderStyle-Font-Bold="true"

HeaderStyle-Wrap = "false"

>

</telerik:GridBoundColumn>

<telerik:GridBoundColumn

DataField="COLOR"

HeaderText="Color"

SortExpression="COLOR"

UniqueName="COLOR"

DataFormatString = "<nobr>{0}</nobr>"

ItemStyle-CssClass ="RadGridItemTemplate"

HeaderStyle-HorizontalAlign="Center"

ItemStyle-HorizontalAlign="Center"

HeaderStyle-Font-Bold="true"

HeaderStyle-Wrap = "false"

>

</telerik:GridBoundColumn>

<telerik:GridBoundColumn

DataField="MODEL_CLASS_CODE"

HeaderText="Class Code"

SortExpression="MODEL_CLASS_CODE"

UniqueName="MODEL_CLASS_CODE"

DataFormatString = "<nobr>{0}</nobr>"

ItemStyle-CssClass ="RadGridItemTemplate"

HeaderStyle-Wrap="false"

HeaderStyle-HorizontalAlign="Center"

ItemStyle-HorizontalAlign="Center"

HeaderStyle-Font-Bold="true"

>

</telerik:GridBoundColumn>

<telerik:GridBoundColumn

DataField="MODEL_CLASS_DESC"

HeaderText="Class Description"

SortExpression="MODEL_CLASS_DESC"

UniqueName="MODEL_CLASS_DESC"

DataFormatString = "<nobr>{0}</nobr>"

ItemStyle-CssClass ="RadGridItemTemplate"

HeaderStyle-HorizontalAlign="Center"

ItemStyle-HorizontalAlign="Center"

HeaderStyle-Font-Bold="true"

HeaderStyle-Wrap = "false"

>

</telerik:GridBoundColumn>

</Columns>

</MasterTableView>

</telerik:RadGrid>

</td>

</tr>

</table>

Sudipta Burman
Top achievements
Rank 1
 answered on 30 Sep 2008
5 answers
189 views
I have web application that is set to go live within the next couple of weeks.  It has been developed in a windows 2003/IIS 6.0 environment however we are being forced to release it on a Windows 2008/IIS 7.0 server.  This was a last minute decision that we have no control over.

Due to the short time I have had to prepare my app for IIS 7.0, it will be released using an AppPool set to Classic ASP.NET until I can get it converted to run as an Integrated app.

We are using RadControls for Asp.NET and everything works great on our development server.  Without making any changes though, IIS 7.0 refuses to allow any radcontrols.  I keep getting Unknown server tag 'rad:radSplitter'

I have defined the controls in both the web.config and at the top of my .master files and .ascx files

example web.config

<

add tagPrefix="rad" namespace="Telerik.WebControls" assembly="RadSplitter.Net2" />


example .ascx and .master files

<%

@ Register TagPrefix="rad" Namespace="Telerik.WebControls" Assembly="RadSplitter.NET2" %>

Has anyone else encountered this?  I have wasted an entire day with this error and the powers that be are breathing down my neck to get this resolved.

Thanks
Adam

Adam
Top achievements
Rank 1
 answered on 29 Sep 2008
5 answers
119 views
Hi,

Is there a way to display XAxis Item Label in way similar to this?
http://www.dundas.com/Gallery/Chart/NET/index.aspx?Img=glazed

Thank you.

Anette
Top achievements
Rank 1
 answered on 29 Sep 2008
21 answers
951 views
Hi telerik,

I would like to make a RadDock Objects Ajax Enabled.
I've put this objects into an UpdatePanel.

So i run my application, drag and drop the RadDock Object and click on a CustomCommand or a PinUpPinCommand with property AutoPostBack = True

But i give that error: "Sys.InvalidOperationExeption: Two Components with the same id "RadDock1" can't be added to the application"..

If i try to remove the UpdatePanel wich contains the RadDock Objects will work correctly whitout errors...

Why????

Thanks in Advice

This is the code of my .aspx page (The UpdatePanel3 is Rem)
<asp:ScriptManager ID="ScriptManager1" runat="server">  
        </asp:ScriptManager> 
       <%-- <asp:UpdatePanel ID="UpdatePanel3" runat="server">  
            <ContentTemplate>--%> 
                <telerik:RadDock ID="RadDock1" runat="server" DockMode="Floating" Pinned="false">  
                    <Commands> 
                        <telerik:DockCommand AutoPostBack="true" /> 
                        <telerik:DockPinUnpinCommand AutoPostBack="true" /> 
                        <telerik:DockExpandCollapseCommand /> 
                    </Commands> 
                    <ContentTemplate> 
                        <asp:UpdatePanel ID="UpdatePanel2" runat="server">  
                            <ContentTemplate> 
                                <radDk:RadEditor ID="RadEditor1" runat="server" Width="200px" Height="200px" ShowHtmlMode="false" 
                                    ShowPreviewMode="false" ShowSubmitCancelButtons="true" EnableDocking="false" 
                                    FocusOnLoad="true" ToolsFile="ToolbarRadEditor.xml">  
                                </radDk:RadEditor> 
                                <asp:Label ID="Lbl1" runat="server"></asp:Label> 
                                <asp:Button ID="Btn1" runat="server" Text="Click Me" /> 
                            </ContentTemplate> 
                            <Triggers> 
                                <asp:AsyncPostBackTrigger ControlID="RadDock1" EventName="Command" /> 
                            </Triggers> 
                        </asp:UpdatePanel> 
                    </ContentTemplate> 
                </telerik:RadDock> 
                <telerik:RadDock ID="RadDock2" runat="server" DockMode="Floating" Pinned="false">  
                    <Commands> 
                        <telerik:DockCommand AutoPostBack="true" /> 
                        <telerik:DockPinUnpinCommand AutoPostBack="true" /> 
                        <telerik:DockExpandCollapseCommand /> 
                    </Commands> 
                    <ContentTemplate> 
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">  
                            <ContentTemplate> 
                                <radDk:RadEditor ID="RadEditor2" runat="server" Width="200px" Height="200px" ShowHtmlMode="false" 
                                    ShowPreviewMode="false" ShowSubmitCancelButtons="true" EnableDocking="false" 
                                    FocusOnLoad="true" ToolsFile="ToolbarRadEditor.xml">  
                                </radDk:RadEditor> 
                                <asp:Label ID="Label1" runat="server"></asp:Label> 
                                <asp:Button ID="Button1" runat="server" Text="Click Me" /> 
                            </ContentTemplate> 
                            <Triggers> 
                                <asp:AsyncPostBackTrigger ControlID="RadDock2" EventName="Command" /> 
                            </Triggers> 
                        </asp:UpdatePanel> 
                    </ContentTemplate> 
                </telerik:RadDock> 
            <%--</ContentTemplate> 
        </asp:UpdatePanel>--%> 
Rick Aberle
Top achievements
Rank 1
 answered on 29 Sep 2008
1 answer
123 views
I have a grid of users. In the edit form for editing or adding a user,
I have a 2 embedded grids - one is the default chosen package and there is one
price associated with that package, and the price is a hidden column in the
embedded grid. I take that price, and put it in a textbox to put in the form.
The second embedded grid is a list of additional items that can be added to
the existing package, and each line item can have it's own price, and I have
a column template of a radnumeric textbox that the user enters a price if they
want to add the item. I also have a textbox placed under the chosen package
price that should show the total price of all additional items chosen. And
finally I want a 3rd text box showing the grand total price.

I got the first text box working fine. My first problem is that
when a user changes the price in the grid, my footer and textbox of totals
do  not change.
I have the text box being set in the itemdatabound call for the grid:


  if (e.Item is GridDataItem)
            {
                GridDataItem dataItem = e.Item as GridDataItem;
                 string price = dataItem["Price"].Text;

                if (price == "")
                    price = "0";
                int fieldValue = Convert.ToInt32(price);

                int total = int.Parse(TextBoxTotalAlaCartePrice.Text);
                total += fieldValue;
                TextBoxTotalAlaCartePrice.Text = total.ToString();
            }
            if (e.Item is GridFooterItem)
            {
                GridFooterItem footerItem = e.Item as GridFooterItem;
                int total = int.Parse(TextBoxTotalAlaCartePrice.Text);
                footerItem["Price"].Text = "total: " + total.ToString();
            }



And I also have an event handler when the user changes the
radnumeric text box, and I change the total there too:

 protected void RadNumericTextBox1_TextChanged(object sender, EventArgs e)
    {
        RadNumericTextBox ntb = (RadNumericTextBox)sender;
      
        string id = (ntb.NamingContainer as GridDataItem)["service_id"].Text.Trim();
        string price = ntb.Value.ToString();
        int nPrice = Convert.ToInt32(ntb.Value);
        int nTotalPrice = Convert.ToInt32(TextBoxTotalAlaCartePrice.Text);
        nTotalPrice += nPrice;
        TextBoxTotalAlaCartePrice.Text = nTotalPrice.ToString();  //textbox that holds total alacarte price
       
     //call to stored procedure to update temporary table with price change
        Insert_update_price(TextBoxTempTableName.Text, TextBoxAdditionalItemsPackageCdAla.Text, Convert.ToInt32(id), Convert.ToInt32(price));

    }


Any insight would be greatly appreciated.

Thanks,
Laura

Veli
Telerik team
 answered on 29 Sep 2008
1 answer
166 views
I am trying to use the splitter controls and most everything is working correctly with a few exceptions. 

For one, I have some odd behavior regarding postbacks when a slidingpane is used.  My sliding pane contains a repeater with linkbuttons in it.  When the sliding pane is docked, clicking a linkbutton causes a partial page postback.  However, if the sliding pane is visible (but not docked), clicking the linkbutton causes a full postback.

My second issue is that I cannot get the sliding pane to persist scroll position.  I have scrolling set to "both" and it always scrolls back to the top in either a full or partial postback.

<telerik:RadSplitter ID="RadSplitter1" runat="server" Height="450" Width="100%"
                                                    <telerik:RadPane ID="RadPane1" Width="22" runat="server"
                                                        <telerik:RadSlidingZone id="SlidingZone1" runat="server"
                                                            <telerik:RadSlidingPane id="Pane1" title="Projects" runat="server" width="200" Scrolling="both" PersistScrollPosition="true" EnableResize="True" EnableDock="true"
                                                                <asp:Repeater ID="ProjectBudgetRpt" runat="server"
                                                                    <HeaderTemplate> 
                                                                        <table width="100%" cellspacing="0"
                                                                            <tr class="DisplayGridHead"
                                                                                <td>&nbsp;</td> 
                                                                            </tr> 
                                                                    </HeaderTemplate> 
                                                                    <ItemTemplate> 
                                                                            <tr> 
                                                                                <td class="DisplayGridItem" nowrap> 
                                                                                     
                                                                                        <asp:LinkButton ID="BudgetProjectSelectBtn" OnCommand="BudgetProjectSelectBtn_OnCommand" Text='<%# DataBinder.Eval(Container,"DataItem.NameLong")%>' CommandArgument='<%# DataBinder.Eval(Container,"DataItem.ID")%>' CausesValidation="true" runat="server"></asp:LinkButton> 
                                                                                </td> 
                                                                            </tr> 
                                                                    </ItemTemplate> 
                                                                    <FooterTemplate> 
                                                                        </table> 
                                                                    </FooterTemplate> 
                                                                </asp:Repeater> 
                                                            </telerik:RadSlidingPane> 
                                                        </telerik:RadSlidingZone> 
                                                    </telerik:RadPane> 
                                                    <telerik:RadSplitBar ID="RadSplitBar1" runat="server" /> 
<telerik:RadPane ID="RadPane2" Scrolling="X" Width="99%" PersistScrollPosition="true" runat="server"
Other Stuff 
</telerik:RadPane> 
                                                </telerik:RadSplitter> 

Tsvetie
Telerik team
 answered on 29 Sep 2008
0 answers
75 views
Hi there,

A RadTreeView control is used as following. Child nodes are populated when the node gets clicked. When debugging the code, I found that the server function "RadTreeView_Catalog_NodeClick" is not fired. So I am not able to populate the treeview on demand.

Expecting help to solve the problem.

Thanks

P.S. The problem is the same event it's not placed in UpdatePanel.

<asp:UpdatePanel ID="UpdatePanel_Catalog_TreeView" runat="server" UpdateMode="Always">

<ContentTemplate>

<telerik:RadTreeView ID="RadTreeView_Catalog" runat="server"

OnClientContextMenuShowing="RadTreeView_Catalog_Contextmenu_SetItems"

OnContextMenuItemClick="RadTreeView_Catalog_OnContextMenuItemClick"

OnNodeClick="RadTreeView_Catalog_NodeClick"

>

<ContextMenus>

<telerik:RadTreeViewContextMenu ID="RadTreeView_Catalog_Contextmenu">

<Items>

<telerik:RadMenuItem ImageUrl="~/App_Image/Icon_Server_Refresh.BMP" PostBack="true" Text="Refresh" Value="Refresh" />

<telerik:RadMenuItem ImageUrl="~/App_Image/Icon_Dataset_AddDataLayers.BMP" PostBack="true" Text="Add to Data Layers" Value="AddDatalayer" />

</Items>

<CollapseAnimation Duration="200" Type="OutQuint" />

</telerik:RadTreeViewContextMenu>

</ContextMenus>

</telerik:RadTreeView>

</ContentTemplate>

</asp:UpdatePanel>

Vic
Top achievements
Rank 1
 asked on 29 Sep 2008
4 answers
192 views
Is it possible to have a different context menu for a tree based on the node name?

I currently have server side code that creates the tree and then applies a menu, like so:

m_RadTreeFolderHierarchy.ContextMenus.Add(

New RadTreeViewContextMenu())

m_RadTreeFolderHierarchy.ContextMenus(0).LoadContentFile(

"~/TreeSupport/TreeMenu.xml")


How would I change the menu for one node, and keep the default for the rest?

Bob
Top achievements
Rank 1
 answered on 29 Sep 2008
1 answer
96 views
I have an asp:Wizard on a web page.  (I'm not using any client-side Ajax stuff.) 

If I place the grid on a form, there is a variable created in code behind for the grid.  I'm able to set the reference's DataSource property because it is initialized.

If I place the same grid into a asp:Step inside the asp:Wizard, the reference is always null.  I could get a reference to it using FindControl() in the Activate event of the wizard, but the problem is that this event fires after NeedDataSource event.  NeedDataSource event cannot set any data because the grid is null at this point.

How does one go about using the grid inside the wizard?  Is anyone doing this?
SultanOfSuede
Top achievements
Rank 1
 answered on 29 Sep 2008
2 answers
141 views
I have found a problem in the most recent version of RadEditor where when I click a submit button, the editor refreshes and does not look the same as before.  In fact I get a strange underlay where the three buttons (edit, html, preview) are displayed UNDER the content directly below... even when I place the editor and other Items inside a table.

<table>
<tr><td>RadEditor</td></tr>
<tr><td>Input Field</td></tr>
<tr><td>Submit Button</td></tr>
</table>

This is very anoying and I have spent way too many hours doing "trial and error" trying to get it to work.

Even if I place the entire table inside an RadAjaxPanel or try and use the RadAjaxManager I get the same result.

FYI.  The RadEditor that I am speaking of is inside an ASCX page that is loaded into a RadPageView (used by RadTabStrip) in an ASPX page that is loaded inside a RadWindow (if this matters at all).

If you need a screenshot, I can submit one in the morning.
Chase Florell
Top achievements
Rank 1
 answered on 29 Sep 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?