Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
281 views

Hi,

               I would like to pop up the context menu when an image (Downward arrow in the screenshot) is left clicked in radgrid. Moreover, options in the context menu and its navigate url will vary for each row in grid. How would you implement such scenario? In all your examples, you just have one context menu for all the rows in grid. How do you dynamically populate the context menu based on some radgrid row data?

 

Thanks,

Prashanth

Radoslav
Telerik team
 answered on 01 Nov 2010
3 answers
256 views
I am having an issue with the following 2 ClientSettings on the RadGrid:

EnablePostBackOnRowClick

 and

EnableRowHoverStyle

.
I am using the code to do a LatePanel on the radgrid so that the page loads and then the radgrid can go out and bind the datasource. This is to give the customer the idea that something is actually loading.
This is working great. My problem occurs on initial page load and the 2 settings above are set to true. After the Grid is populated the grid does not respond to clicks nor does the hoverstyle appear on the rows. However if I then click on the hader column to do a sort or use the filter box and then the grid refreshes...both the row clicking and hoverstyle are enabled.

If I remove the latepanel code the grid functions normally meaning it does the row selecting and hoverstyle right at the get go.

The latepanel code is the exact same that is used in various forum queries found here.

Has anyone run into this issue and know of a way to get these to functions to work?

datagrid code:
<telerik:RadAjaxPanel ID="LatePanel" runat="server" width="100%" height="300px" 
                scrollbars="vertical"  >
                <telerik:RadGrid ID="rgOustandingInv" runat="server"
                    OnNeedDataSource="rgOustandingInv_NeedDataSource" EnableViewState="true"
                    OnItemCommand="rgOustandingInv_ItemCommand" AllowFilteringByColumn="True" AllowSorting="True"
                    PageSize="10" AllowPaging="True" EnableNoRecordsTemplate="true">
                      
                    <MasterTableView Width="100%" CommandItemDisplay="Top" CommandItemSettings-ShowAddNewRecordButton="false" CommandItemSettings-ShowRefreshButton="false"
                    AutoGenerateColumns="false" AllowFilteringByColumn="True" TableLayout="Auto" >
                        <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                        <CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true"
                            ShowExportToCsvButton="true" />
                        <Columns>
                          
                        <telerik:GridBoundColumn FilterControlWidth="105px" DataField="invoiceNo" HeaderText="Invoice No" SortExpression="invoiceNo"
                        UniqueName="invoiceNo" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"/>
                        <telerik:GridBoundColumn FilterControlWidth="105px" DataField="amount" HeaderText="Amount" SortExpression="amount"
                        UniqueName="amount" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"/>
                        <telerik:GridBoundColumn FilterControlWidth="105px" DataField="status" HeaderText="Invoice / Payment Status" SortExpression="status"
                        UniqueName="status" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"/>
                        <telerik:GridDateTimeColumn FilterControlWidth="105px" DataField="schedPayDate" HeaderText="Scheduled Date of Payment" SortExpression="schedPayDate"
                        UniqueName="schedPayDate" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"/>
                        <telerik:GridBoundColumn FilterControlWidth="105px" DataField="contractId" HeaderText="Contract" SortExpression="contractId"
                        UniqueName="contractId" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"/>
                        <telerik:GridBoundColumn FilterControlWidth="105px" DataField="contractRelease" HeaderText="contractRelease" SortExpression="contractRelease"
                        UniqueName="contractRelease" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" Visible="false"/>
                        <telerik:GridBoundColumn FilterControlWidth="105px" DataField="poNo" HeaderText="PO" SortExpression="poNo"
                        UniqueName="poNbr" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"/>
                        <telerik:GridBoundColumn FilterControlWidth="105px" DataField="poRelease" HeaderText="poRelease" SortExpression="poRelease"
                        UniqueName="poRelease" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" Visible="false"/>
                        <telerik:GridBoundColumn FilterControlWidth="105px" DataField="poRevision" HeaderText="PO" SortExpression="poRevision"
                        UniqueName="poRevision" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" Visible="false"/>
  
                        </Columns>
                        <NoRecordsTemplate>
                            <div>There are no records to display</div>
                        </NoRecordsTemplate>
  
                    </MasterTableView>
                    <ClientSettings EnablePostBackOnRowClick="true" EnableRowHoverStyle="true" />
                </telerik:RadGrid>
            </telerik:RadAjaxPanel>

Marin
Telerik team
 answered on 01 Nov 2010
1 answer
85 views
When a users clicks on a row in the datagrid  I need to prompt the user to "OK" or "Cancel" based on certain conditions. If the users select OK I select the row - everything great but if the user selects cancel I cancel the event in the rowselecting event but the current selected row does not stay selected. Any ideas?


Thanks for your help
Som


Marin
Telerik team
 answered on 01 Nov 2010
2 answers
107 views
I have changed the default tooltip of the controls to a Telerik tooltip by adding a RadTooltipManager and set the AutoTooltipify-property to true. This works fine for all controls but the Calendar.
The calendar date tooltips looks good at first showing only the Telerik tooltip. But after changing e.g. the month two tooltips appear when hovering a date - both the default tooltip and the Telerik tooltip.

Any help on how to make only the Telerik tooltip appear would be greatly appreciated!
Jenny
Top achievements
Rank 1
 answered on 01 Nov 2010
1 answer
100 views
I have a RadComboBox within the ItemTemplate of a DetailsView. When using EnableAutomaticLoadOnDemand, all records are initially loaded into the ComboBox. The same ComboBox initially loads no records if I move it outside the DetailsView. Is this a bug with DetailsView? Any known workarounds? I'd rather not use EnableLoadOnDemand and have to code each ComboBox. Code for the offending page is below. There is no code behind for this page.

On edit: looks like updating to the latest version fixed it.
<%@ Page Language="VB" AutoEventWireup="false" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head id="Head1" runat="server">
    <title>Test</title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager2" runat="server" />
        <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataKeyNames="UName" DataSourceID="DetailsViewDataSource">
            <Fields>
                <asp:TemplateField>
                    <ItemTemplate>
                        <telerik:RadComboBox runat="Server" ID="RadComboBox2" EmptyMessage="Select a User" DataSourceID="ComboBoxDataSource" DataValueField="Key" DataTextField="UName" Width="325px" EnableAutomaticLoadOnDemand="true" ItemsPerRequest="10" ShowMoreResultsBox="True" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Fields>
        </asp:DetailsView>
         <asp:SqlDataSource ID="ComboBoxDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:MyConnectionString %>" ProviderName="System.Data.SqlClient" SelectCommand="Select UName, Key From User" >
             </asp:SqlDataSource>
        <asp:SqlDataSource ID="DetailsViewDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:MyConnectionString %>" ProviderName="System.Data.SqlClient" SelectCommand="SELECT UName From User WHERE Key = 1" >
             </asp:SqlDataSource>
    </form>
</body>
</html>
Kalina
Telerik team
 answered on 01 Nov 2010
1 answer
101 views
Hi, I have a small client-side problem, the thing is that I have a Radlistview and inside the Item template I have a ImageButton, I want to find the row datakeyvalue when I click the imagebutton on client side, I know how to do this on the server side, I was just wandering, how could I accomplish this on the client side. thx for the time. bye  
Radoslav
Telerik team
 answered on 01 Nov 2010
1 answer
105 views
Why, when exporting groups to Excel XML, does Telerik attach a semicolon to the end of the group name, and how do I remove this?
Daniel
Telerik team
 answered on 01 Nov 2010
5 answers
294 views
Is it possible to remove the RadDock from particular Zone from server side.
I have to dynamically load the raddocks oninit depending upon the profile of current User,
I have some link buttons on the page of different users, so I have to updated RadDocs depending upon the selection.
I tried but either it is not updating.
Pero
Telerik team
 answered on 01 Nov 2010
2 answers
81 views
1st timer... New "B" lol,  just started learning C# 3 moths ago and using telerik for the 1st time... really cool components and lots of fun... not knowing (yet) how it all works I have the following that is close to working as I'd like but need to 'ForceDataReload(AchRadGridView)'
from a 'tabStrip1.SelectedTab' :)

So far I have a mess where it goes like this...

protected void TabSelected(object sender, EventArgs e)
  {
       
      if (tabStrip1.SelectedTab == Tab1)
      {
          Session["SessionData-AchFilter"] = "ALL";
          tabStrip1.SelectedIndex = 0;
 
      }
 
 
      if (tabStrip1.SelectedTab == Tab2)
      {
          Session["SessionData-AchFilter"] = "NOT";
          tabStrip1.SelectedIndex = 1;
           
      }
 
 
      if (tabStrip1.SelectedTab == Tab3)
      {
          Session["SessionData-AchFilter"] = "APP";
          tabStrip1.SelectedIndex = 2;
        
      }
 
 
      if (tabStrip1.SelectedTab == Tab4)
      {
          Session["SessionData-AchFilter"] = "UNA";
          tabStrip1.SelectedIndex = 3;
      
      }
 
 
      if (tabStrip1.SelectedTab == Tab5)
      {
          Session["SessionData-AchFilter"] = "REJ";
          tabStrip1.SelectedIndex = 4;
 
      }
       
        
  }

The above seems to work to show my "selected" tab on each click and assuming my session parm is being set... when I add this to it my "grid" does not update...

if (tabStrip1.SelectedTab == Tab1)
   {
       Session["SessionData-AchFilter"] = "ALL";
       tabStrip1.SelectedIndex = 0;
       ForceDataReload(AchRadGridView);
   }

The 'ForceDataReload(AchRadGridView);' worked when I was doing the same desired "refresh" on a basic button:
//protected void ALL_Click1(object sender, EventArgs e)
//{
//    if (Globals.Page.IsValid)
//    {
 
 
//        Session["SessionData-AchFilter"] = "ALL";
 
 
//        ForceDataReload(AchRadGridView);
 
//    }
//}
So I started looking at maybe a "TabClick" but cannot figure out the syntax or proper use to achieve the same effect as the button; that is when the button was clicked the grid used the new assigned parm "All" as a filter in the "fill" to give me a new list in my grid and I want to do it with the good looking telerik tab strip :)

Sorry if long winded... and if I am making no sense..
Barry
Top achievements
Rank 1
 answered on 01 Nov 2010
1 answer
269 views
Here my combo box:

<

 

 

telerik:RadComboBox ID="rcbItemName" runat="server" AllowCustomText="True" CausesValidation="False" MarkFirstMatch="True" />

 



I am allowing the customer type in the itemname.  If the itemname exist it mark the first match.     That works good. 
I also what the customer to be able to enter a itemname that is not in the dropdown list.  That works good.

Is there a way for the dropdown box to close once the itemname does not match anything in the drop down list?  I look at the demo and it does not close when an item is not match.

Thanks,
David
Kalina
Telerik team
 answered on 01 Nov 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?