Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
163 views
Hi,

    I have a master page which  has RadAjaxManager. In content Page (page1.aspx), I am loading the user control 1 dynamically. The user control 1 has a grid . I am using external edit form to update/add/delete data inside the grid, which is included in another user control 2. The user control2 also gets loaded dynamically.

Everything is working fine. But when I try to go to Page1 to Page-2 and try to select an item in page-2, the selected item inside the grid is not changing . Still the selected item is the Item I selected in Page1.

I use a session variable to store the selectedItem and update it in "RadGrid1_SelectedIndexChanged" event.

Any idea why it is happening?

Thanks!

Yavor
Telerik team
 answered on 13 Apr 2010
2 answers
226 views
I have a web explorer
when i click on an image file it is opening a pop up (radwindow) to preview this image

the popup is not re sizable
how can I set it
Hamdy
Top achievements
Rank 1
 answered on 13 Apr 2010
6 answers
428 views

I’ve been trying to set focus on a DropdownList input cell in a Popup edit form.  I tried putting code on the ItemDataBound event without much luck.  
I was wondering if using the “Grid / PopUp Edit Form” http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/popupeditform/defaultcs.aspx example someone could show me how to set focus on the “Title Of Courtesy” dropdown field when in edit mode.   At the very least I’d like to see how to set focus on the Popup Edit form itself.  Thanks.

Martin
Telerik team
 answered on 13 Apr 2010
2 answers
168 views
Hi, All

Can I make Header with two rows

and merge two cells?

Like

Header #1 Header #2 Header #3
Header #1_1 Header #1_2 Header #2_1 Header #3_1 Header #3_2
Item 1_1 Item 1_2 Item 1_3 Item 1_4 Item 1_5
Item 1_1 Item 1_2 Item 1_3 Item 1_4 Item 1_5
Item 1_1 Item 1_2 Item 1_3 Item 1_4 Item 1_5
Item 1_1 Item 1_2 Item 1_3 Item 1_4 Item 1_5
Item 1_1 Item 1_2 Item 1_3 Item 1_4 Item 1_5
Item 1_1 Item 1_2 Item 1_3 Item 1_4 Item 1_5
Item 1_1 Item 1_2 Item 1_3 Item 1_4 Item 1_5
Item 1_1 Item 1_2 Item 1_3 Item 1_4 Item 1_5
Item 1_1 Item 1_2 Item 1_3 Item 1_4 Item 1_5


If you help me I'll be very happy

Thank you
Yoon-Ho Choi
Top achievements
Rank 1
 answered on 13 Apr 2010
0 answers
71 views

Hi

Question about JsonSerialization.
I saw that for the RadTreeVieNode API: node.set_checked(...); the code is:

set_checked:function(_b4,e){
 
this._check(_b4,e);
if(this.get_treeView()){
this.get_treeView()._updateCheckedState();
}
}

 
_updateCheckedState:function(){
this._checkedNodesJson=Sys.Serialization.JavaScriptSerializer.serialize(this._clientState.checkedNodes); // line XXX
this.updateClientState();
}

Now profiling the loop

var cnt = treeNodes.get_count();
for(var i = 0; i < cnt; i++) {
var node = treeNodes.getNode(i);
if (node.get_checked() != checkOrUncheck) {
node.set_checked(checkOrUncheck);
}

I see that > 95% of time we sit in _serializeWithBuilder(...) function. It's called from the line XXX.
Now, I do not need to have this. Since all the operations with RadTreeView i do on client side using client API.
There should be a possibility to disable Jsonization of nodes in the RadTree so I ll get much more performant API.

Pls assist.

Thx
Gani

Gani
Top achievements
Rank 1
 asked on 13 Apr 2010
4 answers
205 views
Hello, I have a challenge invloving a grid that is nested underneath a panelbal that is, in turn inside a multiview.  I am using the PopUp Edit functionality with the Edit Template nested inside the MasterTableView. 

To access the Edit Form from this grid, I am using the AutoGenerated edit button.  Upon clicking the button, after the AjaxLoadpanel fires and the page is re-rendered the Edit Template appears as a Modal PopUp, as required.

The challenge comes in the ItemCommand event handler for the grid, after making a change in the Edit form, and clicking the button that I have designated for Updating the necessary objects and sending off to the database.  I am not using a SqlDataSource. I am running the MVP architecture (not MS MVC) and all of the necessary postback actions happen as required. 

Here is the page with the necessary parts:
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">  
    <telerik:RadSplitter ID="RadSplitter1" runat="server" Width="100%" Height="100%" 
        ResizeMode="EndPane" Skin="Default" Font-Size="Large" BorderStyle="None">  
        <telerik:RadSplitBar ID="RadSplitBar2" runat="server"  CollapseMode="Forward" /> 
        <telerik:RadPane ID="rdpFollowData" runat="server" Scrolling="Y" Height="590px">  
               <telerik:RadTabStrip ID="tbFollowData" runat="server" 
                MultiPageID="rdmultFollowup" SelectedIndex="0"   
                Width="100%" AutoPostBack="False" > 
                <tabs> 
                    <telerik:RadTab PageViewID="rpvSeller" Text="Seller Details">  
                    </telerik:RadTab> 
                </tabs> 
            </telerik:RadTabStrip> 
            <telerik:RadMultiPage ID="rdmultFollowup" runat="server" SelectedIndex="0" Width="100%">  
                  <telerik:RadPageView ID="rpvSeller" runat="server">  
                    <telerik:RadPanelBar ID="rpbSeller" runat="server" Skin="Default"   
                        Style="float:left" Width="100%">  
                        <Items> 
                            <telerik:RadPanelItem ImagePosition="Right" Text="General">  
                                <Items> 
                                    <telerik:RadPanelItem Value="General" runat="server">  
                                        <ItemTemplate> 
                                            <asp:Button ID="btnAddOwner" runat="server" Text="Add Seller" /><br /> 
                                            <telerik:RadGrid ID="rgSeller" runat="server" AutoGenerateColumns="False" AutoGenerateEditColumn="true" GridLines="None" OnDataBound="rgSeller_DataBound" OnItemDataBound="rgSeller_ItemDataBound" OnNeedDataSource="rgSeller_NeedDataSource" OnItemCommand="rgSeller_ItemCommand" EditItemStyle-Width="300px">  
                                                <ClientSettings> 
                                                    <ClientEvents OnRowDblClick="RowDblClick" /> 
                                                </ClientSettings> 
                                                <MasterTableView Height="100%" Width="50%" EditMode="PopUp" > 
                                                    <EditFormSettings CaptionFormatString="Edit User: {0}" CaptionDataField="UserID" EditFormType="Template" PopUpSettings-Modal="true">  
                                                        <FormTemplate> 
                                                            <table id="editForm" width="400px">  
                                                                <tr> 
                                                                    <td align="left">  
                                                                        First Name:&nbsp;&nbsp;<asp:TextBox ID="txtFirstname" runat="server" Text='<%# Bind("FirstName") %>'></asp:TextBox> 
                                                                    </td> 
                                                                </tr> 
                                                                <tr> 
                                                                    <td align="left">  
                                                                        Last Name :&nbsp;&nbsp;<asp:TextBox ID="txtLastname" runat="server" Text='<%# Bind("LastName") %>'></asp:TextBox> 
                                                                    </td> 
                                                                </tr> 
                                                                <tr> 
                                                                    <td align="left" colspan="3">  
                                                                        Mailing Address :&nbsp;&nbsp;<asp:TextBox ID="txtAddress" Width="250px" runat="server" 
                                                                            Text='<%# Bind("MailAddress") %>' />,  
                                                                        <asp:TextBox ID="txtCity" Width="250px" runat="server" Text='<%# Bind("MailCity") %>' />,  
                                                                        <asp:TextBox ID="txtState" Width="25px" runat="server" Text='<%# Bind("MailState") %>' />,  
                                                                        <asp:TextBox ID="txtZip" Width="50px" runat="server" Text='<%# Bind("MailZip") %>' /> 
                                                                    </td> 
                                                                </tr> 
                                                                <tr> 
                                                                    <td align="left">  
                                                                        <telerik:RadGrid ID="rgPhones" runat="server" Skin="Default" > 
                                                                            <MasterTableView GridLines="Horizontal" Frame="Void" NoMasterRecordsText="No Phone Numbers Listed" 
                                                                                AutoGenerateColumns="false" Width="100%">  
                                                                                <Columns> 
                                                                                    <telerik:GridBoundColumn DataField="PhoneID" Visible="false" /> 
                                                                                    <%--<telerik:GridButtonColumn ButtonType="LinkButton" Text="Delete" />--%> 
                                                                                    <telerik:GridBoundColumn HeaderText="Phone Number" DataField="Phone" /> 
                                                                                </Columns> 
                                                                            </MasterTableView> 
                                                                        </telerik:RadGrid> 
                                                                        <asp:Button ID="btnAddUserPhone" runat="server" Text="Add Phone" /> 
                                                                    </td> 
                                                                </tr> 
                                                                <tr> 
                                                                    <td align="left">  
                                                                        Username :&nbsp;&nbsp;<asp:TextBox ID="txtUsername" runat="server" Text='<%# Bind("UserName")%>'></asp:TextBox> 
                                                                    </td> 
                                                                </tr> 
                                                                <tr> 
                                                                    <td colspan="3" align="left">  
                                                                        Email :&nbsp;&nbsp;<asp:TextBox ID="txtEmail" runat="server" Text='<%# Bind("Email") %>'></asp:TextBox> 
                                                                    </td> 
                                                                </tr> 
                                                                <tr> 
                                                                    <td colspan="3" align="right">  
                                                                        <asp:Button ID="btnResetPassword" runat="server" Text="Reset Password" CommandName="ResetPassword" /> 
                                                                        <asp:Button ID="btnUpdateUser" runat="server" Text="Update" CommandName="UpdateUser"/>  
                                                                        <asp:Button ID="btnCanc" runat="server" Text="Cancel" CommandName="Cancel"/>  
                                                                    </td> 
                                                                </tr> 
                                                            </table> 
                                                        </FormTemplate> 
                                                    </EditFormSettings> 
                                                    <Columns> 
                                                        <telerik:GridBoundColumn DataField="UserID" Visible="false"/>  
                                                        <telerik:GridBoundColumn DataField="FirstName" HeaderText="FirstName" EditFormColumnIndex="0"/>  
                                                        <telerik:GridBoundColumn DataField="LastName" HeaderText="FirstName" EditFormColumnIndex="0"/>  
                                                    </Columns> 
                                                </MasterTableView> 
                                            </telerik:RadGrid> 
                   </ItemTemplate> 
                                      
                                    </telerik:RadPanelItem> 
                                </Items> 
                              
                            </telerik:RadPanelItem> 
</Items> 
              
                    </telerik:RadPanelBar> 
                </telerik:RadPageView> 
        </telerik:RadPane> 
    </telerik:RadSplitter> 
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">  
 
        <script type="text/javascript">  
            function RowDblClick(sender, eventArgs) {  
                sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());  
            }  
        </script> 
 
    </telerik:RadCodeBlock> 
</asp:Content>    
My apologies for the alignment, and missing tags :/

Here is the code to populate the grid:
private void ShowSellerData(List<Users> sellers, List<PhoneNumbers> phones)  
{  
    RadPanelItem pnl = rpbSeller.FindItemByValue("General");  
    RadGrid grid = pnl.FindControl("rgSeller") as RadGrid;  
    grid.DataSource = sellers;  
    grid.DataBind();  
 
    //some other ancilliary methods  
} 


Here is the code for the ItemCommand Handler method of the grid:
protected void rgSeller_ItemCommand(object source, GridCommandEventArgs e)  
{  
   switch (e.CommandName)  
   {  
        case "UpdateUser":  
             string fn, ln, addr, city, st, zip, unm, email;  
             GridDataItem item = e.Item as GridDataItem;  
             GridEditFormItem editor = item.EditFormItem;  
 
             int uid = 0;  
             TextBox txt = editor.FindControl("txtFirstname") as TextBox;  
             fn = txt.Text;  
 
             txt = editor.FindControl("txtLastname") as TextBox;  
             ln = txt.Text;  
 
             txt = editor.FindControl("txtAddress") as TextBox;  
             addr = txt.Text;  
 
             txt = editor.FindControl("txtCity") as TextBox;  
             city = txt.Text;  
 
             txt = editor.FindControl("txtState") as TextBox;  
             st = txt.Text;  
 
             txt = editor.FindControl("txtZip") as TextBox;  
             zip = txt.Text;  
 
             txt = editor.FindControl("txtUsername") as TextBox;  
             unm = txt.Text;  
 
             txt = editor.FindControl("txtEmail") as TextBox;  
             email = txt.Text;  
 
             Presenter.UpdateUser(uid, fn, ln, addr, city, st, zip, unm, email);  
             RadGrid grid = e.Item.Parent as RadGrid;  
             grid.Rebind();  
             rgAction.Rebind();  
             break;  
       case "Cancel":  
       default:  
         break;  
   }  
} 
Everything LOOKS correct, and actually provides access to the necessary controls in the template.  However, if I change anything in the Edit form, that edits are not available to me on the postback.  Any Suggestions?
Andrew
Top achievements
Rank 2
 answered on 13 Apr 2010
1 answer
74 views
how can I display the context menu when user left clicks a node? Thanks.
Tim McKnight
Top achievements
Rank 1
 answered on 13 Apr 2010
1 answer
183 views
I am using GridBinaryImageColumn in RadGrid.
In IE8 I get broken image sign if there is no data for this particular row.
Is there any built-in solution to avoid this ?
Jacob
Top achievements
Rank 1
 answered on 13 Apr 2010
1 answer
211 views
on my radgrid I have a template column with a databound label. there is also a radtooltip control for this label.
when I mouse over the headertext the mouse curser becomes a hand shape and i get a popup saying "Click here to sort"
when i mouse over the rest of the header column area the course turns into a cross and i get a popup sayihng "Drag to group or reorder"
Where is my tooltip text? Is there a way to show the tooltip text instead of the default message?
thanks in advance
Daniel
Telerik team
 answered on 12 Apr 2010
9 answers
293 views
Does anyone have a way to make cells in a row have a unique color based on having a particular value?  It is "Conditional Formatting" only for a single cell versus an entire row.  Each row could have multiple occuranges of this value and I'd like to change each of these cells to yellow.  Ideas?  Not an entire column or an entire row......just individual cells.

Thanks in advance.
Doug
Brian Azzi
Top achievements
Rank 2
 answered on 12 Apr 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?