Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
188 views

In my page there is a RadGrid having filter functionality enabled.

I am handling the "OnHeaderMenuShowing" event for one of my requirement and its working fine but while trying the "OnFilterMenuShowing" client-side event its not working for me, even the simple method having to show alert message also not being called by this event handler and also without throwing any error.

Please see my code example below :-

    function FilterMenuShowing(sender, eventArgs){
                                    alert('hi');
                                                 }

again this is called at the client-side event like below for the RadGrid :-

    <ClientSettings AllowColumnsReorder="true" AllowColumnHide="true" ColumnsReorderMethod="Reorder">
               <ClientEvents OnGridCreated="ResizeGrid" OnFilterMenuShowing="FilterMenuShowing" />
    </ClientSettings>

Can any body say here if anything missed for it to work ?
OR anything to do more for get it worked ?

Thanks in advance ... :)

Smruti Ranjan
Top achievements
Rank 1
 answered on 04 Apr 2012
1 answer
437 views

I have some client side processing that creates some data then rebinds to a radgrid. I want to show a busy indicator while this is happening. How can i do this? I would also like to use this in other parts of the program where there may not be a grid.

Thanks.
Eyup
Telerik team
 answered on 04 Apr 2012
1 answer
113 views
Hi,

I'm trying to figure out how to hide the edit panel after the user presses entered.  The edit panel is what comes up below the selected row with the update and cancel button.  I just want the postback to occur after the user presses enter to get the row that is currently being worked on.  I'm creating the detail of the record below the grid.   This sounds simple, but I just can't figure it out. Seems like I need to set something to false.

I have the following settings on in Client Settings tag:

<ClientSettings EnablePostBackOnRowClick="true"   Selecting-AllowRowSelect="true" AllowKeyboardNavigation="true" />

Thank you,
 
Eyup
Telerik team
 answered on 04 Apr 2012
3 answers
124 views
I am trying to change the calendar focus month from the code behind when the selected date is not in the current focus month view.  The month changes as expected with the below code but the style of the individual days in the now focused month view still display with the style "OtherMonthDayStyle".  The style of the individual days is updated when the mouse hovers over each day.

Is there a solution for updating the styles immediately?  I have confirmed the same issue in the following broswers:
IE 8.0.6; FF 11.0; Chrome 17.0.X

 

<Telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
          
<Telerik:RadCalendar ID="RadCalendar1" runat="server" AutoPostBack="true" ShowRowHeaders="false" 
EnableMultiSelect="false" OnSelectionChanged="RadCalendar1_SelectionChanged"
</Telerik:RadCalendar>

protected void RadCalendar1_SelectionChanged(object sender, SelectedDatesEventArgs e)
{
   RadCalendar cal = (RadCalendar)sender;
  
   if (cal.SelectedDate.Month != cal.FocusedDate.Month)
      cal.FocusedDate = cal.SelectedDate;
}
Pavlina
Telerik team
 answered on 04 Apr 2012
1 answer
109 views
How to access the dropdownlist value on client side in button click
  <EditFormSettings EditFormType="Template">
<FormTemplate>
                   
                        <asp:DropDownList ID="editDropDown" runat="server">
                            <asp:ListItem Text="Item1"></asp:ListItem>
                            <asp:ListItem Text="Item2"></asp:ListItem>
                            <asp:ListItem Text="Item3"></asp:ListItem>
                        </asp:DropDownList>
                        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                        <asp:Button ID="btn" Text="btn" runat="server" OnClientClick="ddlValue();" />
                    </FormTemplate>
                </EditFormSettings>
Princy
Top achievements
Rank 2
 answered on 04 Apr 2012
3 answers
256 views
I am trying to fill and edit Checkboxlist with values as in the datagrid i combine all those values into one field to show better, long story.  Anyway i need to first populate all teh avialable checkbox list items to choose from, got this done but next I need to hit the database and get the checkboxlist items that are checked already and populate that.  So far unsuccessfull.

Protected Sub myRadGrid_ItemDataBound(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles myRadGrid.ItemDataBound
       If TypeOf e.Item Is GridEditableItem And e.Item.IsInEditMode Then
           Dim Item As GridEditableItem = CType(e.Item, GridEditableItem)
           Dim cbl As CheckBoxList = Item.FindControl("cblReg")
           Dim Id As Integer = e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("intCategoryId")
           'populate the checkboxlist will all avialable items
           sql = "Select COLUMN_NAME from ITSystems.INFORMATION_SCHEMA.COLUMNS where Table_name = 'Drat_Registration' and COLUMN_NAME not like 'int%'"
           myDataTable = New DataTable
           myDataTable = getData(sql)
           cbl.DataSource = myDataTable
           cbl.DataTextField = "COLUMN_NAME"
           cbl.DataValueField = "COLUMN_NAME"
           cbl.DataBind()
           'get the existing items that should be checked when editing
           sql = "Select strFieldName from Drat_regRelation where intCategoryId = " & Id
           myDataTable = New DataTable
           myDataTable = getData(sql)
           For Each row As DataRow In myDataTable.Rows
               For Each Item In cbl.Items
                   If row(0) = cbl.DataValueField Then
                       cbl.SelectedValue = True
                   End If
               Next
           Next
       End If
   End Sub

<telerik:RadGrid ID="myRadGrid" runat="server" Width="100%" BorderWidth="1px" CellPadding="6" GridLines="None" BorderColor="#404040" Skin="Web20">
                                        <MasterTableView AutoGenerateColumns="false" DataKeyNames="Category" Name="MasterGrid" BorderColor="#404040" Font-Size="9" Font-Names="Veranda,arial,sans-serif" 
                                        HeaderStyle-HorizontalAlign="Center" GridLines="Both" BorderWidth="1px"><AlternatingItemStyle BackColor="#B0C4DE" />
                                        <HeaderStyle ForeColor="White" Font-Bold="true" BorderColor="#404040" BorderWidth="1px" />
                                            <Columns>
                                                 <telerik:GridEditCommandColumn UniqueName="EditCommandColumn"></telerik:GridEditCommandColumn>
                                                <telerik:GridBoundColumn DataField="Category" HeaderText="Category" />
                                                <telerik:GridBoundColumn DataField="DataFields" HeaderText="REG DATA" />
                                            </Columns>
                                             <EditFormSettings EditFormType="Template">
                                                <FormTemplate>
                                                    <table width="100%">
                                                        <tr>
                                                            <td style="height:8px"></td>
                                                        </tr>
                                                        <tr>
                                                            <td><b>EDIT DETAILS</b></td>
                                                        </tr>
                                                    </table>
                                                    <table width="100%">
                                                        <tr>
                                                            <td align="left"><asp:CheckBoxList ID="cblReg" runat="server" DataTextField="strCategory" DataValueField="intCategoryId"></asp:CheckBoxList></td>
                                                        </tr>
                                                        <tr>
                                                            <td style="height:5px"></td>
                                                        </tr>
                                                    </table>
                                                    <table width="100%">
                                                        <tr>
                                                            <td>
                                                                <asp:LinkButton ID="lnkSubmit" runat="server" text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "Insert", "Update") %>' 
                                                                CommandName='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "PerformInsert", "Update")%>'></asp:LinkButton>
                                                                      
                                                                <asp:LinkButton ID="lnkCancel" runat="server" CausesValidation="false" CommandName="Cancel" Text="Cancel"></asp:LinkButton>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td style="height:8px"></td>
                                                        </tr>
                                                    </table>
                                                </FormTemplate>
                                            </EditFormSettings>
                                        </MasterTableView>
                                     </telerik:RadGrid>



Kevin
Top achievements
Rank 1
 answered on 04 Apr 2012
5 answers
172 views
hi everyone,

i just noticed 1 thing bout this control.
after my radwindow poped up once the next pop of same radwindow it loose the attributes which i defined..

any kind of help would be appreciated..

thanks in advance

regards
webster
Marin Bratanov
Telerik team
 answered on 04 Apr 2012
1 answer
82 views
Hi,

I hav a RadFilter in a RadWindow being used to filter a RadGrid. The grid can have upto about 80 columns visible in it but generally the users have about 20 at any one time. When the user selects the RadFilter and adds predicate to the filter this works ok, but when the user clicks on the drop down in the filter to select the actual column they want to filter on from the 80 or so potentials, as soon as the mouse moves from hovering over one column to hovering over another we get a javascript error inside the telerik javascript code at line 8900 (while(k.get_level()>0))

The debugger says that k (an object of type RadContextMenu I guess) does not have a method of get_level
if(!m||j==m||$telerik.isDescendant(j,m)){return true;
}if(this._childrenDetached&&$telerik.isDescendant(l.get_parent()._getAnimationContainer(),m)){return true;
}if(this._scroller&&l.get_level()>0&&!$telerik.isDescendant(this.get_element(),m)){var k=l;
while(k.get_level()>0){k=k.get_parent();
}this._onItemMouseOut({eventMapTarget:k.get_element(),eventMapRelatedTarget:m});
}if(l._state==a.RadMenuItemState.Closed||l._state==a.RadMenuItemState.AboutToClose){return true;
}if(l._state==a.RadMenuItemState.AboutToOpen){l._clearTimeout();
l._state=a.RadMenuItemState.Closed;
l.get_parent()._openedItem=null;
return true;
 

The list of columns is obviously implemented as RadContextMenu and because we have so many columns we have made the change mentioned elsewhere in the forum to add AutoScroll and setting the height of area to 300px but I don't suppose this makes any difference.

What can I do to fix this as it makes it impossible for the user to select any column other the first one in the list.

Stuart
Tsvetoslav
Telerik team
 answered on 04 Apr 2012
5 answers
165 views
Hi, 

We have a RadComboBox with an ItemTemplate. If we specify it like this:

            <ItemTemplate>
                <asp:Panel ID="panelMyPanel" runat="server" Height="55px" 
                    Width="100%">
                    <table align="left" cellpadding="2" cellspacing="2" class="style1">
                        <tr>
                            <td width="50%" bgcolor="#990099">
                                <asp:Label ID="Label370" runat="server"   Text="My text></asp:Label>
                            </td>
                            <td width="50%" bgcolor="#9933FF">
                                <asp:Label ID="Label370" runat="server"   Text="My text></asp:Label>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </ItemTemplate>

It will "drift" for each row (no vertical alignment) despite no text being close to long enough to fill the 50% for each column. If we change to:

            <ItemTemplate>
                <asp:Panel ID="panelMyPanel" runat="server" Height="55px" 
                    Width="600px">
                    <table align="left" cellpadding="2" cellspacing="2" class="style1">
                        <tr>
                            <td width="300px" bgcolor="#990099">
                                <asp:Label ID="Label370" runat="server"   Text="My text></asp:Label>
                            </td>
                            <td width="300px" bgcolor="#9933FF">
                                <asp:Label ID="Label370" runat="server"   Text="My text></asp:Label>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </ItemTemplate> 

It will render correctly.

Shouldn't both work and produce the same result? We prefer to specify width in % instead of PX as that will work even if page skin or similar is changed in the future. 
Ivana
Telerik team
 answered on 04 Apr 2012
8 answers
195 views
Hello,

I've successfully converted an asp:ListView with a custom Pager to the RadListView with the RadDataPager.
I've set AllowSEOPaging="true" and SEOPagingQueryPageKey="Page"

My original custom pager created a URL using UrlRewriter to something like this..:

http://www.sitename.com?DepartmentId=1&CategoryId=1&Page=2  to: 
http://www.sitename.com/Dept-Name-d1/Cat-Name-c1/Page-1/

In order to do this, I pass the querystring params to a method and it does the rewriting, in this case a method like:

currentLink.NavigateUrl = UrlClass.LinkToCategory(DepartmentId, CategoryId, PageNumber);

Unfortunately, when using the RadDataPager, it converts the intial Url that is UrlRewriten back to a dynamic one.
I have created the following in the PreRender event of the RadDataPager and tested it with static values and it works.
protected void RadDataPager1_PreRender(object sender, EventArgs e) 
   RadDataPager dataPager = (RadDataPager)lvwProducts.FindControl("RadDataPager1"); 
 
   foreach (Control control in dataPager.Controls) 
   { 
      foreach (Control c in control.Controls) 
      { 
         if (c is HyperLink) 
         { 
            HyperLink currentLink = (HyperLink)c; 
            currentLink.NavigateUrl = UrlClass.LinkToCategory("1""1""2"); // <--- This rewrites properly.
            // TODO: Put Page Command Value into PageNumber parameter.
            currentLink.NavigateUrl = UrlClass.LinkToCategory(DepartmentId, CategoryId, PageNumber); 
         } 
      } 
   } 

My question is how can I access the DataPager commands (First, Last, Previous, Next, etc..) to pass as a parameter for the PageNumber in the above method?

Thank you,
Ronnie
Tsvetina
Telerik team
 answered on 04 Apr 2012
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?