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

Can anyone help me on my below query:

I want to display "RadGrid" in "RadTabStrip" which will be in "RadPane" of "RadSplitter" control.
i have done this but i cant see the Grids in "RadTab".
Please provide me the proper code.

Thanks and Regards,
Simon.
Dobromir
Telerik team
 answered on 07 Nov 2011
1 answer
125 views
Hi All,
I am using RadSplitter and it contents RadPane. I want to show loading image during pane's page load.I read the artile-
http://demos.telerik.com/aspnet-ajax/splitter/examples/showcontentduringload/defaultcs.aspx
and it works fine, but I have a concern In my case the size of pane is very large and RadSplitter don't have any scroll bar but page have, so the loading image  appear very down of the page. Can we set the position of that loading image of pane on top portion of RadPane.
Thanks..
Dobromir
Telerik team
 answered on 07 Nov 2011
1 answer
121 views
Hi all,

In my code behind I'm setting a string behaviour for the items in my grid in the radgrid item created event.  I want to be able to the following client side in jscript.

TextBox txtBox = (TextBox)dataItem.FindControl("rtbDIN");
              TextBoxSetting stringSetting = (TextBoxSetting)RadInputManager1.GetSettingByBehaviorID("StringBehavior");
              stringSetting.TargetControls.Add(new TargetInput(txtBox.UniqueID, true));

Any ideas / input ?

Thanks,
Jim
Jim
Top achievements
Rank 1
 answered on 07 Nov 2011
2 answers
166 views
I've got a combobox that I want to place focus into the box and have it ready for a person to enter in the next item after they hit the add button. So, the person starts typing the item information, and it finds the match in the drop down, they hit tab and enter to add the item, and the focus then needs to go back to the textbox for them to enter the next item. However, I don't want to clear out the entry of the combobox.

Originally, I was calling combo.focus in the code behind. That seems to set the focus correctly, but it could place the cursor at the beginning or the end and doesn't select all the text for them to be able to simply start typing again. I've resorted to use this code instead:

ajxManager.ResponseScripts.Add("$find('" & cboFrom.ClientID & "').get_inputDomElement().focus();$find('" & cboFrom.ClientID & "').selectText(0, $find('" & cboFrom.ClientID & "').get_text().length);")

It appears to be working, but I just want to know if there is a better method for doing this or if what I have is the best route to go down.

Thanks,
Adam
Ivana
Telerik team
 answered on 07 Nov 2011
2 answers
52 views
Hello,

I am very new to Telerik. So I apologize if this is a silly question... but, I have been looking at the forum and I am unable to find the right solution for my problem. I need to display a list of documents in a grid that is coming from DataSource1(DS1). Once the user selects a row in edit mode (He may choose to change an original field or not...), I need to insert or update the row in another DataSource2(DS2). I was able to successfully display the list from DS1 and bring the edit mode. In the code behind, I wrote an updateCommand method where I would take the editable values and send them to my store procedure in DS2. The issue I am facing is. I am not able to retrieve the field I modify on my form. It is retirving the original one displayed from DS1. How do I retrieve the value I modified on the screen and send it to my code behind? Bellow a snnipets of my code.

<

 

 

telerik:RadGrid ID="RadGrid1" GridLines="None" runat="server" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" PageSize="10"

 

 

 

AllowAutomaticUpdates="True" AllowPaging="True" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" OnUpdateCommand="RadGrid1_UpdateCommand"

 

 

 

OnDataBound="RadGrid1_DataBound">

 


....

<

 

 

asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:GCOM %>"

 

 

 

ProviderName="System.Data.OracleClient" SelectCommand="Select * from GA_DOC D, GA_DOC_Evidence E, GA_Evidence Ev

 

where D.DOC_ID = E.DOC_ID (+)

and E.EVIDENCE_ID = Ev.EVIDENCE_ID (+)

and LIVE_DATE is not null

and ARCHIVE_DATE is null

and DOC_TYPE_ID = 3"

 

 

OldValuesParameterFormatString="original_{0}" ConflictDetection="CompareAllValues">

 


....

protected

 

 

void RadGrid1_UpdateCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)

 

{

 

 

GridEditableItem item = (GridEditableItem)e.Item;

 

 

 

String documentId = item.GetDataKeyValue("DOC_ID").ToString();

 

 

 

String title = item.GetDataKeyValue("TITLE").ToString();

 

 

 

String price = item.GetDataKeyValue("SALE_PRICE").ToString();

 

 

 

SqlConnection conn = null;

 

 

 

SqlDataReader rdr = null;

 

conn =

 

new SqlConnection(ConfigurationManager.ConnectionStrings["FTPFactoryConnStr"].ConnectionString);

 

 

 

try

 

{

 

 

//Open the connection and save data on Application's SQL DB.

 

conn.Open();

 

 

SqlCommand cmd = new SqlCommand(ConfigurationManager.AppSettings["ADDCONTROLFILE"].ToString(), conn);

 

cmd.CommandType =

 

CommandType.StoredProcedure;

 

cmd.Parameters.Add(

 

new SqlParameter("@FTPAction", "N"));

 

cmd.Parameters.Add(

 

new SqlParameter("@ExpirationDate", new DateTime(DateTime.Now.Ticks + 2).ToString("yyyyMMdd")));

 

cmd.Parameters.Add(

 

new SqlParameter("@ResearchId", Convert.ToInt32(documentId)));

 

cmd.Parameters.Add(

 

new SqlParameter("@Ticker", "abc"));

 

cmd.Parameters.Add(

 

new SqlParameter("@PPVDocumentPrice", price));

 





Thank you!
Mariella.  
Mariella
Top achievements
Rank 1
 answered on 07 Nov 2011
1 answer
93 views
I'm trying to set up a 'lazy spool', background-cache type system in a very large menu which loads its items from a webservice.
when a menu item opens (and populates its items from a webservice), I'd like to catch the Populated event for that item, and iterate the loaded items and force a populate on them in the background.

I thought calling get_items() would initiate the webservice call - but it doesn't seem to. Open is the only thing which seems to start the webservice request.

Is this technically possible?

function TelerikMenu_OnClientItemPopulated(sender, eventArgs) {
        var items = eventArgs.get_item().get_items();
        for (var i = 0; i < items.get_count(); i++) {
            var item = items.getItem(i);
            if (item != null) {
                item.get_items();
            }
        }
 
}
Andrew
Top achievements
Rank 1
 answered on 07 Nov 2011
2 answers
109 views
I have a grid that looks roughly like this:
<telerik:RadGrid ID="grdItem" runat="server" secure="Estimate" AutoGenerateColumns="false" OnItemCreated="grdItem_ItemCreated" mapping="TEST" errorImageField="imgGridError" errorTextField="txtGridError" OnDataBound="grdItem_DataBound">
<MasterTableView>
<SortExpressions>
<telerik:GridSortExpression FieldName="ITEM_NUM" SortOrder="Descending" />
</SortExpressions>
<Columns>
<telerik:GridTemplateColumn HeaderText="BOGUS_HEADER" UniqueName="Item_QuantityHeader" SortExpression="Item_QuantityHeader" ItemStyle-Width="50">
<ItemTemplate>
                                &nbsp;
                                </ItemTemplate>
</telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="BOGUS_HEADER" UniqueName="Item_UnitPriceHeader" SortExpression="Item_UnitPriceHeader" ItemStyle-Width="100">
                        <ItemTemplate>
                                        &nbsp;
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>

I am adding text boxes to columns in the code behind like this:

protected void grdItem_ItemCreated(object sender, GridItemEventArgs e)
{
    try
    {
        if (e.Item.DataItem != null && e.Item is GridDataItem)
        {
            CE_ESTIMATE_ITEM tempDataItem = (CE_ESTIMATE_ITEM)e.Item.DataItem;
            GridDataItem tempItem = (GridDataItem)e.Item;
            TextBox quantityBox = new TextBox();
            quantityBox.TextChanged += new System.EventHandler(quantityChanged);
            quantityBox.AutoPostBack = true;
            quantityBox.Width = 50;
            quantityBox.Style.Add("text-align", "right");
            quantityBox.Text = Convert.ToString(tempDataItem.QUANTITY);
            quantityBox.TabIndex = tabOrder++;
            tempItem["Item_QuantityHeader"].Controls.Add(quantityBox);
            quantityBox.Attributes.Add("onchange", "javascript:alert('Got a change')");
            ajaMain.AjaxSettings.Add(new AjaxSetting(quantityBox.UniqueID));


            TextBox unitPriceBox = new TextBox();
            unitPriceBox.TextChanged += new System.EventHandler(quantityChanged);
            unitPriceBox.AutoPostBack = true;
            unitPriceBox.Width = 100;
            unitPriceBox.Style.Add("text-align", "right");
            unitPriceBox.Text = Convert.ToString(tempDataItem.UNIT_PRICE);
            unitPriceBox.TabIndex = tabOrder++;
            tempItem["Item_UnitPriceHeader"].Controls.Add(unitPriceBox);
            ajaMain.AjaxSettings.Add(new AjaxSetting(unitPriceBox.UniqueID));
        }
    }
    catch (Exception ex)
    {
        Debug.WriteLine(ex.Message);
        Debug.WriteLine(ex.StackTrace);
        Gadgets.writeLogEntry(ex.Message, 0);
        Gadgets.writeLogEntry(ex.StackTrace, 0);
        Response.Redirect("../General/Error.aspx");
    }
}

The text boxes are created,as expected, but no matter what I try, I can't get the TextChanged call to be an AJAX call; it always functions as a postback.  The postback causes these text boxes to disappear and even if they weren't dynamically created but rather, were created in ASPX, the tab order would be lost.

I have tried using an AjaxManager, as you see here, and enclosing the entire RadGrid in a RadAjaxPanel; neither attempt worked.

My RadAjaxManagerASPX looks like this:

    <telerik:RadAjaxManager ID="ajaMain" runat="server" DefaultLoadingPanelID="pnlAjaxLoading"> 
        <AjaxSettings> 
          <telerik:AjaxSetting AjaxControlID="grdItem"> 
            <UpdatedControls> 
              <telerik:AjaxUpdatedControl ControlID="grdItem" LoadingPanelID="pnlAjaxLoading"> </telerik:AjaxUpdatedControl>
              <telerik:AjaxUpdatedControl ControlID="ajaMain" LoadingPanelID="pnlAjaxLoading"> </telerik:AjaxUpdatedControl>
            </UpdatedControls> 
          </telerik:AjaxSetting>
          <telerik:AjaxSetting AjaxControlID="ajaMain"> 
            <UpdatedControls> 
              <telerik:AjaxUpdatedControl ControlID="grdItem" LoadingPanelID="pnlAjaxLoading"> </telerik:AjaxUpdatedControl>
              <telerik:AjaxUpdatedControl ControlID="ajaMain" LoadingPanelID="pnlAjaxLoading"> </telerik:AjaxUpdatedControl>
            </UpdatedControls> 
          </telerik:AjaxSetting>
        </AjaxSettings> 
      </telerik:RadAjaxManager>
      <telerik:RadAjaxLoadingPanel ID="pnlAjaxLoading" runat="server" Visible="false"/>

Any help or hints you can provide would be great.  I would much rather not have to code my own XMLHTTPRequest calls.
Tsvetina
Telerik team
 answered on 07 Nov 2011
9 answers
495 views
RadDatePicker is not displaying the popup image at page post back only text is displaying in Google Chrome but its working in FireFox.
 RadDatePicker is used in a page inherited from master page.
Andrey
Telerik team
 answered on 07 Nov 2011
1 answer
131 views
We are currently using RadControls for ASP.NET (not AJAX) Q1 2009, and upgrading is not yet feasible. We are trying to make the following charts more legible by using IntelligentLabelsEnabled, but the firs chart (all.png) seems to create and infinite loop when using it and the second does not show all datapoints. Is there anything that can be done aside from upgrading?
Evgenia
Telerik team
 answered on 07 Nov 2011
1 answer
108 views
Hi all,

I want to cal aspx page while double clicking to create new appointment.
I tried to cal aspx page in "AppontmentCreated" event. But failed.
so, plz help me.

Thanx in advance.
Plamen
Telerik team
 answered on 07 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?