Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
74 views
Hi,

I'm having some small problems with RadGrid.

Issue 1:
Here is an example page
http://dev2.spireweb.no/resultat.aspx?pid=15&rb=1&type=simpel&q=test
When I fill in a value in the textbox the first time and then I click "Kjøp" then it does not find the value of the textbox, and just add 1 item to cart (handlevogn), but the second time I click "kjøp" it finds the value enter in the textbox.
Here is my ItemCommand code:
protected void radResult_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
{
    switch (e.CommandName)
    {
        case "AddToCart":
            int test = e.Item.DataSetIndex;
            TextBox txtQuantity = (TextBox)(e.Item.FindControl("txtQuantity"));
            if (txtQuantity.Text.Length > 0)
                ShoppingCart.GetCurrentUsersCart.AddItem(int.Parse(e.CommandArgument.ToString()), int.Parse(txtQuantity.Text.ToString()));
            else
                ShoppingCart.GetCurrentUsersCart.AddItem(int.Parse(e.CommandArgument.ToString()), 1);
            txtQuantity.Text = "";
             
            RadAjaxManager1.ResponseScripts.Add("javascript:updateCart();");
            //RadAjaxManager1.ResponseScripts.Add(string.Format("alert('Hello from the server! Server time is {0}');", DateTime.Now.ToLongTimeString()));
            break;
    }
}

Why do this happen?

Issue 2:
Who can I "reset" the sort, so it goes back to first sort state?
Here is an example page:
http://dev2.spireweb.no/resultat.aspx?pid=15&rb=2&type=simpel&q=test
If I click "Vis treff A-Å" how can I go back to the sort state the radgrid started with?

Thanks in advaned...
Marin
Telerik team
 answered on 07 Jul 2011
4 answers
474 views
Hi All

I am calling the insert form of radgrid using the fireCommand from javascript that is triggered by and external button,
However seeing as i am using a custom command name it will not trigger unless the grid has some data,
I tried changing the command name to InitInsert....however this does not trigger the grids Item_command server side for some reason!

I need to trigger the Item_command as i need to control the event.

Could someone tell me why this is not triggering using InitInsert and it triggered using my custom command?

Many Thanks

Regards

Cush
Cush
Top achievements
Rank 1
 answered on 07 Jul 2011
8 answers
166 views
Hi,
I'm using the "Client edit with batch server update" example to make my own grid. I have a question that I haven't found the solution. How can I insert a new row using gridTemplatecolumns? I have add a command Item Template linkButton element for the inserting, but when I click on it, it is only appearing for inserting a column that is a bound one. How can I do for Inserting items using template columns?
I'm trying to work in server-side all I can.
Thanks,
Jon
Ja
Top achievements
Rank 1
 answered on 07 Jul 2011
1 answer
95 views
Hi Telerik
I have a colour scheme for my line chart - however this colour scheme does not translate very well when printed in black and white. One option is to set one of my lines to use a penstyle other than solid and this works quite well. However the legend doesn't reflect this and having printed the chart in b&w, the user is no wiser as to which chart series is which - they can see one is dotted (or dashdot etc), they just can't tell which one from the legend.

Is there a way to style the legend to reflect this?  By default the legend items are shown as squares, so this would need to change to a line or something in order for the penstyle to be visible.

thanks
--Mike
Evgenia
Telerik team
 answered on 07 Jul 2011
1 answer
96 views
Hello,

I was using a tooltip for radgrid. On mouse over on radgrid row tooltip pops up.

After loading the dynamic data in tooltip, it changes its position and moves up. Becase of this this tooltip points to some other row in radgrid which is misleading.

note:- its ovserved posiotion change of tooltip happens when tooltip is at end of the web page below.

I would like the tooltip should not move or though it move it should point to the exact row of radgrid.

Can you please suggest me the best way to achieve this ?

tooltip code:
<telerik:RadToolTipManager ID="ttm_CSMD_Backlog_By_Status_FL" runat="server" EnableShadow="true" 
    Animation="Fade"   OnAjaxUpdate="OnAjaxUpdate" HideEvent="ManualClose"  AnimationDuration="2000"
    Position="BottomRight"  RelativeTo="Element" OffsetY="0" OnClientResponseEnd="OnClientResponseEnd">
</telerik:RadToolTipManager>

please see attached images for more clarity.
Marin Bratanov
Telerik team
 answered on 07 Jul 2011
1 answer
69 views
Hi,

I have a list of items and have placed 2 DataPagers on the page.

One sits above the list and one below.

If I click on one, everything works as it should and I get the next page of results.

Unfortunately though, the DataPagers then get out of sync (ie. One will have the new page number set but the other one still displays the old page index)

Is there anyway I can keep them in sync?

Thanks
Daniel
Telerik team
 answered on 07 Jul 2011
2 answers
135 views
Hi,

I'm trying to use a grid to display Facilities and Contacts. A 'Facility' would be something like a factory, office or location and there is a parent/child relationship between the two.

In my DetailTable, I would like the user to be able to add a new contact. When the 'Add new record' link is clicked, I would like to fill a combobox with contacts that are NOT currently assigned to the Facility.

I'm using the following thread as a guide.

http://www.telerik.com/community/forums/aspnet-ajax/grid/fill-datasource-in-radcombobox-within-edititemtemplate-of-radgrid.aspx

I'm trying to use the ItemDataBound event to fill my combobox. The problem that I have is that I'm unable to find a reference to the FacilityID in this method. I've tried using insertItem.ParentItem but this is null when I try and read it in debug mode.

Can someone point me in the right direction?

Thanks,
Tim

Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound
 
    If (TypeOf e.Item Is GridEditFormInsertItem) AndAlso (e.Item.OwnerTableView.IsItemInserted) Then
        Dim insertItem As GridEditFormInsertItem = DirectCast(e.Item, GridEditFormInsertItem)
        Dim combo As DropDownList = DirectCast(insertItem("colContactId").FindControl("cboContactID"), DropDownList)
 
        Dim conn As New SqlConnection(connectionstring)
        conn.Open()
        'How do I reference FacilityID from the line below????
        Dim adp As New SqlDataAdapter("SELECT ContactName,ContactID from  Contacts WHERE ContactID NOT IN (Select ContactID From FacilityContacts WHERE FacilityID=<NeedHelpHere>", conn)
        Dim dt As New DataTable()
        adp.Fill(dt)
        combo.DataSource = dt
        combo.DataTextField = "ContactName"
        combo.DataValueField = "ContactID"
        combo.DataBind()
        conn.Close()
    End If
 
End Sub



<telerik:RadGrid ID="RadGrid1" ShowStatusBar="True" DataSourceID="dsFacilityList"
    runat="server" PageSize="7" AllowSorting="True" AllowPaging="True" GridLines="None"
    CellSpacing="0" AllowAutomaticInserts="True"
    AllowAutomaticUpdates="True" >
    <PagerStyle Mode="NumericPages"></PagerStyle>
    <MasterTableView DataSourceID="dsFacilityList" AllowMultiColumnSorting="True"
        PageSize="20" CommandItemDisplay="Top" DataKeyNames="FacilityID" EditMode="EditForms" >
        <EditItemTemplate>
 
        </EditItemTemplate>
        <DetailTables>
            <telerik:GridTableView runat="server" DataKeyNames="FacilityID"
                DataSourceID="dsFacilityContactList2" CommandItemDisplay="Top"
                AutoGenerateColumns="False">
                 
                 
                <EditItemTemplate>
               
                </EditItemTemplate>
                 
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="FacilityID"
                        MasterKeyField="FacilityID" />
                </ParentTableRelation>
                <CommandItemSettings ExportToPdfText="Export to PDF" />
                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
                <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                    <HeaderStyle Width="20px" />
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridTemplateColumn DataField="ContactID"
                        FilterControlAltText="Filter column column" UniqueName="colContactId" >
                        <EditItemTemplate>
                               Contact ID <asp:TextBox ID="ContactIDTextBox" runat="server"
                                Text='<%# Bind("ContactID") %>'></asp:TextBox>
 
                                    <asp:DropDownList ID="cboContactID" runat="server">
                                   </asp:DropDownList>
 
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="ContactIDLabel" runat="server" Text='<%# Eval("ContactID") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn DataField="FacilityID"
                        FilterControlAltText="Filter column1 column" UniqueName="column1">
                        <EditItemTemplate>
 
 
                            Facility ID <asp:TextBox ID="FacilityIDTextBox" runat="server"
                                Text='<%# Bind("FacilityID") %>'></asp:TextBox>
 
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="FacilityIDLabel" runat="server" Text='<%# Eval("FacilityID") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
                <EditFormSettings>
                    <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                    </EditColumn>
                </EditFormSettings>
            </telerik:GridTableView>
        </DetailTables>
        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
        </RowIndicatorColumn>
        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"
            Visible="True">
        </ExpandCollapseColumn>
        <SortExpressions>
 
        </SortExpressions>
        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
        </EditFormSettings>
     
    </MasterTableView>
 
    <FilterMenu EnableImageSprites="False">
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
    </HeaderContextMenu>
</telerik:RadGrid>




Tim
Top achievements
Rank 1
 answered on 07 Jul 2011
6 answers
144 views
You're embedding the icons as <img> tags with css clipping right? :/

So here's my list of problems
  1. Nowhere in the markup do you define the CSS class itself of the icon type, so I am totally unable to style\sprite this myself
    <span class="rnTitleBarIcon"><img alt="" src="/aspnet-ajax-beta/WebResource.axd?d=ggAcMRKG-k0cBWcn06l1bQ0-EcIDhDWZb12Lq-SE6ng5d2az3I1O-XNTxq83E4Fw_GW3CVlrOrhvkwJP1A2axcD5RKUIsMrmmQnYKcnjKzr3eF5qacTEvdl_o48AR9i_Z0Ff_wWqxIpI4gdVXoLrV2ESf8Ui7_izFZdbfQ0qtns1&t=634450297140000000"></span>
  2. In my custom skin I would much rather not have <img> tags, but instead background image positioning on the container if possible...

For release can you please
  1. Mark the icon types in the iconcontainer elements so I can style accordingly...or at all.  So like "rnTitleBarIcon delete", "rnTitleBarIcon info"
  2. Give me a property to just not render the img tags. One of the other RadControls (RadToolbar?) has a property to enable image sprites or something like that...enablebuttonsprites? Maybe replace it with an empty div or something I can play with without the obnoxious webresource.axd markup...not your fault on that :).

The baked in icons are nice, but are way outside our theme\style guidelines and they shouldn't be forced on us...just lacks the telerik polish.  Although I will greatly compliment whoever made the call to make it DIV based over tablebased (like the RadWindow)...thank you SO MUCH for that foresight.

Steve
Georgi Tunev
Telerik team
 answered on 07 Jul 2011
2 answers
113 views
Hi,

I've noticed an odd problem with the rendering of the radeditor on one of my pages - I've got a set of controls (one of which is a radeditor) in a rad tool tip control, the tool tip control is in a asp update panel.

When the control first loads the rendering of the rad editor is screwed up (see onload.jpg attached), but if you resize the radeditor (using the handle down the bottom right) it corrects the layout (see after resize.jpg).

Any ideas what might cause this?
ian webster
Top achievements
Rank 1
 answered on 07 Jul 2011
3 answers
123 views
Hi,

We've some problems with the RadEditor, with custom scripts we've fixed almost all problems. But one problem we cann't fix, it is a known behavior problem. With dirty HTML the RadEditor will copy new paragraph on each switch between Design and HTML modes, with result a large white gap under texts:

Some dirty HTML here
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;</P>

I know it's important to have clean HTML script but we have about 200 members which 95% don't have some HTML knowledge. 

We've tried the following fixes:

- Disable ConvertToXHTML filter
- NewLineMode to Br
- ContentAreaMode to both modes

This problem don't happens with all of our members, only ones with dirty HTML templates.

I hope you have some ideas.

Very much thanks!

Jelle
Rumen
Telerik team
 answered on 07 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?