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

I am dynamically creating a vertical menu using server side code to create the menuitems.

The data for the text is coming from database entries that represent names
of things in our system.

These names can be quite long.

Everything seemed fine with the menu until I entered data into our DB that caused
the menu to stretch horizontally.

When I hover over an item there is a gap in the highlighting.
There is a block of color wide rounded corners on the left. Then a gap.
Then the rest of the highlight, with rounded corners on the right.

Also the two separators I added to my menu don't stretch all the way to
the right.

Am I doing something wrong, or is there perhaps a bug?

TIA 
Kate
Telerik team
 answered on 16 Jun 2011
15 answers
1.5K+ views
I do not want the RadGrid NeedDataSource to fire on Page Load Event instead i need to fire it on Search button Clickin My Form.
i need to Populate radgrid only after the input Control Data and Search button Click.
Please Help me...
are there any properties i am missing on??

Regards,
Ashwin
kavitha
Top achievements
Rank 1
 answered on 16 Jun 2011
2 answers
117 views
Hello,  I really want to be able to click the xaxis labels and display another menu when that happens.  I read elsewhere that this is not supported yet, but that webpage was back in 2007.  Is this supported now?

Eric
Aaron King
Top achievements
Rank 1
 answered on 16 Jun 2011
1 answer
190 views
1.  I have downloaded the sample Telerik Sales Dashboard demo site.
2.  I have SQL Server 2008 installed and have the NorthWind database installed also.
3.  When I try to launch the web site using VS2010, I keep getting the error:

static public IObjectScope GetNewObjectScope()
{
Database db = Database();  <-- Error happens here
IObjectScope newScope = db.GetObjectScope();
return newScope;
}

Unable to reach database server on host ''.
Error Details:A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified).


I have tried all of the following connection strings in my web.config (one by one) file but none of them work:


<add name="NorthwindConnectionString" connectionString="Data Source=.\MYCOMPUTERNAME;AttachDbFilename=|DataDirectory|\Northwind.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>


    <add name="NorthwindConnectionString" connectionString="Data Source=.\MYCOMPUTERNAME;AttachDbFilename=|DataDirectory|\Northwind.mdf;Integrated Security=True" providerName="System.Data.SqlClient"/>


    <add name="NorthwindConnectionString" connectionString="Data Source=MYCOMPUTERNAME;Initial Catalog=Northwind;Integrated Security=True" providerName="System.Data.SqlClient"/>


    <add name="NorthwindConnectionString" connectionString="Server=MYCOMPUTERNAME; Database=Northwind.mdf; Integrated Security=true;" providerName="System.Data.SqlClient" />





What is going wrong here?  What is the correct connection string to use for SQL Server 2008?
Alexander
Telerik team
 answered on 16 Jun 2011
4 answers
1.4K+ views
Hi,

I was wondering if anyone would know how to perform the following:

I have a RadGrid (emails) and I would like the following:

Click on a row - select a single row, any other selected rows are de-selected (single selection - regardless of CTRL or SHIFT keys pressed)
Click on a row selector checkbox - allow multiple row selections (CTRL/SHIFT keys)

But the problem I have, if the user clicks on row 5 for example, it gets highlighted and then if they hold SHIFT key down and click on say row 8 below, all these rows are selected (5 to 8) but I want it to deselect the originally selected row (5) and then select the clicked row (8). I only want multiple selections to be made via the row selector checkbox click.

If I turn on UseClientSelectColumnOnly="true" then it doesn't select the row when I click on it, only when I click on the row selector checkbox as per it's name suggests.

This is ALL done client side, there are NO Postbacks. Data is fetched via web services.

To visualise this: EmailClient - the grid holds a list of email headers, the user clicks on a row and the full email is displayed in the details area of the page below the grid. If they click another row, this email is then shown in detail. If they select multiple rows, no email is show in the details area but instead I want to show a count of which emails are selected e.g. "5 Email Selected"

Hope someone can guide me ...

Many thanks,

Ro

 

 

 

 

 

Rohan
Top achievements
Rank 1
 answered on 16 Jun 2011
5 answers
291 views
I have a problem, RadComboBox in Android Simulator click it(RadComboBox), it doesn't Vertical scroll bar, but microsoft's DropDownList do.
How do show Vertical scroll bar?
Below is mycode:
<asp:DropDownList ID="DropDownList1" runat="server">
                                                        </asp:DropDownList>
                                                        <telerik:RadComboBox ID="RadComboBox1" runat="server">
                                                        </telerik:RadComboBox>

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
             
 
            For i As Integer = 0 To 200
                Dim itm As New ListItem()
                itm.Value = i
                itm.Text = i
                DropDownList1.Items.Add(itm)
 
            Next
 
            For i As Integer = 0 To 200
                Dim rcbItem As New RadComboBoxItem()
                rcbItem.Value = i
                rcbItem.Text = i
                RadComboBox1.Items.Add(rcbItem)
                rcbItem.DataBind()
            Next
 
        End If
    End Sub

Ivan Zhekov
Telerik team
 answered on 16 Jun 2011
1 answer
152 views
Hi have used the RadScheduler to setup a small hotel reservations/availability calendar with my rooms down the left hand side and my dates display along the top in Timeline view.

However, I am now stuck. When I click a room and a date to make a new reservation, the only box that appears is a small textbox (which I assume is where you type a subject) with three buttons - Save, Cancel & Options.

When I click on the Options button, a larger new appointment screen appears with a subject field, start time, end time, all day checkbox and a dropdown list with my Rooms.

A few things I am trying to accomplish:

1. When I click a room and date, I would like the new appointment/reservation screen to popup automatically without having to click the options button.
2. I would like to customise this appointment screen by renaming field labels and adding new fields. i.e. I need a drop down list with all the Guests in my system. So I can select the client for the room (which would be the subject I assume).
3. Colour code the appointments/reservations depending on the reservation status set in my database.

Any help appreciated thank you.
Veronica
Telerik team
 answered on 16 Jun 2011
5 answers
72 views
Have problems getting data from my editor when I use ajax. If I remove ajax it will works.
When I enter the RadGrid1_InsertCommand I have no value in editor.Text.
The problem only occurs when I use ajax, without ajax it works and I have value in editor.Text
What should I do?

I just shows code that are affected:
.aspx
<asp:Content ID="Content1" ContentPlaceHolderID="CenterContentPlaceHolder" runat="Server">
    <telerik:RadGrid ID="GridEvent" runat="server" AutoGenerateColumns="False"
        ShowHeader="False" GridLines="None"
        ShowGroupFooter="true" OnItemDataBound="RadGrid1_ItemDataBound" OnItemCreated="RadGrid1_ItemCreated"
        OnPreRender="RadGrid1_PreRender" OnInsertCommand="RadGrid1_InsertCommand"
        OnCancelCommand="RadGrid1_CancelCommand" OnEditCommand="RadGrid1_EditCommand"
        OnUpdateCommand="RadGrid1_UpdateCommand" AllowAutomaticDeletes="False"    
        AllowAutomaticInserts="False" AllowAutomaticUpdates="False" OnNeedDataSource="RadGrid1_NeedDataSource">
  
        <ClientSettings AllowDragToGroup="False">
        </ClientSettings>
        <MasterTableView AutoGenerateColumns="False" GroupLoadMode="Client" InsertItemDisplay="Top"
            CellPadding="0" CellSpacing="0" EditMode="EditForms" DataKeyNames="Id,LogDate">
            <Columns>
                <telerik:GridTemplateColumn EditFormHeaderTextFormat="{0}" UniqueName="TemplateColumnUniqueName">
                    <EditItemTemplate>
                        <telerik:RadEditor ID="RadEditorEventLog" runat="server" ToolsFile="~/ExtraSimpleToolsFile.xml"
                            Width="100%" DialogHandlerUrl='~/Telerik.Web.UI.DialogHandler.axd' EditModes="Design"
                            Height="200px" Content='<%# Bind("Description") %>'>
                        </telerik:RadEditor>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <div class="cell">                        
                            <asp:Label ID="lblDescription" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"Description") %>'></asp:Label>
                        </div>
                        <div class="right-justify top">
                            <asp:Button ID="btnAlter" runat="server" Text="Alter*" CommandName="Edit" />
                        </div>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
            <EditFormSettings EditFormType="AutoGenerated">
                <FormMainTableStyle CellSpacing="0" CellPadding="0" Width="100%" />
                <FormTableStyle CellSpacing="0" CellPadding="0" BackColor="White" />
                <EditColumn ButtonType="PushButton" InsertText="Save*" UpdateText="Save**" UniqueName="EditCommandColumn1"
                    CancelText="Cancel*">
                </EditColumn>                
            </EditFormSettings>
            <GroupByExpressions>
                <telerik:GridGroupByExpression>
                    <GroupByFields>
                        <telerik:GridGroupByField FieldName="LogDate" SortOrder="Descending" />
                    </GroupByFields>
                    <SelectFields>
                        <telerik:GridGroupByField FieldName="LogDate" />
                    </SelectFields>
                    <SelectFields>
                        <telerik:GridGroupByField FieldName="UserFullName" />
                    </SelectFields>
                </telerik:GridGroupByExpression>
            </GroupByExpressions>
            <SortExpressions>
                <telerik:GridSortExpression FieldName="LogDate" SortOrder="Descending" />
            </SortExpressions>
        </MasterTableView>
    </telerik:RadGrid>
    <telerik:RadAjaxManager runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="GridEvent">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="GridEvent" LoadingPanelID="RadAjaxLoadingPanel1"/>                                        
                </UpdatedControls>                
            </telerik:AjaxSetting>           
        </AjaxSettings>
    </telerik:RadAjaxManager>
     <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
</asp:Content>

.aspx.cs
protected void RadGrid1_InsertCommand(object source, GridCommandEventArgs e)
    {    
        if ((e.Item is GridEditFormInsertItem) && (e.Item.OwnerTableView.IsItemInserted))
        {
            RadEditor editor = (RadEditor)e.Item.FindControl("RadEditorEventLog");
            if (editor != null)
            {
                if (editor.Text.Trim().Length < 1)
                {
                    return;
                }
                else
                {
                    IPurchase purchase = Factory.Get<IPurchase>((int)this.Object.ObjectId);
                    purchase.AddEventLog(true, editor.Content);
                    LoadEventLog();
                    this.GridEvent.Rebind();
                }
            }
        }
    }
  
  
protected void RadGrid1_PreRender(object sender, EventArgs e)
        

        this

 

 

.GridEvent.MasterTableView.IsItemInserted = true  

 

 

        this.GridEvent.Rebind();

 

    }
Foppa
Top achievements
Rank 1
 answered on 16 Jun 2011
3 answers
227 views
Hi all,

I have a grid that is displayed in a screen that is the child of a tab. (I mean that the grid is displayed when the user clicks on the tab.) My problem is that if the grid only returns a small number of rows and the user goes to filter on a column, the filter menu is cut off. Please see attached screen shots. I added one where all the filter options are displayed and I added one where they are cutoff. Is there any way to force the menu to display down from the filter icon? Any other way of accomplishing that I am trying to do?

Thanks,
J. E.
Mira
Telerik team
 answered on 16 Jun 2011
4 answers
179 views
Hi.

I have a RadComboBox in a GridTemplateColumn's EditTemplate like this:

....
<
telerik:GridTemplateColumn UniqueName="Unit.Name" HeaderText="Unit" DataField="Unit.Id"
    SortExpression="Unit.Id" ItemStyle-Width="250px">
    <ItemTemplate>
        <%# DataBinder.Eval(Container.DataItem, "Unit.Name")%>
    </ItemTemplate>
    <EditItemTemplate>
        <telerik:RadComboBox runat="server" ID="UnitComboBox" EnableLoadOnDemand="True" SelectedValue='<%#Bind("Unit.Id")%>'
            DataTextField="Name" DataSourceID="UnitEntityDataSource"
            DataValueField="Id" AutoPostBack="true" HighlightTemplatedItems="true" Height="250px" Width="250px" DropDownWidth="600px">
....

The Grid uses one EntityDataSource and the combobox another.

This works perfectly when updating existing rows, but when I insert a new row it crashes with:

DataBinding: 'Telerik.Web.UI.GridInsertionObject' does not contain a property with the name 'Unit'.

I guess this is because Unit is null when I insert a new object and therefore cant resolve Unit.Id. 

All the existing solutions recommend that you cancel the insert command and insert a dummy row, this would work if it was a ordinary column, but since its an entity I have to specify the relation, hence Unit.Id and not UnitId (which is the columnname in the grids entitydatasource)

I suspect this is the same problem that FreshOne reported here: Forum link

Ive also tried to behind selectedvalue code behind (trying to distinguish between update and insert) but then no values get updated instead.

Can I clarify my problem further?
Best Regards 
N.
Mira
Telerik team
 answered on 16 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?