Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
101 views
I have a "Grouped" grid and I want to capture some events.

I have the following code setup to try and capture the events(OnGroupCollapsing, OnGroupExpanding, OnGroupCollapsed, OnGroupExpanded) and not one of them is getting captured.

Am I missing something....seems these events should work like every other event.



 
            function onGroupCollapsing(sender, eventArgs) 
            { 
                eventArgs.set_cancel(true); 
            } 
             
            function onGroupExpanding(sender, eventArgs) 
            { 
                eventArgs.set_cancel(true); 
            } 
             
            function test(sender, eventArgs) 
            {  
                alert("event fired"); 
            } 
 

                    <ClientSettings ReorderColumnsOnClient="false" AllowDragToGroup="false" AllowExpandCollapse="true" AllowGroupExpandCollapse="true"   AllowRowsDragDrop="true" AllowColumnsReorder="false" > 
                        <Selecting AllowRowSelect="true" EnableDragToSelectRows="false"></Selecting> 
                        <ClientEvents OnRowDropping="onRowDropping" OnRowDragStarted="onRowDragStarted" OnGroupCollapsing="onGroupCollapsing" OnGroupExpanding="onGroupExpanding" OnGroupCollapsed="test" OnGroupExpanded="test"  /> 
                    </ClientSettings> 

                    <ClientSettings ReorderColumnsOnClient="false" AllowDragToGroup="false" AllowExpandCollapse="true" AllowGroupExpandCollapse="true"   AllowRowsDragDrop="true" AllowColumnsReorder="false" > 
                        <Selecting AllowRowSelect="true" EnableDragToSelectRows="false"></Selecting> 
                        <ClientEvents OnRowDropping="onRowDropping" OnRowDragStarted="onRowDragStarted" OnGroupCollapsing="onGroupCollapsing" OnGroupExpanding="onGroupExpanding" OnGroupCollapsed="test" OnGroupExpanded="test"  /> 
                    </ClientSettings> 



Vlad
Telerik team
 answered on 20 Aug 2009
5 answers
151 views
Hello,
My client wants to use the Rad Input Mask for the phone textbox on a form on our site. This is great for new customers filling out the form. However when populating the text box with phone numbers previously entered the Rad Input Mask does not work well because the phone numbers are written with and without the () - and spaces.
What should I do?

thanks
Pavel
Telerik team
 answered on 20 Aug 2009
2 answers
157 views
Hello,

I've a problem with (as I suppose) data binding to dynamically generated grid.
Below you will find events fired when I try to edit item in grid (InPlace).
Columns in grid are dynamically generated - bacically there are 2 types of columns:
- dictionary: GridDropDownColumn (working ok)
- numeric: GridNumericColumn (cause of problems)
Grid could have multiple columns of both types depending on the underlying business object.

Problem is: when I click edit on grid item the editors are not showing.

Here is a events trace which are raised:

// loading a page 

Page_Init
GenerateDefinitionColumns
CreateColumnForVariable: Dictionary 1
CreateColumnForVariable: Numeric 1
rgDefinitionItems_NeedDataSource
rgDefinitionItems_CreateColumnEditor: Creating column editor for column: IN1
rgDefinitionItems_ItemDataBound: Binding item in view mode
rgDefinitionItems_ItemDataBound: Binding item in view mode

// here I've clicked edit button on grid

Page_Init after postback
rgDefinitionItems_CreateColumnEditor: Creating column editor for column: IN1
rgDefinitionItems_ItemCommand: Command name: Edit
rgDefinitionItems_NeedDataSource
rgDefinitionItems_ItemDataBound: Binding item in edit mode
rgDefinitionItems_CreateColumnEditor: Creating column editor for column: OUT2

In attached sample project you could methods GetCellValue & SetValueToCell 
responsible for geting and setting value into cell (in both view and edit mode).

If you remove from those methods "if (dataItem[columnUniqueName].Controls.Count > 0)"
you will see my problem - the editor control for numeric column is not created yet :(

Source code for this problem can be downloaded from dropbox:
http://dl.getdropbox.com/u/1495591/RadGridDataBindingProblem.zip

Any ideas what's wrong ?
Veli
Telerik team
 answered on 20 Aug 2009
1 answer
146 views
hi ,

i have a textbox with password mode. is it possible to set emptymessage for this?

thanks.
Shinu
Top achievements
Rank 2
 answered on 20 Aug 2009
1 answer
161 views
Hello,

I am using a Modal RadWindow popup on page 'A' that opens with the 'radopen' javascript method.  The window pops up (page 'B'), then some processing is done to the query string, and the RadWindow is immediately re-directed to page 'C'.  Page C is not a part of our site.

The intent is that the user does some things on Page C, then closes the window, then some event happens back on Page A.  When the RadWindow is redirected to page C, everything seems to be working.  The problem happens if the user clicks a link on page C to page 'D' (also not part of our site).  When this happens, it looks like the entire Browser is re-directed, rather than just the RadWindow.  So we effectively lose page A entirely, and we no longer have a radWindow.  We are left with only page D in our browser window.

We have no control over Page C or its mechanism for performing re-direction.  We just want whatever happens on Page C to stay on Page C and not redirect the entire browser page.  Is this possible?  And if not, are there any good alternatives?

Thanks.
Georgi Tunev
Telerik team
 answered on 20 Aug 2009
1 answer
88 views
Hi Ail,,

i am using telerik 2009.20 version ajax aspnet toolkit..

i have a gridview which is binded via dataset at Runtime in Need Datasource Event of RadGrid. with this binding i am binding two checkboxes also based on some condition.. and these two columns are taken as template columns.. i want to search the grid like if a user has selected one checkbox and presses ENTER key, he must see the grid that has only checked values corresponding to the checkbox.

Please help ASAP.

Thanks



Shinu
Top achievements
Rank 2
 answered on 20 Aug 2009
1 answer
96 views
Hi,

I have a TabStrip with 2 tabs. On each tab, there is a refresh button, and a RadGrid. When you hit the refresh button on the tab, it will do the following: (retrieves data + re-binds to grid)

  function bLoadPrices_OnClientClick(sender,args){
            QTXClient.WebServices.MonitorWebService.GetMonitorData(bLoadPrices_Complete,bLoadPrices_Error);
        }
        
         function bLoadPrices_Complete(result){
            var tableView = $find("<%= gMonitor.ClientID %>").get_masterTableView();
            tableView.set_dataSource(result);
            tableView.dataBind(); 
        }
        function bLoadPrices_Error(result){
            window.alert("Error! " + result);
        }

The problem I am having is that when I rebind the data on 1 grid, it clears all data from the other grid. I don't understand why re-binding one grid will cause the other grid to refresh? 

Please help!


thanks,
sharon

elmosi
Top achievements
Rank 2
 answered on 20 Aug 2009
2 answers
191 views
hi,

i have a radgrid in my aspx page. The default sorting is not working.

below is the code

in aspx

<

 

telerik:RadGrid ID="rgPParts" DataSourceID="dsParts" Width="675px" Height='<%# SetHeight() %>'

 

 

AutoGenerateColumns="False" GridLines="None" AllowPaging="True" PageSize="30"

 

 

runat="server" CellPadding="0" OnItemDataBound="rgPParts_ItemDataBound" OnSelectedIndexChanged="rgPParts_SelectedIndexChanged"

 

 

Skin="" EnableEmbeddedSkins="False" ImagesPath="~\Images\Grid\" CssClass="grid"

 

 

OnPreRender="rgPParts_PreRender" AllowSorting="True" OnPageIndexChanged="rgPParts_PageIndexChanged">

 

 

<PagerStyle Position="Bottom" Mode="NextPrevAndNumeric" PagerTextFormat="{4} Showing {2}-{3} of {5}"

 

 

CssClass="gridpager" />

 

 

<MasterTableView AllowPaging="true" DataKeyNames="SkuId">

 

 

 

<HeaderStyle CssClass="gridheaderstyle"></HeaderStyle>

 

 

<Columns>

 

 

<telerik:GridBoundColumn HeaderText="PN" DataField="PartNumber">

 

 

<HeaderStyle Width="80px"></HeaderStyle>

 

 

<ItemStyle Width="80px"></ItemStyle>

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="DESC" DataField="Description">

 

 

<HeaderStyle Width="108px"></HeaderStyle>

 

 

<ItemStyle Width="108px"></ItemStyle>

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="CD" DataField="Condition">

 

 

<HeaderStyle Width="30px"></HeaderStyle>

 

 

<ItemStyle Width="30px"></ItemStyle>

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="WH" DataField="WarehouseId" AllowSorting="false">

 

 

<HeaderStyle Width="60px"></HeaderStyle>

 

 

<ItemStyle Width="60px"></ItemStyle>

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="Q" DataField="Quantity">

 

 

<HeaderStyle Width="60px"></HeaderStyle>

 

 

<ItemStyle Width="60px"></ItemStyle>

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="QA" DataField="QuantityAvailable">

 

 

<HeaderStyle Width="60px"></HeaderStyle>

 

 

<ItemStyle Width="60px"></ItemStyle>

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="CST" DataField="AverageCostPrice" AllowSorting="false">

 

 

<HeaderStyle Width="60px"></HeaderStyle>

 

 

<ItemStyle Width="60px"></ItemStyle>

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="LST" DataField="ListPrice" AllowSorting="false">

 

 

<HeaderStyle Width="60px"></HeaderStyle>

 

 

<ItemStyle Width="60px"></ItemStyle>

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="WS" DataField="WholesalePrice" AllowSorting="false">

 

 

<HeaderStyle Width="60px"></HeaderStyle>

 

 

<ItemStyle Width="60px"></ItemStyle>

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="RT" DataField="RetailPrice" AllowSorting="false">

 

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridTemplateColumn HeaderText="" Visible="False">

 

 

<ItemTemplate>

 

 

<asp:Label ID="lblType" runat="server" Text='<%# Bind("InventoryType") %>' Visible="false">

 

 

</asp:Label>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

<SelectedItemStyle BackColor="#FFFFCC" />

 

 

<ClientSettings EnablePostBackOnRowClick="true">

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="true" ScrollHeight="260" />

 

 

<Selecting AllowRowSelect="true" />

 

 

</ClientSettings>

 

 

<SortingSettings SortToolTip="" />

 

 

<ActiveItemStyle BackColor="#FFFFCC" />

 

 

<CommandItemStyle BorderColor="White" HorizontalAlign="Right" />

 

 

</telerik:RadGrid>

 

<

 

csla:CslaDataSource ID="dsParts" runat="server" TypeName="Cis.Cims.Library.Vendor"

 

 

 

 

 

TypeSupportsPaging="false" TypeSupportsSorting="true" OnSelectObject="dsParts_SelectObject">

 

 

 

 

 

</csla:CslaDataSource>

in Codebehind

 

 

protected void dsParts_SelectObject(object sender, Csla.Web.SelectObjectArgs e)

 

{

 

try

 

 

 

 

{

 

if (Page.IsPostBack)

 

{

e.BusinessObject = GetParts();

}

}

 

catch (Exception ex)

 

{

lblSystemMessage.Text = ex.Message;

}

}

 

private

 

InventoryInfoList GetParts()

 

{

 

InventoryInfoList invenInfoList = SessionHelper.SessionBusinessObjectsInfo.InventoryInfoListBusinessObject;

 

 

try

 

 

 

 

 

{

 

 

if (invenInfoList == null)

 

{

 

rgPParts.CurrentPageIndex = 0;

 

 

 

 

 

 

 

 

string PCategory = ClassificationMenu1.ClassificationText;

 

 

if (PCategory.ToUpper() == "ALL")

 

{

PCategory =

"";

 

}

 

 

 

 

 

invenInfoList =

InventoryInfoList.GetPartsBySearch(ddlVendor.SelectedValue, txtPartNumber.Text.Trim(), GlobalHelper.ReplaceEscapeChars(txtKeywords.Text.Trim()), Convert.ToInt32(ddlCondition.SelectedValue.Trim()), PCategory);

 

 

SessionHelper.SessionBusinessObjectsInfo.InventoryInfoListBusinessObject = invenInfoList;

 

 

 

 

 

}

 

catch (Exception ex)

 

{

 

throw ex;

 

}

 

return invenInfoList;

 

}

i dont know where i have made mistake any help on this will be greatly appreciated.

Prakash
Top achievements
Rank 1
 answered on 20 Aug 2009
2 answers
126 views
 I believe Telerik should correct this issue. You should be able to click a row without it affecting the rest of the other rows.

If the row clicked is already selected, the it should deselect that row (only), and vice versa, if it's deselected already then it should select that row only.

I CAN'T STAND IT when I have selected 20 rows and then when I accidently click outside a checkbox, I loose all my selections. I have the following radgrid, please show me if there is a way, how to achieve this. I already tried the ToggleSelection.js solution, but I get alot of errors because it was not designed for Heirarchy Grid.

 

<telerik:RadGrid ID="rgChildObjects" AllowMultiRowSelection="true" AutoGenerateColumns="false" Width="295px" runat="server">

 

 

 

<MasterTableView HierarchyDefaultExpanded="false" HierarchyLoadMode="client" Name="ChildObjects" DataKeyNames="ReportingChildObjectID">

 

 

 

<DetailTables>

 

 

 

<telerik:GridTableView Name="Columns" Width="100%" ShowHeader="true" DataKeyNames="ReportingColumnID">

 

 

 

<Columns>

 

 

 

<telerik:GridClientSelectColumn />

 

 

 

<telerik:GridBoundColumn HeaderStyle-Font-Bold="true" itemstyle-wrap="false" UniqueName="DefaultDescription" DataField="DefaultDescription" HeaderText="Child Report Column(s)" />

 

 

 

</Columns>

 

 

 

</telerik:GridTableView>

 

 

 

</DetailTables>

 

 

 

<Columns>

 

 

 

<telerik:GridBoundColumn ItemStyle-font-bold="true" HeaderStyle-Font-Bold="true" HeaderStyle-wrap="false" UniqueName="ChildObjectName" DataField="ChildObjectName" HeaderText="Child Reports" />

 

 

 

</Columns>

 

 

 

</MasterTableView>

 

 

 

<ClientSettings AllowExpandCollapse="true">

 

 

 

 

<Selecting EnableDragToSelectRows="false" AllowRowSelect="true" />

 

 

 

</ClientSettings>

 

 

 

</telerik:RadGrid>

Felipe Saldana
Top achievements
Rank 1
 answered on 19 Aug 2009
2 answers
148 views
I have read over the existing documentation and searched in the forums but I cannot seem to find a solution

I have a RadGrid that is using the "GroupBy" functionality. I just want to drag and drop a grid item from one group to another.

I capture the OnRowDropping event and this is working fine.
Inside this event I want to retrieve the corresponding DataKey value from the underlying grid so that I can perform a look up and verify that the dragged row is going into a different group.

Does anyone know how to retrieve the DataKey value from the underlying grid for both the target and the dragged item?

I have tried this
http://www.telerik.com/help/aspnet-ajax/grdextractkeyvaluesclientside.html



                    var targetIndex = args.get_targetItemIndexHierarchical(); 
 
                    var targetListingId = $find("ctl00_contentMember_subscriberList_gridList_ctl00").get_dataItems()[targetIndex]; 
 

but targetListingId.getDataKeyValue("subscriberListId") is null.


Any help is appreciated.

Felipe




Felipe Saldana
Top achievements
Rank 1
 answered on 19 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?