ラベル gridview の投稿を表示しています。 すべての投稿を表示
ラベル gridview の投稿を表示しています。 すべての投稿を表示

2012年3月28日水曜日

Resizing the Ajax ResizableControlExtender durning the OnLoad event

I'm having a problem with the Ajax ResizableControlExtender.

The control is around an asp panel, which is around a gridview. The gridview is really wide, and I need the headers to stay at the top when scrolling down. That's working just fine.

I have a body onresize javascript event that resizes the ResizableControlExtender to fit better on the screen whenever the screen is resized.

What I need to do is have the resize event fire on the "OnLoad" event.

But at that time the ResizableControlExtender has not been initialized (or so I suppose) and is undefined at that time.

Is there a way to resize the ResizableControlExtender to the current window size in the page load event?

Thanks.

Chuck Snyder

Hi Chuck,

Based on my understanding, the pageLoad method is fired after all extenders on the page have been initialized. But if it doesn't work with you, please try to use window.setTimeout method to invoke the resize method in pageLoad, so that it will be called asynchronized at later.

For instance:

function pageLoad() { window.setTimeout(resize, 1000); }

Response.Redirect

This is the code to redirect to a new page from a GridView...

protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
string SeqNo = "";
string dd = "";
int ix = GridView1.SelectedIndex;

if (ix >= 0)
{
SeqNo = GridView1.SelectedRow.Cells[4].Text;
dd = GridView1.SelectedRow.Cells[1].Text;
if ( (SeqNo.Trim() != "") && (dd.Trim() != "") )
Response.Redirect(String.Format("DocketOnline.aspx?DocketDate={0}&SeqNo={1}&cn={2}", dd, SeqNo, FCaseNo));
}
}

Prior to placing the GridView in an UpdatePanel, the code above worked fine. Now clicking on the Select column, triggering the code above, gives the error:

Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500

How do I fix this?

All I want is to have GridView in an UpdatePanel so that paging is AJAXed...I also want the user to be able to select a command column to go to another page.

Thanks,

Jay

You would either have to:

1. on the RowDataBound register javascript to open a new window for the selected row event...

or

2. Just use a link button and set the url and targetpane properties in a column to open a new window or to navigate to the new page.

or - cancel the asynchpost prior to the redirect and then redirect (not sure this one will work though)...

Using the response.rediect in asynch the ScriptManger gets involved and things just get messy...because it intercepts everything and the response.redirect messes up the expected structure it is figuring on sending to the client for the partial page update..


Hi,

I have a user control which does not have script manager. In this user controll I input zipcode and it will populate the city state. This user control in on the main page along with other user controls. Script manager is on the main page. There is no script manager proxy. When I click on the button to populate the city state info it is populating it but whole page is refreshed instead of city and state which is inside the update panal. Does anyone have any idea whats causing this issue?

Regards,
Nepalaya


Response.Redirect should work fine during an async postback.

2012年3月26日月曜日

Restore position of a modal panel after postback

There is a modal panel which was created with the help of a modalPopupExtender. There is also an updatePanel and a GridView on it. Selecting a row in the GridView raises postback what sets the position of modal panel to default value (center of the screen). How to restore position at the moment of postback?

Hi,

According to your problem, I think you may keep the position of the modalPopup in two hiddenfileds outside UpdatePanelbefore postback, and set the popup's position to those values in hiddenFields inendRequest event handler.

For instance:

function beginRequestHandler()
{
$get("hfX").value = $find('behaviorIDOfModalPopup').get_X();
$get("hfY").value = $find('behaviorIDOfModalPopup').get_Y();
}

function endRequestHandler()
{
$find('behaviorIDOfModalPopup').set_X($get("hfX").value);
$find('behaviorIDOfModalPopup').set_Y($get("hfY").value);
}

Hope this helps.


Thanks,

There is one more solution:

function BeginRequest(sender, args) { var s = $get('Panel1').style.left; $find('ModalPopupExtender1').set_X(s.substring(0, s.length - 2)); s = $get('Panel1').style.top; $find('ModalPopupExtender1').set_Y(s.substring(0, s.length - 2)); }

Retaining GridView cell color on postback

I have a GridView in an UpdatePanel in which I use JavaScript to allow the user to change cell colors on the fly. It works great, until a postback occurs in which case, all of the user changes are lost. How do I maintain the cell colors after postback? I am trying to use a Save button to store the status of each cell to a database. Unfortunately, the cell colors are reset immediately, so even the save routine does not work correctly.

Thanks for any help you can provide,

Todd

Here is the script used to change the color of a cell when the user right-clicks on it:

<script type="text/javascript"><!-- /* script for changing the background color of the table cells based on the "Selection Mode" */ document.getElementById('ctl00_MainContentPlaceHolder_gvWafer').onmousemove = MouseMove; document.getElementById('ctl00_MainContentPlaceHolder_gvWafer').onmousedown = MouseMove; document.getElementById('ctl00_MainContentPlaceHolder_gvWafer').oncontextmenu = DontShowContext; document.getElementById('ctl00_MainContentPlaceHolder_gvWafer').onmouseup = MouseUp; // handle the MouseMove event for the GridView control function MouseMove(event) { // IE doesn't pass the event object, so we have to pass it manually if (event == null) event = window.event; /* only select table cells if the right mouse button is pressed and the underlying item is a 'TD' element (table data) */ if (event.button == 2 && event.srcElement.tagName == 'TD') { var cell=event.srcElement; var cellValue=cell.innerHTML; /* display the row and column indexes in the browser status bar */ window.status="row, column = " + cell.cellIndex + "," + cell.parentElement.rowIndex; /* determine which item in the Selection Mode drop down list box is selected */ switch(document.getElementById( 'ctl00_MainContentPlaceHolder_ddlSelectMode').getAttribute( 'selectedIndex')) { case 1: // available /* Don't allow cells marked as QC Samples to be marked Available */ if (cell.style.backgroundColor != '#996600') { // GREEN cell.style.backgroundColor='#00FF00'; } break; case 2: // picked /* Don't allow cells marked as QC Samples to be marked as Picked */ if (cell.style.backgroundColor != '#996600') { if (cellValue >= 20 || cellValue <= 200) { // GRAY cell.style.backgroundColor='#999999'; } else { // WHITE cell.style.backgroundColor='#FFFFFF'; } } break; case 3: // reserved /* Don't allow cells marked as either Picked or QC Samples to be marked as Reserved */ if (cell.style.backgroundColor != '#996600' && cell.style.backgroundColor != '#999999') { if (cellValue >= 20 || cellValue <= 200) { // PURPLE cell.style.backgroundColor='#9933CC'; } else { // WHITE cell.style.backgroundColor='#FFFFFF'; } } break; default: return; } } } /* clear the status bar data */ function MouseUp(event) { window.status = ""; } /* handle the ContextMenu event for the GridView control - Don't show the default context menu */ function DontShowContext(event) { return false; } if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded(); // --></script>

You are going to need to save these styles and reinitalize them on the callback of the UpdatePanel e.g.:

var prm = Sys.WebForms.PageRequestManager.getInstance();

prm.add_endRequest(EndRequestMethod);

prm.add_beginRequest(BeginRequestMethod);

...or you can add your logic to the server side. The problem is that you are rebinding the whole GridView and obviously client-side changes aren't persisted.

-Damien


Get the current PageRequestManager instane and

try to use beginRequest and endRequest


Thanks for both of your inputs. I don't know why I expected the JavaScript to make the changes to the GridView control. I forgot that the GridView control is rendered as a Table and that the JavaScript was simply modifying the Table. I actually took a little bit different route to solve the problem (I didn't see your replies until just a few minutes ago...had email notification turned off by mistake).

So, since the GridView is rendered as a Table and JavaScript cannot change GridView properties, I had to somehow track the changes that were made to the Table and propagate them to the GridView control.

I decided to create a TextBox control in which the JavaScript code would write the changes made to the cells (in the format "[row],[column]=[color]\n"). My VB code then parses out those changes and makes the corresponding change in the GridView control. I make the width and height of the TextBox zero so that it is not visible.

It may not be the best way to accomplish the task, but it is working. Since this is for an intranet application, and I have a ton more work to do, I am going to stick with it. The next time I run into a problem like this I will keep the other suggested solutions in mind.

Thanks,

Todd

2012年3月24日土曜日

Returning a dataset from a web service

Say I have a page that calls a web service from a client function to get some data to bind a gridView like this:

-------------------

<scripttype="text/javascript"language="JavaScript">

function GetDataSet(){

var ds = SimpleService.ActiveProcess();

}

</script >

-------------------

And the web service looks something like this:

-------------------

[WebMethod]

public datasetActiveProcess(){

string connectionString ="Connstring stuff here";

DataSet ds = csql.GetActiveProcess(connectionString);

return ds;

}

-------------------

Of course, because I'm posting this problem, this isn't the correct way to implement this kind of solution...

Question is: Is there a better way? Or how do I manage to handle and display what's being returned from this web service in the web page?

thanks.

doug

This issue is associated with an Atlas Web Service call.

Here is a crude solution that I still need to refine:

------------------------

1. JavasScript call to webservice:

------------------------

function fnSetTimeout( ){

//this is the call to the web service.

var ds = SimpleService.ActiveProcess(OnComplete, OnTimeout);

}

------------------------

2. Webservice method

------------------------

[WebMethod]

publicstring ActiveProcess(){

string connectionString ="Integrated Security=SSPI;Persist Security Info=False;User ID=sa;Initial Catalog=simple2;Data Source=local

string xmlReader = csql.GetActiveProcess(connectionString);

return xmlReader;

}

------------------------

3 Webservice method

------------------------

publicstring GetActiveProcess(string connString)

{

string strSQL ="Select id, threadid, conversationId from ActiveProcess";

SqlConnection conn =newSqlConnection(connString);

SqlDataAdapter da =newSqlDataAdapter(strSQL, conn);

DataSet ds =newDataSet();

try

{

conn.Open();

da.Fill(ds);

XmlDataDocument xmlDataDocument =newXmlDataDocument(ds);

return xmlDataDocument.OuterXml.ToString();

}

catch (SqlException ex)

{

returnnull;

}

}

------------------------

3 Load the XML into parser

------------------------

/*==============================================================================

function: OnComplete

paramaters: result

Purpose: Gets the results from the ATLAS call and parses into an XML document

Date: 12/21/2005

==============================================================================*/

function OnComplete(result)

{

//Load XML

var XMLDoc =new ActiveXObject("Microsoft.XMLDOM");

try

{

XMLDoc.loadXML(result);

}

catch(err)

{

alert(err.description);

}

//Load XSL

var XSLDoc =new ActiveXObject("Microsoft.XMLDOM");

try

{

XSLDoc.async =false;

XSLDoc.load("ActiveRecords.xsl");

}

catch(err)

{

alert(err.description);

}

//Write the results of the transformation out to the div.

document.all.divTable.innerHTML = XMLDoc.transformNode(XSLDoc);

}

Here's the XSL if you're interested:

<?xmlversion="1.0"encoding="utf-8"?>

<xsl:stylesheetversion="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:templatematch="/">

<html>

<head>

<title>Active</title>

<style>

copy { font-family: Arial, Verdana;}

h1 { font-family: Arial, Verdana; font-size: 14pt;}

p { font-family: Arial, Verdana; font-size: 10pt;}

</style>

</head>

<body>

<p><fontface="verdana">Active</font></p>

<tableborder="1">

<tr>

<thclass="copy">ID</th>

<thclass="copy">Thread Id</th>

<thclass="copy">Configuration ID</th>

</tr>

<xsl:for-eachselect ="NewDataSet/Table">

<tr>

<td>

<xsl:value-ofselect="id"/>

</td>

<td>

<xsl:value-ofselect="threadid"/>

</td>

<td>

<xsl:value-ofselect="conversationId"/>

</td>

</tr>

</xsl:for-each>

</table>

</body>

</html>

</xsl:template>

</xsl:stylesheet>

thanks...

RightClick Menu

Dear Team

I am using ASP.NET2.0, C#, JavaScript, AJAX

I want to make a right click menu working on GridView, with some items inside the meun, and when I press on it I can handle it from Javascript or from server side and I can fill this menu from Server side if it is possible.

So how can I do that?

Thank you.

dear Team
i did use the control found in this site:http://msdn.microsoft.com/msdnmag/issues/05/02/CuttingEdge/

i am working with ASP.NET2.0, C#, AJAX, JAVASCRIPT.

if you please i want to know the following:
1 - why dose the context menu postback, i mean if i want only to use it in the client side, is there a way for it.
2 - i am using the context menu with a gridview so i want to know the current row index, from javascript and if possible from C# too.
3 - i want to know what i clicked on the menu from Javascript.

please advise me what to do.
i am stuck in this problem for 1 week now and i didnt find any solution.
i want you to know that i download the control and i use it sand it is working for me but i want to know these point that will solve my whole problem.

thank you so much in advance.
this is my Email:
zonzone@.hotmail.com

RJS Calendar in GridView with Atlas

Hi all,

I am using Atlas in my web application. In edit template of grid view, I am using RJS Calendar (a third party). Every thing works normal while viewing the page without Atlas. When atlas is implemented on that page, calendar still works fine for Firefox but not for IE 7.0. It returns javascript error and calendar control wont open. As soon as Atlas is removed, it starts working again. For last two days, I am unable to resolve this problem. If any one have any idea/solution, please let me know.

Thanks in advance.
Best Regards.

I am having exactly the same problem. It works great in Firefox, but reports an error in IE, which says,

Char: 1
Error: 'document.getElementById(...)' is null or not an object.
Code: 0

I am using MagicAjax.

Any workaround for IE7.0?

2012年3月21日水曜日

RoundedCornerExtender and gridview do not match.

I created a cortrol that works ok except for the rounded corner on the panel that contains a gridview of selectable items.

i know it has to do with the size of the panel but the grid view will be different heights depending on the items returns for that page.

this one has to be a common problem.

Specificly the rounded corner bottom appears in the middle of the gridview.

Thanks!

KES

Hi,

You may specify the panel's height & width programmatically in the databound event of the GridView.


Thank you for responding

I know i can set the panel size and width the question is by how much? some lines wrap and other do not. I am really looking for a way to get the extender to reconize the current size of the panel as dictated by the objects populating it.


What about use percentage to represent the panle's width and height. For instance:

<%@. Page Language="C#" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server"></script><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager>    </div> <asp:Panel ID="Panel1" runat="server" Height="60%" Width="80%"> <asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1" Height="100%"> </asp:GridView> <ajaxToolkit:RoundedCornersExtender ID="RoundedCornersExtender1" runat="server" BehaviorID="RoundedCornersBehavior1" BorderColor="blue" TargetControlID="Panel1" Radius="6" Corners="All" /> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString%>" SelectCommand="SELECT [EmployeeID], [LastName], [FirstName], [Title], [TitleOfCourtesy] FROM [Employees]" ProviderName="<%$ ConnectionStrings:NorthwindConnectionString.ProviderName%>"> </asp:SqlDataSource> </asp:Panel> </form></body></html>

RoundedCornersExtender confilicting with ModalPopupExtender in IE ?

hey every one i have the following code ... when you comment out RounedCornersExtender...the gridview dispears when the page loads

any idea why that is... only happnes in IE ..mozilla works fine :S

<%@dotnet.itags.org. Page Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Admin_Default" Title="Campaigns" %><%@dotnet.itags.org. Register Assembly="AtlasControlToolkit" Namespace="AtlasControlToolkit" TagPrefix="atlastoolkit" %><asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"> <atlas:ScriptManager ID="sm1" runat="server" EnablePartialRendering="True"> </atlas:ScriptManager><%-- <atlastoolkit:RoundedCornersExtender ID="rce" runat="server"> <atlastoolkit:RoundedCornersProperties TargetControlID="GV_CampaignList" Radius="8" Color="#507CD1" /> </atlastoolkit:RoundedCornersExtender>--%> <atlastoolkit:ModalPopupExtender ID="MPE" runat="server"> <atlastoolkit:ModalPopupProperties TargetControlID="insertLnkBtn" PopupControlID="insertPnl" BackgroundCssClass="modalBackground" /> </atlastoolkit:ModalPopupExtender> <div class="MessageHeader"> Campagins </div> <br /> <hr /> <div id="MainContent"> <asp:GridView ID="GV_CampaignList" runat="server" Width="400px" HorizontalAlign="Center" AllowPaging="True" AllowSorting="True" DataSourceID="DS_GetAllCampagins" CellPadding="4" ForeColor="#333333" GridLines="None" AutoGenerateColumns="False" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" OnSelectedIndexChanging="GridView1_SelectedIndexChanging"> <Columns> <asp:CommandField ShowSelectButton="True" /> <asp:BoundField DataField="C_SiebelID" HeaderText="ID" /> <asp:BoundField DataField="C_Title" HeaderText="Name" SortExpression="C_Title" /> <asp:CommandField ShowEditButton="True" /> <asp:CheckBoxField DataField="C_isActive" HeaderText="Active" /> </Columns> <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <RowStyle BackColor="#EFF3FB" /> <EditRowStyle BackColor="#2461BF" /> <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /> <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /> <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" /> <AlternatingRowStyle BackColor="White" /> <PagerSettings Position="TopAndBottom" /> </asp:GridView> <br /> <asp:LinkButton ID="insertLnkBtn" runat="Server" OnClientClick="ShowPanel();">Create New Campaign</asp:LinkButton> <script language="javascript" type="text/javascript"> function ShowPanel(){ document.getElementById('ctl00_ContentPlaceHolder1_insertPnl').style.visibility = "visible"; } </script> </div> <br /> <asp:Panel ID="insertPnl" runat="server" CssClass="popupControl"> <asp:DetailsView ID="DetailsView1" runat="server" CssClass="DetailView" AlternatingRowStyle-CssClass="DetailViewEven" HorizontalAlign="Center" GridLines="None" DataSourceID="DS_GetAllCampagins" DefaultMode="Insert"> <Fields> <asp:CommandField ShowInsertButton="True" HeaderText="Create New Campaign" ShowHeader="True" /> </Fields> <AlternatingRowStyle CssClass="DetailViewEven" /> </asp:DetailsView> </asp:Panel> <atlas:UpdateProgress ID="updating" runat="server"> <ProgressTemplate> Updating DataBase<img src="../images/ball2.gif" height="40" width="40" /> </ProgressTemplate> </atlas:UpdateProgress> <asp:SqlDataSource ID="DS_GetAllCampagins" runat="server" CacheDuration="600" ConnectionString="<%$ ConnectionStrings:LocalSqlServer%>" SelectCommand="Campaigns_Admin_GetAll" SelectCommandType="StoredProcedure" SqlCacheDependency="Campaigns" InsertCommand="Campaigns_Admin_Insert" InsertCommandType="StoredProcedure" UpdateCommandType="StoredProcedure"> </asp:SqlDataSource></asp:Content>
The GridView disappeared because the RoundedCorners was pointing at it, a TABLE, and the way RoundedCorners works is such that pointing it at a TABLE isn't great. So I added a wrapper Panel and tweaked the settings to get things centered again. The below page works for me in IE7 and FF:
<%@. Page Language="C#" %><%@. Register Assembly="AtlasControlToolkit" Namespace="AtlasControlToolkit" TagPrefix="atlasToolkit" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server"></script><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <div> <atlas:ScriptManager ID="sm1" runat="server" EnablePartialRendering="True"> </atlas:ScriptManager> <atlastoolkit:RoundedCornersExtender ID="rce" runat="server"> <atlastoolkit:RoundedCornersProperties TargetControlID="Panel1" Radius="8" Color="#507CD1" /> </atlastoolkit:RoundedCornersExtender> <atlastoolkit:ModalPopupExtender ID="MPE" runat="server"> <atlastoolkit:ModalPopupProperties TargetControlID="insertLnkBtn" PopupControlID="insertPnl" BackgroundCssClass="modalBackground" /> </atlastoolkit:ModalPopupExtender> <div class="MessageHeader"> Campagins </div> <br /> <hr /> <div id="MainContent"> <asp:Panel ID="Panel1" runat="server" Width="400px" HorizontalAlign="Center" BackColor="lightblue" style="margin-left:auto;margin-right:auto;"> <asp:GridView ID="GV_CampaignList" runat="server" Width="400px" HorizontalAlign="Center" AllowPaging="True" AllowSorting="True" DataSourceID="DS_GetAllCampagins" CellPadding="4" ForeColor="#333333" GridLines="None" AutoGenerateColumns="False" > <Columns> <asp:CommandField ShowSelectButton="True" /> <asp:BoundField DataField="C_SiebelID" HeaderText="ID" /> <asp:BoundField DataField="C_Title" HeaderText="Name" SortExpression="C_Title" /> <asp:CommandField ShowEditButton="True" /> <asp:CheckBoxField DataField="C_isActive" HeaderText="Active" /> </Columns> <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <RowStyle BackColor="#EFF3FB" /> <EditRowStyle BackColor="#2461BF" /> <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /> <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /> <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" /> <AlternatingRowStyle BackColor="White" /> <PagerSettings Position="TopAndBottom" /> </asp:GridView> </asp:Panel> <br /> <asp:LinkButton ID="insertLnkBtn" runat="Server" OnClientClick="ShowPanel();">Create New Campaign</asp:LinkButton> <script language="javascript" type="text/javascript"> function ShowPanel(){ document.getElementById('ctl00_ContentPlaceHolder1_insertPnl').style.visibility = "visible"; } </script> </div> <br /> <asp:Panel ID="insertPnl" runat="server" CssClass="popupControl"> <asp:DetailsView ID="DetailsView1" runat="server" CssClass="DetailView" AlternatingRowStyle-CssClass="DetailViewEven" HorizontalAlign="Center" GridLines="None" DataSourceID="DS_GetAllCampagins" DefaultMode="Insert"> <Fields> <asp:CommandField ShowInsertButton="True" HeaderText="Create New Campaign" ShowHeader="True" /> </Fields> <AlternatingRowStyle CssClass="DetailViewEven" /> </asp:DetailsView> </asp:Panel> <atlas:UpdateProgress ID="updating" runat="server"> <ProgressTemplate> Updating DataBase<img src="../images/ball2.gif" height="40" width="40" /> </ProgressTemplate> </atlas:UpdateProgress> <asp:XmlDataSource ID="DS_GetAllCampagins" runat="server"> <Data> <root> <item C_SiebelID="a" C_Title="b" C_isActive="false" /> </root> </Data> </asp:XmlDataSource> </div> </form></body></html>

Thank you very much Smile

RoundedCornersExtender not working

I drag an ObjectDataSource and a GridView on a page. The DataSource of my GridView is ObjectDataSource. I rhen drag a RoundedCornersExtender and configure it like such:

<cc1:RoundedCornersExtender ID="RoundedCornersExtender1" runat="server">
<cc1:RoundedCornersProperties Radius=6 TargetControlID="GridView1" />
</cc1:RoundedCornersExtender
When I run the page, the GridView briefly appears (for a split second) before disappearing.

The problem is that RoundedCorners expects to be pointed at a DIV container (asp:Panel) instead of arbitrary elements (in this case a TABLE). If you wrap the GridView with a Panel, it should work fine. Here's a sample:

<%@. Page Language="C#" %><%@. Register Assembly="AtlasControlToolkit" Namespace="AtlasControlToolkit" TagPrefix="atlasToolkit" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server"> protected override void OnLoad(EventArgs e) { base.OnLoad(e); GridView1.DataSource = "this is a test".Split(' '); GridView1.DataBind(); }</script><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <div> <atlas:ScriptManager ID="SM" runat="server"> </atlas:ScriptManager> <asp:Panel ID="P" runat="server" Style="background-color: Lime; position:absolute;"> <asp:GridView ID="GridView1" runat="server"> </asp:GridView> </asp:Panel> <atlasToolkit:RoundedCornersExtender ID="RCE" runat="server"> <atlasToolkit:RoundedCornersProperties TargetControlID="P" Radius="6" /> </atlasToolkit:RoundedCornersExtender> </div> </form></body></html>

Not working also. Here is my code:

<asp:PanelID="Panel1"runat="server"Width="1000px"CssClass="roundedPanel">

(...)

</asp:Panel>

<cc2:RoundedCornersExtenderID="RoundedCornersExtender1"runat="server"

TargetControlID="Panel1"

Corners="All"

Radius="6"/>

Here is my CSS class:

.roundedPanel

{

width:300px;

height:300px;

background-color:#ffffff;

color:black;

font-weight:bold;

}

The borders on the left am right sides doesn't render.


My issue is solve. I was missing a very important property in the extender:

BorderColor="Black"