Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
2.0K+ views
I have spent the couple days researching my issue and have not been able to get it to work correctly.  There are a few topics on StackOverflow that are related to this issue and reading them has helped me but I'm at a bit of a roadblock and would appreciate a push in the right direction.

I wrote a small .NET 3.5 VB.NET web application for a client that allows users to maintain some data.  I'm using the RadGrid and RadComboBox controls and it consists of 3 pages.  One requirement I was not completely fond of was that the user wanted to make all of her changes then hit a save button at the end instead of saving back to the DB each time she applied her changes to the grid.  

I'm using an session object to store a collection of objects on each page and want to prompt the user with a dialog if they attempt to change the value of a dropdown or leave the page when there are pending actions.  After a lot of research here and in other places, I decided to create a hidden field on the page and update its value each time the action collection is updated on the server side.  Then I want to evaluate that value and if it's greater than 0, I want to prompt the user to save changes.

My function:

    <telerik:RadCodeBlock ID="RadCodeBlock2" runat="server"><br>
        <script type="text/javascript"><br>
            window.onbeforeunload = confirmExit;<br>
            function confirmExit()<br>
            {<br>
                var actionCount = $get('<%=ActionCounterField.ClientID %>').value;<br>
                if (actionCount > 0) {<br>
                    alert("Pending Changes!");<br>
                      }<br>
                }<br>
    <br>
            </script><br>
        </telerik:RadCodeBlock>



My hidden field declaration:

    <asp:HiddenField id="ActionCounterField" runat="server" />


My server side code:
<br>
    Protected Sub UpdateActionCount()<br>
<br>
        ActionCounterField.Value = GoalCategoryActionList.Count<br>
<br>
    End Sub<br>


When I debug the application and add a record to my grid, the server side code is executed correctly.  I have also verified that the hidden control is found by the javascript function.  What I haven't been able to figure out, though, is why the hidden field value is not found by the function.

Any help is greatly appreciated.  Thank you!

Craig
Top achievements
Rank 1
 answered on 18 Jun 2013
0 answers
102 views
i need to show or hide radlistbox title depending on radgrid.selectedvalue is null or not i can show or hide the radlistbox but when i do that the title stills there even if radlistbox is hidden, may i have to activate any option on listbox?
Troika
Top achievements
Rank 1
 asked on 18 Jun 2013
2 answers
714 views
I am trying to replace the arrow image on the ComboBox control to match the rest of the page I am working on.  I am able to do this for the most part.  However, it appears as though the original white triangle remains no matter what.  I have tried the following CSS rules, and have not had any success.  I have attached both an image of the problem and the original image I am using for the background.  I need to get rid of the extraneous white arrow.  Any help would be appreciated.!
Here are the CSS rules I have tried:

div.RadComboBox_SST_Touch .rcbArrowCell {
    width: 26px!important;
    min-width: 26px!important;
    height: 100%!important;
    min-height: 100%!important;
    background: url('ComboBox/bc-arrow.gif')!important;
    background-image: url('ComboBox/bc-arrow.gif')!important;
    background-color: #ffffff;
    color: #000000;
    font-family: Arial, Helvetica, sans-serif;
    background-size: cover!important;
    background-repeat: no-repeat;
    background-position: left;
    background-position-x: center;
    background-position-y: center;
}
 
 div.RadComboBox_SST_Touch table td.rcbArrowCell {
    width: 26px!important;
    min-width: 26px!important;
    height: 100%!important;
    min-height: 100%!important;
    background: url('ComboBox/bc-arrow.gif')!important;
    background-image: url('ComboBox/bc-arrow.gif')!important;
    background-color: #ffffff;
    color: #000000;
    font-family: Arial, Helvetica, sans-serif;
    background-size: cover!important;
    background-repeat: no-repeat;
    background-position: left;
    background-position-x: center;
    background-position-y: center;
}
 
 div.RadComboBox_SST_Touch table td.rcbArrowCellRight {
    width: 26px!important;
    min-width: 26px!important;
    height: 100%!important;
    min-height: 100%!important;
    background: url('ComboBox/bc-arrow.gif')!important;
    background-image: url('ComboBox/bc-arrow.gif')!important;
    background-color: #ffffff;
    color: #000000;
    font-family: Arial, Helvetica, sans-serif;
    background-size: cover!important;
    background-repeat: no-repeat;
    background-position: left;
    background-position-x: center;
    background-position-y: center;
}
Brian
Top achievements
Rank 1
 answered on 18 Jun 2013
6 answers
546 views

In asp.net Telerik ,Is it possible multiple selection of RadListBoxItem using clicking and dragging the Mouse only .only its possible when we press 'shif' or 'ctrl' key and try to click and dragging using mouse.

sample code for Multiple selection:

<telerik:RadListBox SelectionMode="Multiple" ID="RadListBox1" runat="server">

<Items>

<telerik:RadListBoxItem runat="server" Value="Sample1" Text="Sample1" />

<telerik:RadListBoxItem runat="server" Value="Sample2" Text="Sample2" />

<telerik:RadListBoxItem runat="server" Value="Sample3" Text="Sample3" />

</Items>

</telerik:RadListBox>


Please suggest  some solution or  work around  for this issue  along with providing some sample code also.
Any help will be great appreaciated.

EZECHIAS
Top achievements
Rank 1
 answered on 18 Jun 2013
4 answers
1.0K+ views
I know this is probably a very basic question but I am fairly new to asp.net and very new to the Telerik controls.

I have a basic page with a text box and button and I want to fill a RadGrid with data from a sql query when the button is clicked using the data that is typed into the textbox as a variable for my query. When I put my query into the form load event and prepopulate the textbox the query works and the grid is populated. When I try the same code in the click event of the button I don't get any data in the grid. Do I need to call a refresh of the control or something? 
Jason
Top achievements
Rank 1
 answered on 18 Jun 2013
5 answers
193 views
Hello,
I'm using radEditor in my ASP.net application but i want to set view path of ImageManager runtime.
My Images directory is on differnt server so I created virtual directory in my application which is pointing to that server,
I have differnt images for each user so there are one folder per user. so i want to display user specific images to particular user. As do not want to see all images uploaded by  other user.

Can anybody help me to find solution for this issue.

Thanks in Advance,
Sandeep
 
Ivaylo
Telerik team
 answered on 18 Jun 2013
5 answers
156 views

Hi!
 I'm using RadTreeView and RadListBox. I have an usual requierement considering the  scenario i have in the left side a RadTreeView incorporated inside the RadlistBox and in the right side i have the RadListBox. I have two issues :
1 - My issue is that how can i select one or more element on the RadTreeView and copy them inside the RadListBox?
2 - There's a way  to select a node with a relative child why the node is clicked?
Can you please give me some reply
Thanks

My jsp 
<td>
    <asp:Panel ID="pnlDealers" runat="server">
        <telerik:RadListBox ID="rlbDealer" runat="server" Height="200" Width="250" AllowTransfer="true"
                            ButtonSettings-Position="Right" ButtonSettings-TransferButtons="All"
                            TransferMode="Copy" SelectionMode="Multiple" TransferToID="rlbDealers"
                            AutoPostBackOnTransfer="true" CausesValidation="false">
            <ItemTemplate>
                <div>
                    <telerik:RadTreeView ID="rtvDealersAvailable" runat="server" OnLoad="rtvDealersAvailable_Load"
                                         OnNodeClick="rtvDealersAvailable_NodeClick">
                    </telerik:RadTreeView>
                </div>
            </ItemTemplate>
            <Items>
                <telerik:RadListBoxItem />
            </Items>
        </telerik:RadListBox>
        <telerik:RadListBox ID="rlbDealers" runat="server" SelectionMode="Multiple" Height="200" Width="250">
        </telerik:RadListBox>
    </asp:Panel>
</td>

Colince
Top achievements
Rank 1
 answered on 18 Jun 2013
6 answers
376 views
I've got a RadGrid with group by by two fields and subtotals shown in the group by  footers. The grouping is by Strategy and then by Manager. However, the out-of-the-box group footer display is a bit confusing because it's unclear whether the footer is for Strategy or for Manager (1st level group of 2nd level group). Please see the attached pic on how it is displayed currently.

 1) I need the footer to clarify what is the subtotal for like follows:
>Strategy: [StrategyName]
  >Manager: [ManagerName1]
.............row.........................
.............row........................
..............row.......................
>Number of portfolios for manager [ManagerNames1] : 3 Total TNA: $100
> Manager: [ManagerName2]
  ...............row.....................
...............row.....................
>Number of portfolios for manager [ManagerNames2] 2: Total TNA: $200
>Number of portfolios for strategy [StrategyName]  5 Total TNA: $500

I looked at your group footer templates, but couldn't figure out how to get what I need from the samples or documentation. 

2) Another issue is that my "Total TNA" in the footer displays just the amount, but the words "Total TNA" are not displayed.

Here is the mark-up:
<telerik:RadGrid runat="server" ID="TrackersRadGrid" OnNeedDataSource="TrackersRadGrid_NeedDataSource"
           AutoGenerateColumns="False" CellSpacing="0" GridLines="None" ShowFooter="true">
           <MasterTableView ShowGroupFooter="true">
               <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
               <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
               </RowIndicatorColumn>
               <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
               </ExpandCollapseColumn>
               <Columns>
                   <telerik:GridBoundColumn DataField="Strategy" HeaderText="Strategy" />
                   <telerik:GridBoundColumn DataField="PortfolioNumber" UniqueName="PortfolioNumber"
                       Aggregate="Count" FooterText="Number of Porfolios: " HeaderText="Portfolio Number">
                       <ItemStyle CssClass="portfolioNumber" />
                   </telerik:GridBoundColumn>
                   <telerik:GridHyperLinkColumn DataNavigateUrlFields="PortfolioNumber" UniqueName="PortfolioName"
                       HeaderText="Portfolio Name" AllowFiltering="false" DataNavigateUrlFormatString="./equitygrid/tracker.aspx?portfolio={0}"
                       DataTextField="PortfolioName">
                   </telerik:GridHyperLinkColumn>
                   <telerik:GridBoundColumn DataField="TNA" DataFormatString="{0:c}" UniqueName="TNA"
                       Aggregate="Sum" FooterText="Total TNA: " HeaderText="TNA" >
                       <ItemStyle CssClass="numeric tna" />
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="InternationalRevenuePercent" HeaderText="Intl %"
                       UniqueName="InternationalRevenuePercent">
                       <ItemStyle CssClass="numeric intlRevPct" />
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="InternationalRevenue" HeaderText="International Assests"
                       UniqueName="InternationalRevenue">
                       <ItemStyle CssClass="numeric intlRev" />
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="PortfolioManagers" HeaderText="Managers" UniqueName="PortfolioManagers">
                       <ItemStyle CssClass="portfolioManagers" />
                   </telerik:GridBoundColumn>
               </Columns>
               <GroupByExpressions>
                   <telerik:GridGroupByExpression>
                       <GroupByFields>
                           <telerik:GridGroupByField FieldAlias="Strategy" FieldName="Strategy" />
                       </GroupByFields>
                       <SelectFields>
                           <telerik:GridGroupByField FieldAlias="Strategy" FieldName="Strategy" />
                       </SelectFields>
                   </telerik:GridGroupByExpression>
                   <telerik:GridGroupByExpression>
                       <GroupByFields>
                           <telerik:GridGroupByField FieldAlias="PortfolioManagers" FieldName="PortfolioManagers" />
                       </GroupByFields>
                       <SelectFields>
                           <telerik:GridGroupByField FieldAlias="PortfolioManagers" FieldName="PortfolioManagers"
                               FormatString="" HeaderText="Manager" />
                       </SelectFields>
                   </telerik:GridGroupByExpression>
               </GroupByExpressions>
               <EditFormSettings>
                   <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                   </EditColumn>
               </EditFormSettings>
           </MasterTableView>
           <FilterMenu EnableImageSprites="False">
           </FilterMenu>
       </telerik:RadGrid>


Thanks,
Alex
D
Top achievements
Rank 1
 answered on 18 Jun 2013
2 answers
72 views
Hi,
The vb.net code that you post at the following URL, has many errors in it.

http://www.telerik.com/help/aspnet-ajax/grid-saving-settings-on-per-user-basis.html

Most of them are easy to correct, but I don't really know what to do with the following section of code.  VS.NET shows many errors for it:
Private Sub Grid_ColumnCreated(ByVal sender As ObjectByVal e As GridColumnCreatedEventArgs)  
Dim settings As ColumnSettings = Settings.AutoGeneratedColumnSettings.Find(Function([set] As ColumnSettings) Do
Return [set].UniqueName = e.Column.UniqueName  End Function)
Dim column As GridColumn = e.Column  
If not (settings is NothingThen   
SetColumnSettings(column, settings)  
End If
End Sub

Thanks,
Brent
Maria Ilieva
Telerik team
 answered on 18 Jun 2013
1 answer
67 views
We have a page with a grid-details format. Grid at the top, each row with a Select button and a detail form below the grid. When you select a row, the details are loaded below.  The page also has a btnSave and btnAddNew. Each record has some detail fields as well as a document field.  In the details area, there is a dropdown list that causes a postback, so we set the PostbackTrigger of the document control is currently set to "btnSave" so that if the user selects a document and then toggles the dropdown, the uploaded document won't be lost. However, the problem is that if a user uploads a document and then realizes they are in the wrong record, if the select a new record from the grid, the document field still maintains the previously uploaded document.  

What we need is a way to force a reset of the dropdown control on the server-side? Is that possible?
Plamen
Telerik team
 answered on 18 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?