I looked at this kynou site but the tutorial was unbearably basic and has no content about rendering custom pager controls. Are you sure this is where you saw it?? Also, an update.. the standard paging controls work, if I remove my custom pager row template, and I am also seeing the same behaviour with imagebutton controls as well, in multiple IE browsers. Any thought appreciated. -Eric
E L Golpe
Posts
-
GridView/Paging/PostBack/Master Page/Firefox but not IE -
GridView/Paging/PostBack/Master Page/Firefox but not IEThe event seems to never fire, at least I cannot get it to break in VS when attaching to the process. The ddl has it's AutoPostBack set to true, and it works fine without the Master page. Practice sesquipedalianism! ;)
-
how to embed flash in asp.netI would try putting both in an absolutely positioned DIV control's on the page, and having the loading flash object's DIV set to visible onLoad, and then after the other one is loaded, swapping the visibility. You could do this with PlaceHolder controls as well... That would be my thought on it. Good luck. Practice sesquipedalianism! ;)
-
GridView/Paging/PostBack/Master Page/Firefox but not IEHi all, I need some ideas or thoughts: I have a GridView I am populating from a cached DataView with sorting and paging. My pager row is a custom template with a drop-down list: The user selects the page of the ddl and they are posted-back to that particular page using the cached DataView and a filter. This worked fine on it's own, in both IE and Firefox.. No problems there.. but as soon as I placed the GridView in a content control in a C# Content page, which is called into the Master page ContentPlace Holder, the Paging NO LONGER functions in Internet Explorer, yet the paging works fine in Firefox.. Also, the sorting works like a charm in both IE and Firefox, in the Master page configuration. I even tried setting a breakpoint while attaching to the IE process (w3wp.exe) and guess what: the breakpoint isn't getting hit!! Is their a difference in the event model when using a Master Page, and only in IE?? anyone have any thoughts??? Thanks! -Eric Practice sesquipedalianism! ;)
-
Help with GridView Paging PLEASEPROBLEM: No matter what I do, I can't seem to get GridView paging to work programatically. BACKGROUND: OK, I have a biztier referenced in my solution. The biztier has two methods, one returning a SqlDataReader from a StoredProc, and the other returning a DataTable created from the previous method. For sure I know I cannot get paging (or sorting) from the DataReader.. but I thought I could get it from a DataTable, or a DataView, since they implement IEnumerable. CODE: On first trip, the page calls ShowClicks() with the code below. If I click a Pager button, the page posts back with the correct NewPageIndex, but I get blank results.. this happens if I call DataBind() or not. Even assigning the DataTable directly (without caching it) or creating a DataView, I get the same behaviour. Anyone have an idea what gives? :(
private void ShowClicks()
{
PAYCAdmin AdminBL = new PAYCAdmin();
DataTable dt = null;
dt = AdminBL.GetAdminDailyClickStatsDT();
// Insert DataTable into Cache object
Cache.Insert("dtCache", dt);
DataTable dtCache = (DataTable)Cache.Get("dtCache");
gvClicks.DataSource = dtCache;
//gvClicks.EnableSortingAndPagingCallbacks = true;
gvClicks.PageSize = 15;
gvClicks.DataBind();
}protected void gvClicks\_PageIndexChanging(object sender, GridViewPageEventArgs e) { gvClicks.PageIndex = e.NewPageIndex; gvClicks.DataBind(); }
Practice sesquipedalianism! ;)
-
DataGrid ButtonsCheck the editable property of your columns. It should be set to allow editing to be visible. Practice sesquipedalianism! ;)
-
Calling a javascript to a user controlActually the concept of includes came from html, in what was called Server-Side-Includes (SSI pages.) Almost every web scripting language has the concept built-in today, but the first major implementation of includes came in Microsoft (Vermeer) FrontPage. Javascript can already be 'included' with the tag pointed to the .js file, and you could include from that particular .js file if your server is set to parse it for directives. If you going through this much trouble to hide JavaScript tho, you probably shouldn't be working with it in the first place. Work with server-side javascript or create downloadable smart-client applications. Practice sesquipedalianism! ;) -- modified at 11:10 Saturday 25th March, 2006</x-turndown>
-
Cant find Server.ExecuteAre you talking about Intellisense? In VS2003/2005?? As far as I know the Intellisense supports ASP.NET, not .asp classic objects. You would need to use something like (eeeekk) Visual InterDev, which had basic Intellisense. Why not just type Server.Execute()? You can probably make a macro in VS to type it for you, or better yet, a custom code snippet in the snippets manager. Have fun. Practice sesquipedalianism! ;)
-
Problem executing a Stored procedure un SqlServerTry setting your SqlCommand.CommandTimeout parameter to something higher, like (1000) and see if that helps. The default timeout for commands is 30 seconds, and probably your reader hasn;t finished the reading. Practice sesquipedalianism! ;)
-
data gridDid you forget to instantiate the DataSet? DataSet ds = new DataSet(); Practice sesquipedalianism! ;)
-
Host HeadersA host header is the forward payload section of a request packet, sent ahead of any body payload (where your html source code would normally be, or in this forums case, aspx code) :(( Practice sesquipedalianism! ;)
-
Two Part GridView QuestionONE I have a ButtonField column in a GridView like so:
asp:ButtonField DataTextField="Day" HeaderText="Date" CommandName="Detail"
It lists the dates.. like 2,3,4,5,6 and so on in each GridRow. I want to fetch the date as an integer. I tried:
int nDay = Convert.ToInt32(gvStats.SelectedRow.Cells[0].Text);
but the SelectedRow is null. How do I go about it? ie:What object holds the correct value? TWO In my former DataGrid I have:
if (dgClicks.DataKeys[dgItem.DataSetIndex] != System.DBNull.Value)
can this be written as
if (gvClick.DataKeys[gvRow.DataSetIndex].Value != System.DBNull.Value)
Will it work correctly? Is this a valid conditional? ANY help on either would be GREATLY appreciated. Thanks Practice sesquipedalianism! ;)
-
OleDbConnection Problem...See if you can do something like daDBF.CommandTimeOut(3000); or something. You should set the OleDBCommand.CommandTimeout setting higher than the default 30 seconds first t see if it rectify's the situation.. Practice sesquipedalianism! ;)
-
binding DataGrideViewLike the GridView, the DetailsView control can bind to any data source control and exploit its set of data operations. It can page, update, insert, and delete data items in the underlying data source as long as the data source supports these operations. In most cases, no code is required to set up any of these operations. You can customize the user interface of the DetailsView control by choosing the most appropriate combination of data fields and styles in much the same way that you do with the GridView. Finally, the DetailsView control fully supports adaptive rendering and renders successfully on mobile devices. The DetailsView control deliberately doesn’t support templates. A fully template based details-view control is the FormView. FormView is a new data-bound control that works like the templated version of the DetailsView. It renders one record at a time picked from the associated data source and optionally provides paging buttons to navigate between records. Unlike the DetailsView control, FormView doesn’t use data control fields and requires the user to define the rendering of each item using templates. The FormView can support any basic operation its data source provides. In ASP.NET 2.0, data sources, GridView, and DetailsView controls enable a no-code master/detail scenario. A master/detail page contains a master control (such as a GridView) and a detail control (such as a DetailsView), each bound to its own data source. The trick is in binding the detail control to a data source represented by the currently selected record. Practice sesquipedalianism! ;) -- modified at 8:17 Friday 24th March, 2006
-
DG->GridView problem...I need a guru's advice: I am porting datagrids over to gridviews, and have the following old code:
foreach (DataGridItem dgItem in dgClicks.Items) { CheckBox chkSelected = (CheckBox)dgItem.FindControl("chkSelection"); if (chkSelected != null && chkSelected.Checked) { if (dgClicks.DataKeys[dgItem.DataSetIndex] != System.DBNull.Value) { int nTopupRequestID = (Int32)dgClicks.DataKeys[dgItem.DataSetIndex]; BL.receipts.BlockCapturedTransaction(nTopupRequestID, edBlockReason.Text); } } }
But I can't seem to figure out how to fix the second conditional in what I have written to convert.. I keep getting an operator overload error..foreach (GridViewRow gvRow in gvClicks.Rows) { CheckBox chkSelected = (CheckBox)gvRow.FindControl("chkSelection"); if (chkSelected != null && chkSelected.Checked) { **if (gvClicks.DataKeys[gvRow.DataItemIndex] != System.DBNull.Value)**:confused: { int nTopupRequestID = Convert.ToInt32(gvClicks.DataKeys[gvRow.DataItemIndex]); BL.receipts.BlockCapturedTransaction(nTopupRequestID, edBlockReason.Text); } } }
I'm sure this is an easy fix for some of yu guys.. so what did I do wrong? Is there a better way to approach this with the GridView?? Hoping for someones kind assistance! -Eric Practice sesquipedalianism! ;) **-- modified at 8:27 Friday 24th March, 2006 LETS SHORTEN MY QUESTION.. HOW WOULD YOU WRITE THIS WITH A GRIDVIEW, NOT A DATAGRID??if (dgClicks.DataKeys[dgItem.DataSetIndex] != System.DBNull.Value)
**
-
.NET Version 7.0 and 7.1 incompatabilityhttp://www.codeproject.com/macro/vsconvert.asp Practice sesquipedalianism! ;)
-
Managed C++ server side executables ?One of the major benefits of Microsoft® .NET is that it provides a language-independent development system. You can write classes in Visual Basic®, C++, C#—whatever—and use them in other languages; you can even derive from classes in a different language. But what happens when you want to call some old-school unmanaged DLL? You have to somehow translate .NET objects into the structs, char*'s, and function pointers C expects. In techno lingo, your parameters must be marshaled. Marshaling is a big topic, but luckily you don't have to know much to get the job done. To call a DLL function from C#, first you must provide a declaration, something programmers using Visual Basic have been doing for years. In C#, it's DllImport: using System.Runtime.InteropServices; // DllImport public class Win32 { [DllImport("User32.Dll")] public static extern void SetWindowText(int h, String s); } In C#, you use DllImport to tell the compiler where the entry point lives and bundle your wrapper functions inside a class. You can give this class any name you like; I chose Win32. You can even put the class inside a namespace. To compile Win32API.cs, type: csc /t:library /out:Win32API.dll Win32API.cs Now you have a Win32API.dll you can use in any C# project. using Win32API; int hwnd = // get it... String s = "I'm so cute." Win32.SetWindowText(hwnd, s); Practice sesquipedalianism! ;)
-
flicker on resizing tabcontrolsSYMPTOMS When making a call to TabPage.setSelectedTab() from within an OnSelectedIndexChanged event handler of the parent TabControl, the focus will first go to the user-selected index before returning to the index value set in the setSelectedTab() call. In addition, when returning to the index set in code by the setSelectedTab() call, the children components of the set TabPage will not be visible and Control.setVisible(true) must be used, causing a noticeable flicker. RESOLUTION To work around this problem, call Control.setVisible(true) on the TabPage after the setSelectedTab() call is made. Maybe on the resize event you need to again setVisible(true) to get the flicker to go away? Give it a whirl and see what happens... Practice sesquipedalianism! ;)
-
"Unspecified error" when trying to open Visual Source Safe from Visual Studio 2003 .NETIf you rename a subproject in a Visual Studio .NET Enterprise Template project before you check out the solution, Visual SourceSafe updates the solution but does not check out the solution. Later, when another user tries to work with the source code control copy of the project, the user may receive "Unspecified Error" messages. CAUSE When you rename the subproject, Visual SourceSafe updates the source control information in memory to the solution file. However, because you did not check out the solution file, SourceSafe does not change the source control copy of the solution. RESOLUTION To work around this issue, follow these steps: Close the solution, which may require you to quit the Visual Studio .NET integrated development environment (IDE). Delete all of the .vsscc, the .vssscc, and the .vspscc files from all of the project and solution folders. Reopen the solution. Remove any projects that will not load, and then add them. Projects may not load for several reasons, for example, because the binding information may be incorrect, or because you may receive errors. Add the solution to source code control to a new project. Practice sesquipedalianism! ;)
-
.NET (specifically C++ .Net) and GUI Development?Hi Steven, I am a more Java And C# oriented guy who knows C++ too. VisualStudio.NET for any langauge is super easy, akin to Borland's Delphi 6 IDE or better. The base is the Framework Class Library which still allows you to do unmanaged code (read:pointers) and play with MFC's "toothpicks" (LOL) C# is pretty robust and easy though, and you should be able to use the upgrade wizards to pretty easily transform your project to the .NET environment from 6.0, and the IDE is like using VB 6.0 with a few minor changes. The intellisense and DYNAMIC HELP is well worth the investment in VisualStudio, and you can get it pretty cheap in some places. Again, just my opinion. Practice sesquipedalianism! ;)