Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
117 views
Hi, I'm using a radgrid inside my application and I would like to open a new window when I double-clicked a row to show more info about that "item". 

 I'll appreciate your help in advance
Daniel
Shinu
Top achievements
Rank 2
 answered on 01 Jul 2009
1 answer
94 views
Hi:
I need some means to notify my parent page that the RadWindow has returned and the data has changed, so that I may reload the data.
Any suggestions?
Phil
Horton ... were here ...
Phil
Top achievements
Rank 2
 answered on 01 Jul 2009
4 answers
186 views
situation like this:
http://p13.freep.cn/p.aspx?u=v20_p13_p_0906291432043261_0.jpg


In main page (sharepoint, used masterpage, page1) , webpart (yellow zone) loads another page (page2).

page2 popup a  radwindow (page3).

Will this radwindow (page3) be block in the webpart zone (yellow zone)? or can be moved out of this zone?

And this radwindow (page3) will popup in screen center? or in yellow zone center?

I try popup window from a page which only used masterpage,  good effects! But sharepoint+masterpage+webparts, I don't know.

Thanks.
Airad
Top achievements
Rank 1
 answered on 01 Jul 2009
4 answers
217 views
I created a usercontrol that contains an enabled load on demand radcombobox.
<div>
<telerik:RadComboBox ShowMoreResultsBox="true" EnableLoadOnDemand="True" EnableVirtualScrolling="true" 
                //set other properties >
                </telerik:RadComboBox>
            </div>

This usercontrol uses to edit data on a radgrid same as your sample.

<telerik:RadGrid //set properties >
            <MasterTableView //set properties >
                <Columns>
                    //My Columns....
                </Columns>

                <EditFormSettings UserControlName="sampleUserControl.ascx" EditFormType="WebUserControl">
                    <EditColumn UniqueName="EditCommandColumn1">
                    </EditColumn>
                </EditFormSettings>
            </MasterTableView>
        </telerik:RadGrid>

when click on combobox on grid, I get "The target xxx$radcombox1' for the callback could not be found or did not implement ICallbackEventHandler."
please help me to solve it.
tparus
Top achievements
Rank 1
 answered on 30 Jun 2009
1 answer
257 views
Hi

I have a page where dinamically load a usercontrol when a menu item is clicked:

Protected

 

Sub menu_MenuItemClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles Tabs.MenuItemClick

 

 

 

Dim

 

ucName As String = ""

 

Select

 

Case menuTabs.SelectedValue

 

 

Case "A"

 

ucName =

"~/UserControlA.ascx"

 

 

Case "B"

 

ucName =

"~/UserControlB.ascx"

 

 

End Select

 

 

 

'phCurrentUC is a placeholder control

 

phCurrentUC.Controls.Clear()

 

If Not String.IsNullOrEmpty(ucName) Then

 

 

 

 

 

 

Dim ucToLoad As Control = LoadControl(ucName)

 

phCurrentUC.Controls.Add(ucToLoad)

 

 

End If

 

 

 

End Sub

 


In both usercontrol there is a RadComboBox with EnableLoadOnDemand set to true.

 

When click on combobox, I get "The target xxx$radcombox1' for the callback could not be found or did not implement ICallbackEventHandler."
Both usercontrol work great if are defined statically in the page.
Please could you help me to solve it?

Cristian
tparus
Top achievements
Rank 1
 answered on 30 Jun 2009
0 answers
204 views
I'm having trouble changing the background colors for alternating rows. (Or the regular rows too I guess)

I have tried:

<ItemStyle BackColor="Black" ForeColor="Red" />
<AlternatingItemStyle BackColor="White" />

and

tr.GridAltRow_Default 
{ 
 color: Black; 
 background-color: White; 
 background-image: none; 
} 

The ForeColor properties work fine, so I know that some part of it is working, but nothing I do changes the background color. What am I doing wrong?

Edit: We're using the Q3 2008 RadGrid release

Edit 2: Never mind. I figured this out. Another developer had coded some colors directly into the cs file.
Andy
Top achievements
Rank 1
 asked on 30 Jun 2009
3 answers
234 views
Hello,

I have a radcombobox with an ItemTemplate that contains a checkbox and a label.

                                <telerik:RadComboBox ID="cbM0016" runat="server"  
                                    EmptyMessage="Select Branch" HighlightTemplatedItems="true" 
                                    AllowCustomText="true" Enabled="false" Skin="Outlook" Width="100%" > 
                                    <ItemTemplate> 
                                        <asp:CheckBox runat="server" ID="chk1" Checked="true" onclick="onCheckBoxClickM0016(this)"/> 
                                        <asp:Label runat="server" ID="lbl1" Text='<%#DataBinder.Eval(Container.DataItem, "BranchNameAndID")%>'/> 
                                    </ItemTemplate> 
                                </telerik:RadComboBox> 
 


One of the checkboxes (the "ALL" checkbox) will trigger all other checkboxes to be checked and store all the associated values as a comma delimited string.  This is being done in the javascript.  The problem I'm having is that occasionally my values are not being posted back to the server.  

Repro steps are:  
Load the form (default selection works fine)
Unselelct several checkboxes and submit the form (works fine)
Select the "ALL" checkbox (form does not submit the updated values)

I have added alerts in the javascript that show that the values are being set on the client side.  Here is that code...

function onCheckBoxClickM0016(sender) { 
            var combo = $find("<%= cbM0016.ClientID %>"); 
            //holds the text of all checked items 
            var text = ""; 
            //holds the values of all checked items 
            var values = ""; 
            //get the collection of all items 
            var items = combo.get_items(); 
 
            //get the ALL checkbox 
            var chk1 = $get(combo.get_id() + "_i0" + "_chk1"); 
            if (chk1.checked && sender.id == "cbM0016_i0_chk1") { 
                text = "ALL"; 
                //enumerate all items 
                for (var i = 1; i < items.get_count(); i++) { 
                    var item = items.getItem(i); 
                    //get the checkbox element of the current item 
                    var chk2 = $get(combo.get_id() + "_i" + i + "_chk1"); 
                    chk2.checked = true; 
                    values += item.get_value() + ","; 
                } 
            } 
            else { 
                var count = 0; 
                //enumerate all items 
                for (var i = 1; i < items.get_count(); i++) { 
                    var item = items.getItem(i); 
                    //get the checkbox element of the current item 
                    var chk2 = $get(combo.get_id() + "_i" + i + "_chk1"); 
                    if (chk2.checked) { 
                        count += 1; 
                        text += item.get_text() + ","; 
                        values += item.get_value() + ","; 
                    } 
                } 
                if (count == i - 1 && sender.id != "cbM0016_i0_chk1") { 
                    chk1.checked = true; 
                } 
                else { 
                    chk1.checked = false; 
                } 
            } 
 
            //remove the last comma from the string 
            text = removeLastComma(text); 
            values = removeLastComma(values); 
 
            if (text.length > 0) { 
                //set the text of the combobox 
                if (chk1.checked) { 
                    combo.set_text("ALL"); 
                } else { 
                    combo.set_text(text); 
                } 
            } 
            else { 
                //all checkboxes are unchecked 
                //so reset the controls  
                combo.set_text(""); 
            } 
 
            combo.set_value(values); 
        } 


Please help.

-Billy

Billy
Top achievements
Rank 1
 answered on 30 Jun 2009
2 answers
149 views
I have a created a radgrid which takes data from a table and displays it in rows. Each row  has an edit button which when clicked opens details of that row. The user should be able to update this.

The aspx code has the radgrid part:

 <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="EditDataSource" GridLines="None" OnItemCommand="RadGrid1_ItemUpdated">

    <MasterTableView AllowAutomaticUpdates="false" AllowAutomaticInserts="false" autogeneratecolumns="False" datasourceid="EditDataSource">

    <columns>

        

            <telerik:GridEditCommandColumn UniqueName="EditCommandColumn">

            </telerik:GridEditCommandColumn>

             <telerik:GridBoundColumn HeaderText="OrganizationName" HeaderButtonType="TextButton" DataField="OrganizationName">

            </telerik:GridBoundColumn>

             <telerik:GridBoundColumn HeaderText="OrganizationName" HeaderButtonType="TextButton" DataField="ContactID">

            </telerik:GridBoundColumn>

            <telerik:GridBoundColumn HeaderText="firstname" HeaderButtonType="TextButton" DataField="FirstName">

            </telerik:GridBoundColumn>

            <telerik:GridBoundColumn HeaderText="lastname" HeaderButtonType="TextButton" DataField="LastName">

            </telerik:GridBoundColumn>

            <telerik:GridBoundColumn HeaderText="Title" HeaderButtonType="TextButton" DataField="Title">

            </telerik:GridBoundColumn>

              </columns>

            <EditFormSettings UserControlName="Contact.ascx" EditFormType="WebUserControl">

                <EditColumn UniqueName="EditCommandColumn1"></EditColumn>

                <PopUpSettings ScrollBars="None"></PopUpSettings>

            </EditFormSettings>

    </MasterTableView>

    </telerik:RadGrid>




the details are displayed using a user control which looks like this:


private object _dataItem = null;
public object DataItem
{
    get
    {
        return this._dataItem;
    }
    set
    {
        this._dataItem = value;
    }
}
  
</script>

<table id="OrgTable">
<tr><td><strong>Contact Details:</strong></td></tr>
<tr>
 <td>Contact ID</td>
    <td><asp:TextBox id="ID" runat="server" Text='<%# DataBinder.Eval( Container, "dataItem.ContactID" ) %>'>
    </asp:textbox></td>
    <td>Prefix</td>
    <td><asp:TextBox id="prefix" runat="server" Text='<%# DataBinder.Eval( Container, "dataItem.prefix" ) %>'>
    </asp:textbox></td>
    <td>First Name</td>
    <td><asp:TextBox id="firstname" runat="server" Text='<%# DataBinder.Eval( Container, "dataItem.FirstName" ) %>'>
    </asp:textbox></td>
    </tr>
    <tr>
     <td>Middle Name</td>
    <td><asp:TextBox id="middlename" runat="server" Text='<%# DataBinder.Eval( Container, "dataItem.MiddleName" ) %>'>
    </asp:Textbox></td>
     <td>Last Name</td>
    <td><asp:TextBox id="lastname" runat="server" Text='<%# DataBinder.Eval( Container, "dataItem.LastName" ) %>'>
    </asp:Textbox></td>
</tr>
<tr>
     <td>Title</td>
    <td><asp:TextBox id="title" runat="server" Text='<%# DataBinder.Eval( Container, "dataItem.Title" ) %>'>
    </asp:Textbox></td>
   
</tr>
<tr>
   <asp:Button CommandName="Update" runat="server" text="Update"  />
   
</tr>
</table>
 


I am not sure how I can update the table on clicking the update button. 


The code behind of the aspx has the following:


protected void RadGrid1_ItemUpdated(object source, GridCommandEventArgs e)
    {
        //Get the GridEditableItem of the RadGrid     
        GridEditableItem editedItem = (GridEditableItem)e.Item;  
        conn = new OleDbConnection(connectionstring);
        conn.Open();
        //Get the primary key value using the DataKeyValue.     
  
        
       // string ContactID = editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["ContactID"].ToString();

        //Access the textbox from the edit form template and store the values in string variables.     
        
       string FirstName = (editedItem.FindControl("FirstName ") as TextBox).Text;
        string Title = (editedItem["Title"].Controls[0] as TextBox).Text;

        
            //Open the SqlConnection     
           
           
            string updateQuery = "something ";
        
         cmd = new OleDbCommand(updateQuery);
            cmd.ExecuteNonQuery();
          Close the SqlConnection     
            conn.Close();


        
    }
 


The variables Firstname and Title don't have the updated values. I dont think the event is triggered when I click on the update button either. Any help would be greatly appreciated.


Thanks,

jlesidt
Top achievements
Rank 1
 answered on 30 Jun 2009
2 answers
133 views
Hi

I have a radgrid that contains tooltips. These tooltips load content on demand. One of the controls inside the tooltip is a third party component which is a map object. The map generates an image which is rendered as a html image. Each tooltip should display a different map.

The first tooltip loads ok but all of the subsequent tooltips show the map from the first tooltip. I thought at first this was a caching issue and that the tooltips were loading the the image file belonging to the first tooltip. However i can see the images being generated in the directory on the hard drive and each tooltip is generating a separate image it's just for some bizarre reason all of the maps are displaying the same data

All of the information to generate the correct map is being passed back in the AjaxUpdate event. You can see this because if for example you look at tooltip1 then the map from tooltip1 is shown in all the other tooltips but if you look at tooltip2 first then map2 is shown in all the tooltips.

I don't know enough about what is happening in the process of loading content on demand to know what might be going wrong with the third party control. Something odd is happening in the AjaxUpdate bit.

any help is greatly appreciated

thanks in advance
andieje
Top achievements
Rank 1
 answered on 30 Jun 2009
0 answers
130 views
I replaced an asp.net GridView with an AJAX RadComboBox. Loading the page takes 3 times more than grid view version using same methods to populate controls. I'm also using RadCompression and I can see it's working according to Firebug. Is there any setting I'm missing in order to speed up the page? Thanks.
Jp Maxwell
Top achievements
Rank 1
 asked on 30 Jun 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?