Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
224 views

I am trying to rebind my grid once a radwindow has been closed through master page. My grid is in a usercontrol in aspx page. In master page i have :

 function CancelEdit() {
            GetRadWindow().Close();
        }

        function CloseAndRebind() {
            GetRadWindow().BrowserWindow.refreshGrid(); // Call the function in parent page 
            GetRadWindow().close(); // Close the window 
        }

        function refreshGrid() {
                $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
        }

and I have the following javascript in the user conrtrol:

<script type="text/javascript" language="javascript">
    function refreshGrid() {
        $find("<%= RadAjaxManager.GetCurrent(me.Page).ClientID %>").ajaxRequest("Rebind");
    }

</script>

Once I close update the database in radwindow i register a javascript:

 ScriptManager.RegisterStartupScript(Page, Page.GetType(), "mykey", "CloseAndRebind();", True)

I can see my data source changing but the grid doesn't get updated. any suggestions?

Shinu
Top achievements
Rank 2
 answered on 29 Jan 2013
1 answer
91 views
Hi,

I've been looking for a simple way to let a client know that the data is being delivered; I've seen examples for using the RadAjaxLoadingPanel with a RadGrid.  I think generically this probably works, but in my case it doesn't.  I end up getting OutOfMemoryException errors.
If I disable the RadAjaxLoadingPanel, the export to Excel works fine -- and fairly quickly.
Admittedly there is a lot of data to export -- over 72K rows.  Still, I'm not asking the RadAjaxLoadingPanel to do anything special except display while the grid changes.
If I do a paging operation, the control works fine.  It's just on the export that it gives up.

Here's the gist of the code:

<tk:RadAjaxManager ID="ramGridWait" runat="server">
                            <AjaxSettings>
                                <tk:AjaxSetting AjaxControlID="rgGlobalInventorySummary">
                                    <UpdatedControls>
                                        <tk:AjaxUpdatedControl ControlID="rgGlobalInventorySummary" LoadingPanelID="ralpGridWait" />
                                    </UpdatedControls>
                                </tk:AjaxSetting>
                                <tk:AjaxSetting AjaxControlID="rbExport">
                                    <UpdatedControls>
                                        <tk:AjaxUpdatedControl ControlID="rgGlobalInventorySummary" LoadingPanelID="ralpGridWait" />
                                    </UpdatedControls>
                                </tk:AjaxSetting>
                            </AjaxSettings>
                        </tk:RadAjaxManager>
                        <tk:RadAjaxLoadingPanel runat="server" ID="ralpGridWait" InitialDelayTime="3000"
                            Skin="WebBlue" />
                        <tk:RadAjaxPanel ID="RadAjaxPanel1" LoadingPanelID="ralpGridWait" runat="server">
                            <tk:RadGrid ID="rgGlobalInventorySummary" runat="server" OnNeedDataSource="rgGlobalInventorySummary_NeedDataSource"
                                AllowFilteringByColumn="true" EnableEmbeddedSkins="true" BorderStyle="Solid"
                                Skin="WebBlue" Width="100%" AllowPaging="true" PageSize="20" ShowFooter="true"
                                PagerStyle-Position="TopAndBottom">
                                <ExportSettings ExportOnlyData="true" HideStructureColumns="true" IgnorePaging="true" />
                                <ClientSettings Selecting-AllowRowSelect="true">
                                    <Resizing AllowColumnResize="true" EnableRealTimeResize="true" />
                                </ClientSettings>
                                <MasterTableView AutoGenerateColumns="false" Caption="" ShowHeader="true" CommandItemDisplay="TopAndBottom">
                                    <CommandItemSettings ShowAddNewRecordButton="false" ShowExportToExcelButton="true"
                                        ShowExportToPdfButton="false" ShowExportToWordButton="false" />
                                    <Columns>
                                        <tk:GridBoundColumn DataField="Status" HeaderText="Status" HeaderStyle-HorizontalAlign="Center"
                                            HeaderStyle-Width="85px" ItemStyle-HorizontalAlign="Left" AllowFiltering="true"
                                            FilterControlWidth="60%" />
                                         
                                    </Columns>
                                </MasterTableView>
                            </tk:RadGrid>
                        </tk:RadAjaxPanel>

Is there something I'm missing?

Thanks,

Glen
Princy
Top achievements
Rank 2
 answered on 29 Jan 2013
3 answers
464 views
I have a radgrid control with 2 radiobuttonlist.  The user will select the radiobuttonlists for all rows of the radgrid and then hit a submit button.  What I would like to do is loop through each row of the grid and find out which radio button was selected for each of the 2 radiobuttonlist and then read the value of the pid column from that row, then fire a sql update statement to update the database according to the pid and radiobutton selected.  Can someone shed some light on how to do this?  Thanks in advance.

<telerik:RadGrid ID="RgdPub" runat="server"
        AutoGenerateColumns="false" DataSourceID="SqlRgdPub" Skin="Web20" AllowSorting="true">
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
        <ClientSettings>
            <Selecting CellSelectionMode="None" />
        </ClientSettings>
        <MasterTableView CommandItemDisplay="Top" GridLines="Both" Width="100%" AllowSorting="true" >
                        <CommandItemSettings ShowAddNewRecordButton="false"
                            ShowExportToCsvButton="true" ShowExportToExcelButton="true"
                            ShowExportToPdfButton="false" ShowExportToWordButton="true" />
                        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"
                            Visible="True">
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"
                            Visible="True">
                        </ExpandCollapseColumn>
                        <Columns>
                                <telerik:GridTemplateColumn HeaderText="Is this your publication?" UniqueName="Pub">
                                    <ItemTemplate>
                                    <asp:RadioButtonList ID="RblPub" runat="server" RepeatColumns=2 RepeatDirection="Horizontal">
                                        <asp:ListItem Text="Yes" Value=1></asp:ListItem>
                                        <asp:ListItem Text="No" Value=0></asp:ListItem>
                                    </asp:RadioButtonList>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn HeaderText="Is this institute supported?" UniqueName="InsPub">
                                    <ItemTemplate>
                                    <asp:RadioButtonList ID="RblInsPub" runat="server" RepeatColumns=2 RepeatDirection="Horizontal">
                                        <asp:ListItem Text="Yes" Value=1></asp:ListItem>
                                        <asp:ListItem Text="No" Value=0></asp:ListItem>
                                    </asp:RadioButtonList>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn UniqueName="lastname" EditFormColumnIndex="0" HeaderText="Last Name"
                                    DataField="lastname">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="firstname" EditFormColumnIndex="0" HeaderText="First Name"
                                    DataField="firstname">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="institution" EditFormColumnIndex="0" HeaderText="Institution"
                                    DataField="institution">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="pid" EditFormColumnIndex="0" HeaderText="PID"
                                    DataField="pid">
                                </telerik:GridBoundColumn>
            </Columns>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
    </telerik:RadGrid>
Shinu
Top achievements
Rank 2
 answered on 29 Jan 2013
2 answers
210 views
I have read most, if not all, of the posts on this subject, but none of them correct my issue.

I have a grid with frozen columns and, when I use the horizontal scroll bar, scolling to the right does not bring all of the columns into view. If I remove the frozen columns, it works just fine.

  1. All columns have a defined width.
  2. I am using static headers.
  3. I have tried setting the width to a value rather than letting it default to 100%.

The page is defined (in part) as:

<div id="FormWrapper" style="width95%height95%margin0px auto">
	<form id="DeviceStatusForm" runat="server">
	<asp:Panel ID="Panel1" runat="server" CssClass="RaisedPanel">
		<div id="ContentDiv" class="Content">
			<div id="ReportGridDiv">
				<telerik:RadGrid ID="ReportGrid" runat="server" AllowPaging="True" AllowSorting="True"
					PagerStyle-AlwaysVisible="true" PageSize="50" GridLines="None" DataSourceID="GridDataSource"
					GroupingEnabled="False" AutoGenerateColumns="False">
					<ClientSettings EnableRowHoverStyle="true">
						<Selecting AllowRowSelect="False" />
						<ClientEvents OnRowContextMenu="ReportGrid_OnRowContextMenu" />
						<Scrolling AllowScroll="True" UseStaticHeaders="True" FrozenColumnsCount="1" ScrollHeight="20em" />
						<Resizing AllowColumnResize="True" AllowResizeToFit="True" EnableRealTimeResize="False"
						ResizeGridOnColumnResize="False" ShowRowIndicatorColumn="False" />
					</ClientSettings>
					<AlternatingItemStyle CssClass="rgCommandRow" />
					<MasterTableView DataSourceID="GridDataSource" DataKeyNames="AssetId,MacId" ClientDataKeyNames="AssetId, MacId, ReportDate, StatusId"
						TableLayout="Fixed" CommandItemDisplay="Top" PageSize="10" HorizontalAlign="NotSet">
						<CommandItemSettings ShowAddNewRecordButton="False"></CommandItemSettings>
					      <PagerStyle AlwaysVisible="True" />
					</MasterTableView>
					<PagerStyle AlwaysVisible="True" />
				</telerik:RadGrid>
			</div>
		  </div>
	</asp:Panel>
	</form>
</div>

The styles used are:
.RaisedPanel
{
	margin-top20px;
	margin-bottom30px;
	-moz-border-radius12px;
	-webkit-border-radius12px;
	border-radius12px;
	-moz-box-shadow4px 4px 14px #000;
	-webkit-box-shadow4px 4px 14px #000;
	box-shadow4px 4px 14px #000;
	padding-left2em;
	padding-bottom1em;
	padding-right2em;
	padding-top1em;
}
div.Content
{
	height100%;
	width100%;
}

I would appreciate any insights.

Ed
Top achievements
Rank 1
 answered on 28 Jan 2013
6 answers
116 views
I have used your tab control to implement a simple 3 tab appearance.  In the first screenshot the first tab is selected.  Do you notice the weird line above the middle tab?

I've also included screenshots for what happens when the 2nd and 3rd tabs respectively are selected.

What do I need to do to improve the appearance?

Robert
Robert
Top achievements
Rank 1
 answered on 28 Jan 2013
2 answers
103 views
Hi
 How can I access the combobox in the pager in code behind. Please suggest any possible solution
thanks
Savyo
Jayesh Goyani
Top achievements
Rank 2
 answered on 28 Jan 2013
1 answer
311 views
I have a RadGrid and a Panel which has the visibility = false (as default).

I need to click a Row or a button to send that Rows ID to that panel and make that Panel visible in server side

<form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function RowDblClick(sender, eventArgs) {               
                //alert("Chosen Row ID: " + eventArgs.getDataKeyValue("ID"));
            }
        </script>
    </telerik:RadCodeBlock>
    <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" Width="97%" CellSpacing="0"
        GridLines="None" OnSelectedIndexChanged="RadGrid1_SelectedIndexChanged">
        <PagerStyle Mode="NumericPages"></PagerStyle>
        <MasterTableView AutoGenerateColumns="False" DataKeyNames="ID" ClientDataKeyNames="ID"
            Width="100%" CommandItemDisplay="Top" PageSize="5">
            <Columns>
                <telerik:GridBoundColumn DataField="ID" HeaderText="ID" SortExpression="ID" UniqueName="ID">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="TesisatNo" HeaderText="Tesisat No" SortExpression="TesisatNo"
                    UniqueName="TesisatNo">
                </telerik:GridBoundColumn>                             
            </Columns>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
        <ClientSettings>
            <Selecting AllowRowSelect="true"></Selecting>
            <ClientEvents OnRowDblClick="RowDblClick"></ClientEvents>
        </ClientSettings>
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>       
    </telerik:RadGrid>
    <asp:Panel ID="PanelDetails" runat="server" Visible="false">
        THIS BECOMES VISIBLE ON DOUBLE CLICK OR ON BUTTON CLICK
           ALSO THE SELECTED ROW ID MUST BE RECEIVED HERE
    </asp:Panel>
    </form>
Jayesh Goyani
Top achievements
Rank 2
 answered on 28 Jan 2013
2 answers
206 views
Hi, 

Have a RadGrid inside a RadPane. Have also enabled RowSelect service. When I preview the page, and on selecting the row it expands.
How can I stop it from expanding. Have turned on AutoPostBack, it also behaves as a master row to a detail grid.

Part of the Code:

<telerik:RadPane ID="RadPaneLocations" runat="server" Height="15%" MinHeight="15" MinWidth="15" Scrolling="None">
                        <asp:Label ID="LabelLocations" runat="server" Text="Locations: " BackColor="#EFEFF2" Width="100%" Height="18px"></asp:Label>
                        <telerik:RadGrid ID="RadGridLocationList" runat="server" CellSpacing="0" GridLines="None" DataSourceID="ODSLocationList" AllowSorting="True" Skin="Default">
                            <ClientSettings EnablePostBackOnRowClick="True">
                                <Selecting AllowRowSelect="True" />
                                <Scrolling UseStaticHeaders="true" FrozenColumnsCount="1" ScrollHeight="100" AllowScroll="True"></Scrolling>
                            </ClientSettings>
                            <MasterTableView AutoGenerateColumns="False" DataKeyNames="lead_id,location_id" DataSourceID="ODSLocationList">
                                <CommandItemSettings ExportToPdfText="Export to PDF" />
                                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
                                </RowIndicatorColumn>
                                <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
                                </ExpandCollapseColumn>
                                <Columns>
                                    <telerik:GridBoundColumn DataField="lead_id" DataType="System.Int32" FilterControlAltText="Filter lead_id column" HeaderText="lead_id" ReadOnly="True" SortExpression="lead_id" UniqueName="lead_id" Visible="false">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="location_id" DataType="System.Int32" FilterControlAltText="Filter location_id column" HeaderText="location_id" ReadOnly="True" SortExpression="location_id" UniqueName="location_id" Visible="false">
                                    </telerik:GridBoundColumn>




Any help is appreciated.
Rektile
Top achievements
Rank 1
 answered on 28 Jan 2013
6 answers
137 views
Hi,
I have a page with RadAjaxpanels, ajaxmanager and scriptmanager.
what is happening is, if I make a request and while this request goes on, if I open a new browser page and make another request to the same page, it just hangs until the first request on the other browser window finishes.
I tried this in IE, FF and Chrome, all the same.
But if I open a browser in IE and another one in FF and do subsequent requests, everything is fine, they don't wait for each other.
And finally, this doesn't happen in asp.net development server, just working fine. This only happens in IIS6 when I push it to production.
I tried to change RequestQueueSize with no help.
Any ideas?
Thanks.
Craig A
Top achievements
Rank 1
 answered on 28 Jan 2013
1 answer
58 views
I'm not exactly a CSS expert (or styling expert). 

I have a 4.0 web app with two master pages and a system-wide css file.  The master pages both have SkinManagers set to Transparent.  All the grids (and most other Telerik controls have their skin set to default.) 

Each master page has a reference to the system css:   <link href="../Content/CSS1.css" rel="stylesheet" />

The problem is this.  I want all grids to have a alternating row back color of Alice Blue. I have a declaration: 
div.RadGrid .rgAltRow {  background: AliceBlue; }

If I put this in the main CSS file, nothing happens.  If I put this in the master pages, within a <style> block, it works fine.

What am I doing wrong?
Maria Ilieva
Telerik team
 answered on 28 Jan 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?