Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
218 views
Hello!

I need to know how to allow users to select one row of a RadGrid at a time (client-side), without having everything de-selected with a click. I've done this server-side, so now I'm trying to do this client side. Here is what I have figured out so far:

I first create an Array() object to hold the unique IDs of the rows that are to stay selected:

var uniqueIdArray = new Array();

Next, I have subscribed to the ClientEvents OnRowSelected and OnRowDeselected events with these functions:

// Add the ID to the array of selected rows.
function ThemeSelected(sender, args) { 
     uniqueIdArray.push(args.getDataKeyValue("IdNo"));
}

// Remove the ID to the array of selected rows.
function ThemeDeselected(sender, args) {
      uniqueIdArray.splice(selThemes.indexOf(args.getDataKeyValue("IdNo")), 1);
 }

Now what I need is a function that would force the rows that are selected to stay selected. The variable "uniqueIdArray" has the items that are selected. But, if I click on another row (to select it), the first thing that is fired is the "deselection" prior to the selection of the new row.

So, how do I cancel deselects when I don't want them?

Thanks!

-Eric
Eric
Top achievements
Rank 1
 answered on 20 May 2013
5 answers
156 views
I am seeing some display issues with the RadComboBox in IE8. I have attached a screen shot.

Is this a known bug, or is there a way I can correct this on my end?
Teo
Top achievements
Rank 1
 answered on 20 May 2013
1 answer
167 views

I make a Website and Post to somee.com, my site is "tinhdamsugia.somee.com".

have a error.

Server Error in '/' Application.

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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server).

Microsoft help me please.
my email: tinhdamsugia@yahoo.com

Danail Vasilev
Telerik team
 answered on 20 May 2013
6 answers
216 views
Hi,
I am using RadButton to cross post a page, NewOrder.aspx, to another page,SaveOrder.aspx. the form is submitted and processed in the target page but the browser stays at the first page.
if i change the RadButton to asp:Button, it works and SaveOrder.aspx is displayed.
here's my markup for the button in NewOrder.aspx that is submitting to SaveOrder.aspx

<telerik:RadButton ID="BtnSubmirOrder" runat="server" ButtonType="StandardButton" AutoPostBack="true"
                Text="Place order" PostBackUrl="SaveOrder.aspx">
 </telerik:RadButton>

in SaveOrder.aspx i have this
protected void Page_Load(object sender, EventArgs e)
    {
        if (PreviousPage==null || !PreviousPage.IsCrossPagePostBack)
            Response.Redirect("~/Default.aspx");
 
        var referencingPage = PreviousPage as NewOrder;
        int id = Int32.Parse(referencingPage.SelectedPublicationId);
 
 
        DateTime neededBy = referencingPage.SelectedOrderDate;
 
        LblSummaryIsbn.Text = referencingPage.SelectedIsbn;
        LblSummaryNbrCopies.Text = referencingPage.NbrOfOrderedCopies;
        DateTime orderDate = DateTime.Now;
        LblSummaryOrderDate.Text = orderDate.ToShortDateString();
        LblSummaryTitle.Text = referencingPage.SelectedPublicationTitle;
        int quantity = Int32.Parse(referencingPage.NbrOfOrderedCopies);
        StockContainer _context = new StockContainer();
        Order newOrder = Order.CreateOrder(orderDate, quantity, neededBy, id);
        _context.Orders.AddObject(newOrder);
        _context.SaveChanges();
    }

basically the user fills an order in NewOrder.aspx and submits it using the RadButton to SaveOrder.aspx where it will be saved . SaveOrder.aspx will return some information back to the user. its Page_Load method executes but the browser stays at NewOrder.aspx. what i am doing wrong? thanks
Danail Vasilev
Telerik team
 answered on 20 May 2013
5 answers
134 views
I have found an issue where the ImageManager preview panel is caching.

This occurs when a new image replaces an old one but the preview still displays the old image.

Due to the way we recognise images on the site where the html is output to we cannot follow this post here which suggests adding a random parameter as it comes out in the RadEditor HTML view.

I have linked out to the external dialogs but I have been unable to find a location where I can change the preview image to contain the parameter in the url and not have an impact on the url returned by the image manager.
Vessy
Telerik team
 answered on 20 May 2013
17 answers
340 views

Hello everyone,

I am currently building a RadGrid that is bound to an empty dataset. In this dataset, a new row will allow a selection of parameters, which will make up a query (eventually).

Each row has two dropdowns, the first one drives the second one's value. Both values are required for the end result.
Currently, when I click "Insert new" it creates the new row, I can select a value from the first dropdown, and it populates the second. When I click "Insert" to store the data, the data stored is the original value of the first dropdown (Unique Name: ObjectName) and the selected (correct value) of Unique Name: CounterName. This problem occurs both on Update and Insert, so I suspect its the same cause.

After trying to look up values, use hash tables, etc---I have not quite figured out what I am doing wrong. Suggestions would be appreciated, I suspect its something small.

Thanks!

<telerik:RadGrid ID="RadGrid1" runat="server" AllowMultiRowEdit="True" EnableViewState="false"
    AutoGenerateEditColumn="True"
    OnNeedDataSource="RadGrid1_NeedDataSource"
    OnUpdateCommand="RadGrid1_UpdateCommand"
    OnInsertCommand="RadGrid1_InsertCommand"
    OnItemDataBound="RadGrid1_ItemDataBound"
    AutoGenerateColumns="False"
    ShowStatusBar="True"
    AllowAutomaticUpdates="False"
    AllowAutomaticInserts="False">
    <ExportSettings>
        <Pdf AllowPrinting="False" />
    </ExportSettings>
    <MasterTableView EditMode="InPlace" CommandItemDisplay="Top" DataKeyNames="ParamID">
        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
        </RowIndicatorColumn>
        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
        </ExpandCollapseColumn>
        <Columns>
            <telerik:GridDropDownColumn HeaderText="Objects" UniqueName="ObjectName" runat="server" DataSourceID="Avail_Objects_ByServer" ListValueField="ObjectName" ListTextField="ObjectName" DataField="ObjectName"  />
            <telerik:GridDropDownColumn HeaderText="Counters" UniqueName="CounterName" runat="server" ListValueField="CounterName" ListTextField="CounterName" DataField="CounterName" />
        </Columns>
        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
        </EditFormSettings>
        <PagerStyle PageSizeControlType="RadComboBox" />
    </MasterTableView>
    <PagerStyle PageSizeControlType="RadComboBox" />
    <FilterMenu EnableImageSprites="False">
    </FilterMenu>
</telerik:RadGrid>

protected void RadGrid1_InsertCommand(object sender, GridCommandEventArgs e)
{
    GridEditableItem editedItem = e.Item as GridEditableItem;
    GridEditManager editMan = editedItem.EditManager;
    DataTable ordersTable = this.GridSource;
    DataRow newRow = ordersTable.NewRow();
 
    newRow["ParamID"] = (int)this.GridSource.Rows.Count + 1;
    foreach (GridColumn column in e.Item.OwnerTableView.RenderColumns)
    {
        if (column is IGridEditableColumn)
        {
            IGridEditableColumn editableCol = (column as IGridEditableColumn);
            if (editableCol.IsEditable)
            {
                IGridColumnEditor editor = editMan.GetColumnEditor(editableCol);
 
                string editorText = "unknown";
                object editorValue = null;
                if (editor is GridDropDownColumnEditor)
                {
                    editorText = (editor as GridDropDownColumnEditor).SelectedText + "; " + 
                     (editor as GridDropDownColumnEditor).SelectedValue; 
 
                    editorValue = (editor as GridDropDownColumnEditor).SelectedValue;
                    newRow[column.UniqueName] = editorValue;
                }
            }
        }
    }
 
     
 
    object Test1 = newRow[0];
    object Test2 = newRow[1];
    object Test3 = newRow[2];
 
    //ordersTable.Rows.Add(newRow);
    this.GridSource.AcceptChanges();
}

Darryl
Top achievements
Rank 1
 answered on 20 May 2013
1 answer
128 views
I have a RadGrid with a GroupByExpressions.

Everything works but when I use the aggregate, it simply doesn't aggregate...

I'm running: Telerik 2013.1.417.45

In attach a screenshot of the grid


Here a excerpt of the GroupByExpression:

 
<GroupByExpressions>
  <telerik:GridGroupByExpression>
    <SelectFields>
         <telerik:GridGroupByField FieldAlias="Institution" FieldName="Institution" HeaderValueSeparator=" : "
              SortOrder="Ascending"></telerik:GridGroupByField>
        <telerik:GridGroupByField FieldName="Value" FieldAlias="Value" HeaderText="Total" Aggregate="Sum" FormatString="{0:N2}" />
    </SelectFields>
   <GroupByFields>
          <telerik:GridGroupByField FieldName="Institution" SortOrder="Ascending"></telerik:GridGroupByField>
     </GroupByFields>
</telerik:GridGroupByExpression>
<telerik:GridGroupByExpression>
 <SelectFields>
        <telerik:GridGroupByField FieldAlias="Year" FieldName="Year" SortOrder="Ascending" FormatString="{0:D}" HeaderValueSeparator=" : "></telerik:GridGroupByField>
   </SelectFields>
    <GroupByFields>
            <telerik:GridGroupByField FieldName="Year" SortOrder="Ascending"></telerik:GridGroupByField>
     </GroupByFields>
   </telerik:GridGroupByExpression>
</GroupByExpressions>











Eyup
Telerik team
 answered on 20 May 2013
5 answers
155 views
Hi,

I have a RadGrid inside a RadWindow. This RadGrid has a Context menu as well. 

When I right click on a grid row the context menu displays behind the RadWindow in Chrome. But in IE and Firefox I don't have this problem.

I have set the z-index to a value more than 7000 as well. 

Have anyone else seen this behaviour before? 

As I mentioned the problem is only with Chrome. 

Thank you.
Lahiru
Top achievements
Rank 1
 answered on 20 May 2013
1 answer
97 views
Hi,

This will be easy for you. I have created a very simple asp.net web page with a few various controls including Telerik dropdownlist and I want all of them to be "decorated" by FormDecorator control. All controls are decorated now except the dropdownlist which looks exactly the same as before "decoration".

<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px" Width="300px">
 
    <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All" DecorationZoneID="zone"  />
    <div id="zone" class="formRow" style="border: 0;">
                <telerik:RadDropDownList ID="RadDropDownList1" runat="server"
        DataSourceID="sqlDS_Culture" DataTextField="LocalizationDesc"
        DataValueField="LocalizationID">
            </telerik:RadDropDownList>
    <asp:SqlDataSource ID="sqlDS_Culture" runat="server"
        ConnectionString="<%$ ConnectionStrings:EStoreConnectionString %>"
        SelectCommand="Localization_Get" SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>
 
         
        <table>
        <telerik:RadListView ID="RadListView1" runat="server" DataKeyNames="ID" ItemPlaceholderID="CityItemsHolder" OnPreRender="RadListView1_PreRender" >
        <LayoutTemplate>
            <telerik:RadTextBox ID="RadTextBox1" runat="server" Text="test">
            </telerik:RadTextBox>
                        <fieldset style="width: 300px;">
                            <legend>Cities</legend>
                            <asp:Panel ID="CityItemsHolder" runat="server">
                            </asp:Panel>
                        </fieldset>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <tr>
                            <td></td>
                            <td style="text-align: left;">
                                <asp:LinkButton ID="lbnDeliveryType2Select" runat="server"><%# eGlobalization.GetGlobalResourceObject("Localization", "DeliveryType_" & CType(Container.DataItem, eDelivery).ID).ToString%></asp:LinkButton>
                            </td>
                            <td style="text-align: right;">
                                <%# FormatPrice(CType(Container.DataItem, eDelivery).Price)%>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <SelectedItemTemplate>
                        <tr>
                            <td>x</td>
                            <td style="text-align: left;">
                                <asp:LinkButton ID="lbnDeliveryType2Select" runat="server"><%# eGlobalization.GetGlobalResourceObject("Localization", "DeliveryType_" & CType(Container.DataItem, eDelivery).ID).ToString%></asp:LinkButton>
                            </td>
                            <td style="text-align: right;">
                                <%# FormatPrice(CType(Container.DataItem, eDelivery).Price)%>
                            </td>
                        </tr>
                    </SelectedItemTemplate>
                    <ItemSeparatorTemplate>
                        <span style="color: Olive; font-weight: bold;">  ::  </span>
                    </ItemSeparatorTemplate>
        </telerik:RadListView>
    </table>
    </div>
    </telerik:RadAjaxPanel>
    </form>
</body>

Thanks for your suggestions,
Radoslav

Bozhidar
Telerik team
 answered on 20 May 2013
1 answer
244 views
Hi,

I have some problem in Text Box with Numeric Rad Input Manager.
When I input value more than 20 digit such as 99999999999999999999, the value that I input is always changed to  100000000000000000. In Rad Input Manager, I set max value to 99999999999999999999. 

I added screenshot for help. Pict IMG-15052013-104957-Edit.png is when I input value and Pict IMG-15052013-105006-Edit.png
is after I input value.  

I just want the value to show correctly to 99999999999999999999 not to 100000000000000000. Can you help me to check this issue ?

Thanks before.
Eyup
Telerik team
 answered on 20 May 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?