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

We use related combos similar to the way it has been shown at the following link.
http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multiplecomboboxes/defaultcs.aspx

We also have RadAjaxManager present on each page.

Now, I initiate javascript call "myCombo.requestItems(text, null)" . This performs perfectly and provide me updated combo.

But part from above process , my other requirement is setting up a hidden field on server side inside myCombo_ItemsRequested(object o , eventargs e) {}. For this I have tried,

1) setting hidden field directly , but when I check its value in javascript function OnClientsideItemsRequested() of same myCombo, then the value is not updated with server change. I also have this hidden field as updated control items of myCombo in
Rad ajax manager.

2) Thinking that this request will only update myCombo and not any other fields / controls. Instead of updating hidden field , I added an attribute to mycombo on server side and then check that attribute on client side. But I was also not able to fetch that attribute too on client side.

Function initiated from : myCombo.requestItems(text, null);
Server side function : myCombo_ItemsRequested(...)
Client side function: myComboOnItemsRequested(...)

Please suggest a way by which I can process any field or same combo in server side and use the updated value on client side.

Let me know if any other info is required.,

Thanks
Simon
Telerik team
 answered on 25 Oct 2010
1 answer
110 views
Problem: Loading of RadAjax is not working.

Scenario: I have two user controls in a Page. On click of button in UserControl1, I am updating the fields in UserControl2 and on click of button in UserControl2, I am populating a grid in Page. There is no MasterPage in this. I am loading this page in IFrame of other page which doesn't have any telerik controls.
Maria Ilieva
Telerik team
 answered on 25 Oct 2010
3 answers
199 views
I have the following Multicolumn Combobox on my page:
<telerik:RadComboBox ID="ddlLineNum" runat="server" DataValueField="all_line_id"
    DataTextField="line_number" Width="250px" Skin="Windows7" HighlightTemplatedItems="True"
    DropDownWidth="290px" AutoPostBack="True">
    <ItemTemplate>
        <table border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td style="width: 75px;">
                    <%#DataBinder.Eval(Container.DataItem, "line_number")%>
                </td>
                <td style="width: 200px; padding-left: 5px;">
                    <%#DataBinder.Eval(Container.DataItem, "line_description")%>
                </td>
            </tr>
        </table>
    </ItemTemplate>
</telerik:RadComboBox>

The 1st column contains a telephone number.  I would like to format it so it actually looks like one.  I figured I could do it in the _ItemDataBound event, but I can't quite figure it out?
Simon
Telerik team
 answered on 25 Oct 2010
11 answers
426 views
I have a RADComboBox thats populated from a database (there are 4 items).  when I select the dropdown, the actual dropdown menu appears at the top of my page and not underneath the combo box.  Can anyone tell me why this should be ?

<telerik:RadComboBox ID="RadComboBoxNarrativeTypes" runat="server"  
                        EnableItemCaching="True" EnableLoadOnDemand="False" 
                        Width="250px" 
                        Skin="Sunset" 
            onselectedindexchanged="RadComboBoxCategories_SelectedIndexChanged" 
            AutoPostBack="True">
                        <CollapseAnimation Duration="200" Type="OutQuint" />
                    </telerik:RadComboBox>    
Simon
Telerik team
 answered on 25 Oct 2010
3 answers
122 views

I'm creating my first Visual Web Part project with Visual Studio 2010 (C#). The purpose of this simple project is to become better aquainted with the RadGrid control. There are basically two parts to it:

1. Add RadGrid control and bind to datasource using C#. The RadGrid has an edit and delete column.

2. Add a RadTextBox control to display the captured content of a specific cell when I click on the update option when editing the record.

Part 1 is pretty straightforward and seems to work fine. Here is the code that I run upon page load:

private void bindGrid(RadGrid grid)
    {
        string qry = "SELECT Recipient, Email FROM Table1";
        SqlConnection conn = new SqlConnection(connection string);
        SqlCommand cmd = new SqlCommand(qry, conn);
        SqlDataAdapter adapter = new SqlDataAdapter(cmd);
        DataTable recipients = new DataTable();
            try
            {
                conn.Open();
                adapter.Fill(recipients);
            }
            catch (Exception ex)
            {
            }
            finally
            {
               grid.DataSource = recipients;
               grid.DataBind();
               conn.Close();
            }
    }

The problem is with part 2. When I click on edit then update I want to capture the value in that row for the column labeled "Recipient".
I try to do this with the following code:

protected void Update_Command(object sender, GridCommandEventArgs e)
  {
       
      if (e.Item is GridDataItem)
      {
          GridDataItem dataItem = e.Item as GridDataItem;
          RadTextBox1.Text = dataItem["recipient"].Text.ToString(); 
      }
      else if (e.Item is GridEditFormItem)
      {
      }
  }

Instead of getting the persons name displayed in the cell, all I get is "&nbsp"; I've tried this several different ways, even using
the NeedDataSource method. The result is always the same.

Out of curiousity I counted the columns in the RadGrid immediately after binding with RadGrid1.columns.count and get 0. So the RadGrid displays the data from the datasource properly on page load, but I can't seem to access any of that data.

I can't figure this out and any guidance would be greatly appreciated.


Tsvetoslav
Telerik team
 answered on 25 Oct 2010
1 answer
151 views
My issue is very similar to the case described in: http://www.telerik.com/community/forums/aspnet-ajax/combobox/2010-1-415-radcombobox-automatic-load-on-demand-broken-after-any-postback.aspx

I have a RadComboBox with LoadOnDemand=true and have implemented the ItemsRequested method in my codebehind. I'm using AutoPostBack=true.

My problem is that after selecting an item (and the postback completes), I see this behaviour:

1) I clicked the arrow to open the combobox
2) The ItemsRequested event fires on the server
3) The combobox opens and shows only the selected item
4) I click elsewhere on the screen to blur the combobox
5) I open the combobox again
6) All the list items appear in the combobox but ItemsRequested wasn't called again.


I'm puzzled why this is happening. If I am trying to open the combobox (after a postback) and this triggers the ItemsRequested event, why do the items not appear in my browser until I re-open the combobox?

Is this a bug in RadComboBox, or is there some client JS I could use to get the items re-populating on a subsequent click? Is there a common use case for RadComboBox using both LoadOnDemand and AutoPostBack, or am I trying to use it in an unintended way?
Simon
Telerik team
 answered on 25 Oct 2010
1 answer
136 views
Hi,

I'm dealing with a scenario where I want to construct a grid with multiple datasets. I.e. One grid control with multiple tables within it (each table with a different datasource).

I return the XML data from Sql Server and load the XML into multiple datasets using the DataSet's ReadXml() function.

Each DataSet in turn gets added to a dictionary with a GUID to reference it back when I need to make changes to a specific dataset.

I was looking at using the GridTableView class but I'm not sure if this will fulfill my needs.

For a quick experiment I tried doing the following:

foreach (KeyValuePair<Guid, DataSet> ds in dataSetCollection)
{
GridTableView gtv = new GridTableView(RadGrid1);
gtv.DataSource = ds.Value; //ds.Value is a DataSet object
gtv.DataBind();
RadGrid1.MasterTableView.DetailTables.Add(gtv);
}

The above doesn't seem to do anything, just a blank grid.

What am I missing here or is there any alternative route I can take to achieve the same?

Thanks for your help.
Tsvetina
Telerik team
 answered on 25 Oct 2010
1 answer
112 views
Hello,
i have a problem that i could not solve by simple adding "position:relative" to the scrollable parent.

I'm using the radSlider inside a grid's FilterTemplate, just like you use in the GRid -> FilterTempalte example on your Demos page.

The difference is that i'm using the :

<Scrolling SaveScrollPosition="true" AllowScroll="true" UseStaticHeaders="true" />

the problem is, of course, with the slider not moving along with the scroll bars of the grid...and actually appear outside the grid fix width and adding horizonal scroll bar to my page.

I added the css class:

 

 

.rgDataDiv { position: relative !important; }

as i noticed the parent scrollable control is a div with the class i mentioned before...and still the same problem within IE7.

I attach the grid control definition :

<telerik:RadGrid ID="gridCases" runat="server" AllowPaging="true" AllowCustomPaging="false" PageSize="30" Width="894px" EnableAjaxSkinRendering="true" GridLines="None" Height="455" AllowSorting="true" style="border-left-style:none !important; border-right-style:none !important; position:relative;">

I attach also the FilterTempalte part of the slider:

<div style="float:left; padding: 5px 7px 0 0;">$0</div>
<div style="float:left;">
    <telerik:RadSlider runat="server" ID="RadSlider1" IsSelectionRangeEnabled="true"
    MinimumValue="0" MaximumValue="1010" SmallChange="5" ShowDecreaseHandle="false"
    ShowIncreaseHandle="false" Width="120px" SelectionStart='<%# startSlider %>'
    SelectionEnd='<%# endSlider %>' OnClientValueChanged="ClientValueChange" OnClientSlideStart="ClientSlideStart"
    OnClientSlideEnd="FreightRangeChanged" />
</div>
<div style="float: left; padding: 5px 0 0 7px">$1000</div>
<div style="clear: both">
    <asp:Literal ID="Literal1" runat="server" Text='<%# "Showing: $" & startSlider & " to $" & endSlider %>' />
</div>

Thank you in advance
Tsvetie
Telerik team
 answered on 25 Oct 2010
2 answers
126 views
One of the fields that I get back from the database has a max length of 200 characters.  I want to only show about 80 characters when in grid view, with an elipsis at the end of the data so that the user knows there is more text.  All the text would be shown when in edit mode.  What would be the best way to accomplish this?  Thanks.
Kathy
Top achievements
Rank 1
 answered on 25 Oct 2010
1 answer
66 views
I am running IE8 and 2010 Q2 of the telerik controls.  I am using a custom skin that is setting properties on the rgHeader element.  According to IE8 developer tools, some properties in my custom skin are being overriden by settings from webresource.axd.

The final style applied to my grid header is .radGrid .rgHeader when it should be .radGrid_SharedList .rgHeader.  Why would this other sytel get applied to my grid instead of just the style from the skin?
Dimo
Telerik team
 answered on 25 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?