Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
168 views
Hello,

I'm using RadGrid which is set up to use 'user control' editing mode. I have set CaptionDataField and CaptionFormatString so it should display name of item I'm editing. Within user control I have several tabs which do postback. The first time the user control is shown, name is displayed, however after subsequent postbacks the name disappears and the original format string is shown without substituted value.

I'm wondering whether this scenario is even supported?

Thanks for answer,
Robert
Robert
Top achievements
Rank 2
 answered on 26 Aug 2010
3 answers
121 views
Hi

I have placed a RadAjaxLoadingPanel on my page and referenced it on my RadAjaxManagerProxy like so:

The LoadingPanel is used to show a loading gif image when any item inside a repeater is deleted.

<telerik:RadAjaxLoadingPanel ID="MyLoadingPanel" runat="server" InitialDelayTime="0">
        <asp:Image ID="MyImage" runat="server" ImageUrl="~/images/icons/loading.gif" />
</telerik:RadAjaxLoadingPanel>


<telerik:AjaxSetting AjaxControlID="MyImage">
 <UpdatedControls>
    <telerik:AjaxUpdatedControl ControlID="MyRepeater" />
    <telerik:AjaxUpdatedControl ControlID="MyLinkButton" LoadingPanelID="MyLoadingPanel"/>       
 </UpdatedControls>
</telerik:AjaxSetting>


The problem is that the loading panel only appears for the first item in the repeater. How can I get it to appear for each Repeater Item?

Thanks.
Pavlina
Telerik team
 answered on 26 Aug 2010
1 answer
157 views
We are having telerik rad tab strip having 5 tabs. I am loading user control dynamically for each tab in run time. Each user control is having rad grid, with sorting option. All the controls are loaded in a page , which is having rad grid in top, rad pane in left  and rad tab strip in bottom. i am facing issue in rad tab strip, scenario below:
1. Clicking on first tab in rad tab strip, control is loaded completely.
2. clicking on next tab( second tab) in rad tab strip, control is loaded completely.
3. again following step :1
4. clicking browser back button , now the second tab is displaying page ( as of step 2)
5. Now i am clicking on the sort button in user control available in second tab
6.control is not rendered only in tab portion, rest of the page is working fine. ( it looks blank).
 It is happening across all tabs , only in back button scenario. we are using IE 7 , visual studio 2008.

I had attached the screen shots , i cannot able to attach the code. please let me know the suitable solution as soon as possible.

thanks
Sudhakar

Yana
Telerik team
 answered on 26 Aug 2010
6 answers
174 views
I have a hierarchical grid setup with a single child level. When the page loads the grid shows perfectly fine - all levels (hierarchy mode is Client) show up and everything looks great. When I use the Delete command to remove one of the child items the delete process works fine, however the Rebind method dies. It seems when the Rebind() method gets called the detail table's data source is actually being set to the parent object so upon binding it tells me the type I am trying to call a property off of (ImageName is the property) doesn't exist. Any thoughts here? It doesn't make sense that a Rebind wouldn't work, yet binding when the page loads initially works fine. Here is the code:

protected void grProjects_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    if (!e.IsFromDetailTable)
    {
        this.grProjects.DataSource = (from c in new DataContext().Projects select c).ToArray();
    }
}
 
protected void grProjects_DetailTableDataBind(object source, GridDetailTableDataBindEventArgs e)
{
    if (e.DetailTableView.Name == "Images")
    {
        GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;
        e.DetailTableView.DataSource = ((Project)dataItem.DataItem).ProjectItems;
    }
}

<telerik:RadGrid runat="server" ID="grProjects" OnNeedDataSource="grProjects_NeedDataSource" Skin="Windows7" AutoGenerateColumns="false" ShowFooter="false" OnItemDataBound="grProjects_ItemDataBound" OnItemCommand="grProjects_ItemCommand" OnDetailTableDataBind="grProjects_DetailTableDataBind">
    <MasterTableView DataKeyNames="Id" CommandItemDisplay="Top" CommandItemStyle-Height="30px" ItemStyle-VerticalAlign="Top" AlternatingItemStyle-VerticalAlign="Top" HierarchyDefaultExpanded="false" HierarchyLoadMode="Client">
        <CommandItemTemplate>
            <input type="button" class="rgAdd" onclick="javascript:addItem();" style="margin-left: 10px;" /><a href="javascript:;" onclick="javascript:addItem();">Add Project</a>
        </CommandItemTemplate>
        <Columns>
            <telerik:GridTemplateColumn ItemStyle-Width="20px" ItemStyle-Wrap="false">
                <ItemTemplate>
                    <asp:Button runat="server" ID="cmEdit" Text="Edit" CssClass="rgEdit" />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn HeaderText="Name" DataField="Name" ItemStyle-Width="125px" />
            <telerik:GridBoundColumn HeaderText="Description" DataField="Description" />
            <telerik:GridButtonColumn ButtonType="ImageButton" HeaderStyle-Width="20px" ItemStyle-Width="20px" CommandName="Delete" ConfirmDialogType="RadWindow" ConfirmText="Are you sure you wish to permanently remove this project?<br /><br /><strong>All images contained inside will be removed as well and this action is not reversible.</strong>" />
        </Columns>
        <DetailTables>
            <telerik:GridTableView Name="Images" DataKeyNames="Id" CommandItemDisplay="Top" CommandItemStyle-Height="30px" ItemStyle-VerticalAlign="Top" AlternatingItemStyle-VerticalAlign="Top" Width="100%">
                <CommandItemTemplate>
                    <asp:Button runat="server" ID="cmAddItem" CssClass="rgAdd" style="margin-left: 10px;" /><asp:HyperLink runat="server" ID="lkAddItem" Text="Add Image" NavigateUrl="javascript:;" />
                </CommandItemTemplate>
                <Columns>
                    <telerik:GridTemplateColumn ItemStyle-Width="20px" ItemStyle-Wrap="false">
                        <ItemTemplate>
                            <asp:Button runat="server" ID="cmEdit" Text="Edit" CssClass="rgEdit" />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn HeaderText="Image" ItemStyle-Width="100px">
                        <ItemTemplate>
                            <asp:Image runat="server" ImageUrl='<%# GetImageUrl(Eval("ImageName")) %>' />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn HeaderText="Caption">
                        <ItemTemplate>
                            <%#(Eval("Caption") != null) ? Eval("Caption").ToString().Replace("\r\n", "<br />") : string.Empty %>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridButtonColumn ButtonType="ImageButton" HeaderStyle-Width="20px" ItemStyle-Width="20px" CommandName="Delete" ConfirmDialogType="RadWindow" ConfirmText="Are you sure you wish to permanently remove this item?<br /><br /><strong>This action is not reversible.</strong>" />
                </Columns>
            </telerik:GridTableView>
        </DetailTables>
    </MasterTableView>
</telerik:RadGrid>
digitall
Top achievements
Rank 1
 answered on 26 Aug 2010
2 answers
102 views
Hi,

Can anyone tell me why the grid is losing it's format when a column is removed?

Steps.

1. Righit click on grid-header 
2. Under Columns menu-item, uncheck any column, the grid loses the width and the format.

Please see screen-shot taken.

Any help is highly appreciated.

Many thanks.
MG


FISCAL
Top achievements
Rank 1
 answered on 26 Aug 2010
3 answers
194 views
What is the best approach for using a telerik grid control and ajax binding to expand/contract additional columns - showing one or two columns in the grid view and displaying the rest of the columns when the row is selected? The Master-Detail example shows how to display child-related tables, but I just need the remaining columns of the main table displayed in a list view rather than grid view.
Iana Tsolova
Telerik team
 answered on 26 Aug 2010
1 answer
60 views
Hi,

I was trying out this dynamic created dock demo -> http://demos.telerik.com/aspnet-ajax/dock/examples/dynamicdocks/defaultcs.aspx

I created two docks and moved one of the them few times between the columns.  The suddenly the two become three and the page crashes.  I have tried this in IE8, Chrome and Firefox.  bug ?
Pero
Telerik team
 answered on 26 Aug 2010
2 answers
511 views
Hi Sir,

I am using ajaxupdatepanel in my entire application.

But in some pages i have use to normal update panel.

But when loading ui look diffrent.

So please can u give me CSS for that i using that in my update progress.

For that my entire application looking same.

Please give me proper solution.

Thanks.

Kishor Dalwadi.
Kishor Dalwadi
Top achievements
Rank 2
 answered on 26 Aug 2010
1 answer
211 views
Hi,

I am fairly new to telerik grid so please be patient.  I have a nested grid which displays Brokers in the main grid and then Broker contacts within it in the nested grid.  I want the nested grid to be able to add and update the contacts.  I currently have the nested grid opening up a rad window when the user clicks on the 'Add New Broker'.  I am using a CommandItemTemplate for this and calling a javascript function on the onclick event of it.  I do something similar for the edit using a GridTemplateColumn and it works fine since I can get the values of the fields using DataBinder.Eval...  Is there any way I can get the value of the id of the parent row (in this case BrokerOfficeID) to pass as a parameter of the function in the CommandItemTemplate?  I have spent a few days trying to figure this out and I'm kinda stuck...  Everything else seems to be working great!  Thanks for any help!!!

here is the code for the grid/nested grid

    <telerik:RadGrid ID="grdBrokers" runat="server"  AutoGenerateColumns="False" 
        AllowSorting="True" AllowPaging="True"  OnNeedDataSource="grdBrokers_NeedDataSource"
        AllowFilteringByColumn="True" EnableLinqExpressions="False"   
           OnDetailTableDataBind
="grdBrokers_DetailTableDataBind"
        Skin="Office2007">
        <MasterTableView CommandItemDisplay="Top" DataKeyNames="BrokerOfficeID" Height="100%" >
            <PagerStyle Mode="NextPrevAndNumeric" Position="Bottom" />
            <HeaderStyle HorizontalAlign="Center" />
            <RowIndicatorColumn>
                <HeaderStyle Width="20px" HorizontalAlign="Center" />
            </RowIndicatorColumn>
            <ExpandCollapseColumn>
                <HeaderStyle Width="20px" HorizontalAlign="Center" />
            </ExpandCollapseColumn>
            <DetailTables>
                <telerik:GridTableView DataKeyNames="BrokerContactID" Name="BrokerContacts" Width="100%"
                    AllowFilteringByColumn="false" CommandItemDisplay="Top">
                    <Columns>
                        <telerik:GridBoundColumn SortExpression="BrokerOfficeID" HeaderText="Office ID" HeaderButtonType="TextButton"
                            DataField="BrokerOfficeID" UniqueName="BrokerOfficeID" AllowFiltering="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn SortExpression="BrokerContactID" HeaderText="Contact ID" HeaderButtonType="TextButton"
                            DataField="BrokerContactID" UniqueName="BrokerContactID" AllowFiltering="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn SortExpression="Name" HeaderText="Contact Name" HeaderButtonType="TextButton"
                            DataField="Name" UniqueName="Name" AllowFiltering="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn SortExpression="Email" HeaderText="Email" HeaderButtonType="TextButton"
                            DataField="Email" UniqueName="Email" AllowFiltering="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn AllowFiltering="false" HeaderText="Edit" UniqueName="TemplateEditColumn">
                            <HeaderStyle Width="30px" HorizontalAlign="Center" />
                            <ItemStyle Width="30px" HorizontalAlign="Center" />
                            <ItemTemplate>
                                <a href="#" onclick="ShowEditBrokerContactForm('<%# DataBinder.Eval(Container.DataItem, "BrokerOfficeID") %>','<%# DataBinder.Eval(Container.DataItem, "BrokerContactID") %>');"><img id="Img1" alt="" src ="~/App_Themes/Images/edit.gif" runat="server" border="0" /></a>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
                    <CommandItemTemplate>
                        <a href="#" onclick="return ShowInsertBrokerContactForm('<%# get id of parent row here  %>);">Add New Broker Contact</a>
                    </CommandItemTemplate>
                </telerik:GridTableView>
            </DetailTables>
            <Columns>
                <telerik:GridBoundColumn HeaderText="ID" DataField="BrokerOfficeID" FilterControlWidth="30px"
                    SortExpression="BrokerOfficeID" UniqueName="BrokerOfficeID" HeaderButtonType="TextButton">
                    <HeaderStyle Width="30px" />
                    <ItemStyle Width="30px" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn HeaderText="Broker Office" DataField="Name" FilterControlWidth="300px"
                    SortExpression="Name" UniqueName="Name" HeaderButtonType="TextButton">
                    <HeaderStyle Width="300px" />
                    <ItemStyle Width="300px" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn HeaderText="Company Code" DataField="CompanyCode" FilterControlWidth="35px"
                    SortExpression="CompanyCode" UniqueName="CompanyCode" HeaderButtonType="TextButton">
                    <HeaderStyle Width="35px" />
                    <ItemStyle Width="35px" />
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn AllowFiltering="false" HeaderText="Edit" UniqueName="TemplateEditColumn">
                    <HeaderStyle Width="30px" HorizontalAlign="Center" />
                    <ItemStyle Width="30px" HorizontalAlign="Center" />
                    <ItemTemplate>
                        <a href="#" onclick="ShowEditBrokerForm('<%# DataBinder.Eval(Container.DataItem, "BrokerOfficeID") %>');"><img alt="" src ="~/App_Themes/Images/edit.gif" runat="server" border="0"></a>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
            <CommandItemTemplate>
                <a href="#" onclick="return ShowInsertBrokerForm();">Add New Broker</a>
            </CommandItemTemplate>
        </MasterTableView>
        <ClientSettings AllowExpandCollapse="true" >
        </ClientSettings>
        <GroupingSettings CaseSensitive="false" />
    </telerik:RadGrid>
</telerik:RadPageView>

Here are the javascript functions...

function ShowEditBrokerContactForm(id1,id2) {
    window.radopen("EditBrokerContact.aspx?BrokerOfficeID=" + id1 + "&BrokerContactID=" + id2, "UserListDialog");
    return false;
}
function ShowInsertBrokerContactForm(id) {
    window.radopen("EditBrokerContact.aspx?BrokerOfficeID=" + id, "UserListDialog");
    return false;
}
Dan
Top achievements
Rank 1
 answered on 26 Aug 2010
1 answer
205 views
Hi,

We are trying to upload a file using RadUpload control in one of the pages. There are some server side validations before the save will happen on the server. There seems to be some problem in the RadUpload control after the validation when the page is displayed back to the user to re-enter some of the invalid data. As soon as the page is returned to the user with the validation error, the RadUpload control seems to have lost the information of the selected file in the previous attempt to submit the data in the screen. We are not sure if this is happening because we have not set some flags to retain the selected file information in the control(may be in the view state or something as other controls do).

Can someone help us in this issue. I had raised a support ticket with telerik last week and I did not get any response so far.

Thanks,
Manoj
Genady Sergeev
Telerik team
 answered on 26 Aug 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?