Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
1.4K+ views
this should be an easy one, but I haven't been able to find it in the documentation. I have a simple grid that is read-only where the user can click on a hyperlink column to view the record details. Since the user cannot add new records I want to not show the default 'Add new record' text and button that displays at the top of the grid.

thanks

Carlos Contreras
Top achievements
Rank 1
 answered on 19 Jul 2010
3 answers
155 views
I have two nested RadComboBox controls. Both "SelectedValue" properties are bound to a LinqDataSource, and they both get items from different ObjectDataSources.

When I select an item in RadComboBox1 I want to update RadComboBox2's items but I'm getting the following error "Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control." as RadComboBox2 is also rebinding the SelectedValue property. To solve this, I unbind RadComboBox2.SelectedValue and set the field's value later, but I'm looking for a nicer option.

Is there anyway to refresh RadComboBox2 items withouth the whole rebind, so as to prevent the exception from raising?
Thanks a lot!
Kalina
Telerik team
 answered on 19 Jul 2010
1 answer
182 views
I believe I saw a way to do this before, but I can't find it now.  Is there a way to allow the user to expand the dimensions of a RadTextBox?  Thanks.
msigman
Top achievements
Rank 2
 answered on 19 Jul 2010
1 answer
113 views
Hi,

I have a radchart with the names of states being set for the xaxis, like so.

hoursRadChart.PlotArea.XAxis[i].TextBlock.Text = data.State_Name;

But the text is bumping into itself and unreadable. How do I rotate the text 90 degrees?

Thanks,

Ryan
Ryan
Top achievements
Rank 1
 answered on 19 Jul 2010
1 answer
84 views
my radscheduler dir = rtl , and I want that the calander will align to right,
how can I do this?
thank you
Veronica
Telerik team
 answered on 19 Jul 2010
1 answer
134 views
Hi,

How can I set resource background color. In windows scheduler it was like this:

Radscheduler1.Resources(0).Color = color

Is something like this possible in Web Scheduler?
Thanks.
 

Veronica
Telerik team
 answered on 19 Jul 2010
1 answer
192 views
I have a RadWindow with a hyperlink. When I hit that link, I want to close the window and open the hyperlink in the parent page.

How is this achieved?

Thanks
Lars Meyer
Top achievements
Rank 2
 answered on 19 Jul 2010
1 answer
102 views
Hi,

I am building a RadGrid, which has a GridDropDownColumn in it.  I have enabled ajax on the RadGrid using the RadAjaxManager, but after I do this, the ComboBox in the GridDropDownColumn no longer drops-down, it just gets stuck and doesn't do anything when you click it.

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGrid1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
  
<asp:EntityDataSource ID="dsTypes" runat="server" 
            ConnectionString="name=Entities" DefaultContainerName="Entities" 
            EnableFlattening="False" EntitySetName="Types">
          
        </asp:EntityDataSource>
        <asp:EntityDataSource ID="dsCustomerData" runat="server" 
            ConnectionString="name=Entities" DefaultContainerName="Entities" 
            EnableFlattening="False" EnableUpdate="True" EnableInsert="true" 
            EntitySetName="CustomerData" AutoGenerateWhereClause="True" Include="Type">   
              
        </asp:EntityDataSource>
          
        <telerik:RadGrid ID="RadGrid1" runat="server"
            GridLines="None" DataSourceID="dsCustomerData"
            AutoGenerateColumns="False" AutoGenerateEditColumn="True" AutoGenerateDeleteColumn="True" 
>
  
<MasterTableView DataSourceID="dsCustomerData" DataKeyNames="CustomerDataID">
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
  
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
    <Columns>
        <telerik:GridDropDownColumn DataField="TypeID" 
            DataSourceID="dsTypes" 
            HeaderText="Type" ListTextField="TypeName" 
            ListValueField="TypeID" UniqueName="TypeID">
        </telerik:GridDropDownColumn>
        <telerik:GridBoundColumn DataField="Make" HeaderText="Make" UniqueName="column">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Model" HeaderText="Age" 
            UniqueName="column1">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Age" HeaderText="Age" UniqueName="column2">
        </telerik:GridBoundColumn>
    </Columns>
      
</MasterTableView>
  
        </telerik:RadGrid>

If I remove the RadAjaxManager, the ComboBox works as normal.

Any ideas?

Thanks,

Craig
Mira
Telerik team
 answered on 19 Jul 2010
2 answers
107 views
I'm struggling with a performance issue I can't seem to resolve. I cannot reconcile the difference in performance on my local application compared to the telerik demos online.

I have gone through most of the articles here on performance. I'm using CDN and just installed the latest version of ASP.NET AJAX components. I'm still using them in trial because I'm not quite getting the experience I need.

I have a page with 1 rad tab (with three tabs) one tab has a scheduler the other two tabs have radgrids.

On my local network running in VS or on my local server the performance seems good. When I access the server from a PC off my network it's quite slow. The only difference I can really think of is the speed of my network to the web. The problem is I've conducted all sorts of tests and even on a very slow connection the telerik demos run faster.

Is it because it's a trial version? Am I missing something in the config? Have I combined too many Rad components on one page? I've verified all the scripts and styles are coming from the CDN settings and the page itself is only about 100k when complete. Are the scripts just taking that long to run on the client computer? The database certainly isn't a bottleneck. I've watched with profiler and the queries are all wrapped up long before the page re-renders completely. Could it be the code running on the client taking a while to get going? Basically if you right click an item on the scheduler and "edit" it takes nearly 18 seconds to bring up the edit dialogue. It takes nearly the same amount to save or cancel it after that.

Thanks for any tips or insights!
Andrew N
Top achievements
Rank 1
 answered on 19 Jul 2010
5 answers
171 views
Hi,

I am using CommandItemtemplate in radgrid. I want to update multiple rows as shown in this demo.

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/commanditem/defaultcs.aspx

When I am trying to update multiple rows I am unable to update it. How to update mulltiple rows in editformtemplate.

Here is my code for single row update

<CommandItemTemplate>
                                <table>
                                    <tr>
                                        <td align="left">
                                            <b>Bulk Actions</b>    
                                        </td>
                                        <td align="left">
                                            <asp:LinkButton ID="btnEditSelected" runat="server" CommandName="EditSelected" Visible='<%# rg200.EditIndexes.Count == 0 %>'><img  style="border:0px;vertical-align:middle;" alt="" src="Images/Edit.gif" />Edit selected</asp:LinkButton>
                                                
                                        </td>
                                        <td align="left">
                                            <asp:LinkButton ID="btnUpdateEdited" runat="server" CommandName="UpdateEdited" Visible='<%# rg200.EditIndexes.Count >  0 %>'><img style="border:0px;vertical-align:middle;" alt="" src="Images/Update.gif" />Update</asp:LinkButton>
                                                
                                        </td>
                                        <td align="left">
                                            <asp:LinkButton ID="btnCancel" runat="server" CommandName="CancelAll" Visible='<%# rg200.EditIndexes.Count > 0 || rg200.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="Images/Cancel.gif" />Cancel editing</asp:LinkButton>
                                                
                                        </td>
                                        <td align="right">
                                            <img style="border: 0px; vertical-align: middle;" alt="" src="Images/AddRecord.gif" />
                                        </td>
                                        <td align="left">
                                            <asp:LinkButton ID="LinkButton2" runat="server" CommandName="InitInsert" Visible='<%# !rg200.MasterTableView.IsItemInserted %>'>Add New Record</asp:LinkButton>
                                                
                                        </td>
                                        <td align="right">
                                            <img style="border: 0px; vertical-align: middle;" alt="" src="Images/Delete.gif" />
                                        </td>
                                        <td align="left">
                                            <asp:LinkButton ID="LinkButton1" OnClientClick="javascript:return confirm('Delete all selected Records?')"
                                                runat="server" CommandName="DeleteSelected">Delete Selected</asp:LinkButton>
                                                
                                        </td>
                                        <td align="right">
                                            <img style="border: 0px; vertical-align: middle;" alt="" src="Images/Refresh.gif" />
                                        </td>
                                        <td align="left">
                                            <asp:LinkButton ID="LinkButton4" runat="server" CommandName="Rebind">Refresh</asp:LinkButton>
                                             
                                        </td>
</tr>
                                </table>
                            </CommandItemTemplate>


clsTaskUpdates_BL objBL = new clsTaskUpdates_BL();
GridEditableItem editedItem = e.Item as GridEditableItem;
 
string OrdID = editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["orderId"].ToString();
string ClarifyAccountNbr = (editedItem.FindControl("TextBox1") as TextBox).Text;
string SiteID = (editedItem.FindControl("TextBox2") as TextBox).Text;
string QuoteID = (editedItem.FindControl("TextBox3") as TextBox).Text;
CheckBox chkEDP = (editedItem.FindControl("CheckBox1") as CheckBox);
try
{
    objBL.setTask200_Bl(OrdID, ClarifyAccountNbr, SiteID, QuoteID, chkEDP.Checked);
    Session["SearchRes"] = null;
    rg200.Rebind();
}
catch (Exception ex)
{
    rg200.Controls.Add(new LiteralControl("Unable to update Employee. Reason: " + ex.Message));
    e.Canceled = true;
}


when i am trying to update multiple rows with foreach  I am unable to update it.
if (e.CommandName == "UpdateEdited")
        {
            foreach (GridEditableItem editedItem in rg200.EditItems)
            {
                GridDataItem dataitem = editedItem as GridDataItem;
                clsTaskUpdates_BL objBL = new clsTaskUpdates_BL();
 
                string OrdID = editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["orderId"].ToString();
 
                string ClarifyAccountNbr = (editedItem.FindControl("TextBox1") as TextBox).Text;
                string SiteID = (editedItem.FindControl("TextBox2") as TextBox).Text;
                string QuoteID = (editedItem.FindControl("TextBox3") as TextBox).Text;
                CheckBox chkEDP = (editedItem.FindControl("CheckBox1") as CheckBox);
                try
                {
                    objBL.setTask200_Bl(OrdID, ClarifyAccountNbr, SiteID, QuoteID, chkEDP.Checked);
                    Session["SearchRes"] = null;
                    rg200.Rebind();
                }
                catch (Exception ex)
                {
                    rg200.Controls.Add(new LiteralControl("Unable to update Employee. Reason: " + ex.Message));
                    e.Canceled = true;
                }
                 
            }
        }


 I tried to use hashtable, but still i am getting older values. Please help me how to update multiple rows at a time.

This is my editformsettings code

<EditFormSettings EditFormType="Template">
                                <FormTemplate>
                                    <table id="Table1" cellspacing="1" cellpadding="1">
                                        <tr>
                                            <td>
                                                <telerik:RadTabStrip runat="server" ID="RadTabStrip1" Orientation="HorizontalTop"
                                                    SelectedIndex="0" MultiPageID="RadMultiPage1">
                                                    <Tabs>
                                                        <telerik:RadTab Text="Task Data" PageViewID="RadPageView1">
                                                        </telerik:RadTab>
                                                        <telerik:RadTab Text="Notes" PageViewID="RadPageView2">
                                                        </telerik:RadTab>
                                                    </Tabs>
                                                </telerik:RadTabStrip>
                                                <telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="0">
                                                    <telerik:RadPageView runat="server" ID="RadPageView1">
                                                        <table id="Table3" cellspacing="1" cellpadding="1" width="250" border="0" class="module">
                                                            <tr>
                                                                <td>
                                                                </td>
                                                                <td>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    Clarify Account Nbr:
                                                                </td>
                                                                <td>
                                                                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval( "Clarify Account Nbr" ) %>'>
                                                                    </asp:TextBox>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    Site ID:
                                                                </td>
                                                                <td>
                                                                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Eval( "Site ID") %>' TabIndex="1">
                                                                    </asp:TextBox>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    Quote ID:
                                                                </td>
                                                                <td>
                                                                    <asp:TextBox ID="TextBox3" runat="server" Text='<%# Eval( "Quote ID") %>' TabIndex="2">
                                                                    </asp:TextBox>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    EDP Created?:
                                                                </td>
                                                                <td>
                                                                    <asp:CheckBox ID="CheckBox1" runat="server" Text='<%# Eval( "EDP Created?") %>' TabIndex="3">
                                                                    </asp:CheckBox>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="right" colspan="2">
                                                                    <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                                                        runat="server" CommandName='Update'></asp:Button
                                                                    <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                                                        CommandName="Cancel"></asp:Button>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </telerik:RadPageView>
                                                    <telerik:RadPageView runat="server" ID="RadPageView2">
                                                    </telerik:RadPageView>
                                                </telerik:RadMultiPage>
                                            </td>
                                        </tr>
                                    </table>
                                </FormTemplate>
                            </EditFormSettings>


Thanks
Babu


Tsvetoslav
Telerik team
 answered on 19 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?