Hey Coders, I've got a page with a few ListBox controls. The physical dimensions of the page are quite large (by mgmt declaration). Sometimes people running lower resolutions have to scroll horizontally as well as vertically to see the whole page. When they do this, the ListBox controls stop working. I tried it on my 2003 server but couldn't replicate the problem. It's easy to replicate in WindowsXP. Many thanks in advance for your assistance!
veroBT
Posts
-
ListBox scrolling stops working -
DataGrid Sorting Problem using a DataSet from ViewStateI've got a page with two panels. The first panel contains the search parameters (textboxes and drop downs). The second panel shows the results of the search. On the result page, i allow paging and sorting. Everything works great if i rebuild the dataset each time i change pages or change the sort. But when I cache the dataset in ViewState and try to change pages or the sort, it just takes my back to the parameter page automatically. Nothing else happens. Here's my code for the Sort:
ViewState.Add("str_sortOrder", e.SortExpression); DataView dvwResults = new DataView(); dvwResults = dst_searchResults.Tables[0].DefaultView[0].DataView; dvwResults.Sort = ViewState["str_sortOrder"].ToString(); this.dgr_searchResults.DataSource = dvwResults; this.dgr_searchResults.DataKeyField = "aut_companyID"; this.dgr_searchResults.DataBind();
All help is appreciated. Brian -
Changing Background for Specific items in a DataGridI have a datagrid that i populate with Invoices. I currently have the alternating item background color switching between silver and white. Now, i would like for the background to be Red for any Paid orders. How can my datagrid check whether the invoice has been paid or not? and then update the background color for just that row? All help is appreciated! Brian
-
Question using if() { } else {} in RepeaterThanks for the advice... My repeater is dealing with alot of data. Can you give me an example of your idea? (how you mean to implement this). Brian
-
Question using if() { } else {} in RepeaterI have a repeater control which displays project information. I would like to check the security to ensure that the given user has access to the project he is trying to view. SO i'm tying to do so like this...
<%# if(checkSubscribersRegions(Session["uid"].ToString(), DataBinder.Eval(Container.DataItem, "aut_projectID").ToString()) == "1") { %> display this stuff <% } else { %> display error <% } %>
Here is the error i receive:Compiler Error Message: CS1513: } expected
Can anyone help me out with this? Sincere Thanks, Brian
-
DataGrid Template w/ DropDownListWorks like a charm !! Thanks once again Datagrid Girl!
-
DataGrid Template w/ DropDownListI'm getting an error before it gets to that line... Specified cast is not valid
Line 119: DataRowView drv = (DataRowView) e.Item.DataItem;
-
DataGrid Template w/ DropDownListI have a simple drop down list located within a DataGrid Edit Template. I am having trouble trying to have the correct ListItem selected. In the Item template i am simply converting the 1 or 0 that i save in the database to a "Yes" or "No" for the users. ItemTemplate:
<%# bidtoolAdmin.library.Common.convertBooleanYesNo(DataBinder.Eval(Container.DataItem, "bln_activeFlag").ToString()).ToString() %>
EditTemplate:No Yes
I have tried the examples i've found in various articles with no luck:private void dgr_leadSources_ItemDataBound(object sender, DataGridItemEventArgs e) { if(e.Item.ItemType == ListItemType.EditItem) { DataRowView drv = (DataRowView) e.Item.DataItem; String currentFlag = drv["bln_activeFlag"].ToString(); DropDownList ddl = (DropDownList) e.Item.FindControl("ddl_activeFlag"); ddl.SelectedIndex = ddl.Items.IndexOf(ddl.Items.FindByValue(currentFlag)); } }
Please help to prevent my insanity! -
Updating Controls included in other controlsI have a user control that i created which contains a bunch of search varibles in the form of text boxes and drop-down lists. I include this control in the search page and a couple of others. I am trying to update the value of the textbox and drop down lists within this user control and can't. I have been able to read the values of the Controls using:
Control myKeywords = FindControl("ctl_search:tb_keywords"); TextBox tb_keywords = (TextBox)myKeywords; tb_keywords.Text.ToString();
But I need to update the value of those controls. Any help you can provide would be greatly appreciated! -
Paging in DataGrid stopped workingThe code behind is written in C# so the "Handles" keywords aren't used. Here is the code for the DataGrid: And here is the code behind: public void dgr_searchResultsPageIndexChanged(object sender, DataGridPageChangedEventArgs e) { setVariablesFromForm(); createProjectDataSet(); dgr_results.DataSource = dst_searchResults; dgr_results.CurrentPageIndex = e.NewPageIndex; dgr_results.DataBind(); } Thanks, BT
-
Paging in DataGrid stopped working:confused:I've created a pretty basic datagrid and had the paging working fine. Then when i created a different page (with a different datagrid) my paging stopped working for both. I used the same method name for both datagrids OnPageIndexChanged event. When i change them to different names, it still won't work. Anyone have any ideas how to fix? Here are the attributes of the Datagrid... PagerStyle-CssClass="smallblackbold" OnPageIndexChanged="dgr_searchResultsPageIndexChanged" PagerStyle-Mode=NumericPages PageSize=25 AllowPaging=True Thanks, BT.