Click here to Skip to main content
15,901,666 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionhow to develop website without using update panels using ajax. Pin
ashok@techxygen12-Nov-08 18:13
ashok@techxygen12-Nov-08 18:13 
AnswerRe: how to develop website without using update panels using ajax. Pin
Brij12-Nov-08 18:39
mentorBrij12-Nov-08 18:39 
GeneralRe: how to develop website without using update panels using ajax. Pin
ashok@techxygen12-Nov-08 19:47
ashok@techxygen12-Nov-08 19:47 
GeneralRe: how to develop website without using update panels using ajax. Pin
Brij12-Nov-08 20:22
mentorBrij12-Nov-08 20:22 
QuestionSoap Error Pin
SNI12-Nov-08 18:08
SNI12-Nov-08 18:08 
QuestionHow to do Silent Remote Instalation in >net ? Pin
subrat4all12-Nov-08 17:41
subrat4all12-Nov-08 17:41 
AnswerRe: How to do Silent Remote Instalation in >net ? Pin
Padmanabh Ganorkar12-Nov-08 23:13
Padmanabh Ganorkar12-Nov-08 23:13 
Questionaddressing a GridView column Pin
Member 294507912-Nov-08 14:03
Member 294507912-Nov-08 14:03 
Hi,

This is my first question posted here so please go easy on me Smile | :)

I've been searching around and trying all sorts of things to solve this problem but still no luck...

after I bind the data to the wanted GridView, I can not address a specific column that I want to set to visible = false.

I keep getting this error: "Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index". Debugging shows that Grid has data and it is not empty, so I do not see a reason for this to happen.

here is an example code and the stack trace:
private void GetUpdated()
{
    DataSet ds = new DataSet();
    DataTable dt = new DataTable();
    dt = myData.RetrieveData("db_GetCaseLastUpdate").Tables[0];
    dt.Columns.Remove("IncidentId");
    dt.Columns[1].ColumnName = "Last Modified";
    grid_Update.DataSource = dt;
    grid_Update.DataBind();
    grid_Update.Columns[0].Visible = false;  <-- sorce error
}


Stack Trace:

[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
System.Collections.ArrayList.get_Item(Int32 index) +2880797
System.Web.UI.StateManagedCollection.System.Collections.IList.get_Item(Int32 index) +9
System.Web.UI.WebControls.DataControlFieldCollection.get_Item(Int32 index) +5
_Default.GetUpdated() in c:\Documents and Settings\customerservices\My Documents\Visual Studio 2005\WebSites\AjaxControlToolkitWebSite1\Default.aspx.cs:81
_Default.Page_Load(Object sender, EventArgs e) in c:\Documents and Settings\customerservices\My Documents\Visual Studio 2005\WebSites\AjaxControlToolkitWebSite1\Default.aspx.cs:26
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436


Also, I can't seem to find a way to change a column's width.

I hope this is the right forum for this question...
TIA for your help!!!
AnswerRe: addressing a GridView column Pin
Sam.M12-Nov-08 17:44
Sam.M12-Nov-08 17:44 
GeneralRe: addressing a GridView column Pin
Member 294507912-Nov-08 19:12
Member 294507912-Nov-08 19:12 
GeneralRe: addressing a GridView column Pin
Sam.M12-Nov-08 19:40
Sam.M12-Nov-08 19:40 
QuestionPage unload event Pin
Dushan12312-Nov-08 13:52
Dushan12312-Nov-08 13:52 
AnswerRe: Page unload event Pin
N a v a n e e t h12-Nov-08 16:47
N a v a n e e t h12-Nov-08 16:47 
Questionpage level variable Pin
Dushan12312-Nov-08 13:49
Dushan12312-Nov-08 13:49 
AnswerRe: page level variable Pin
N a v a n e e t h12-Nov-08 16:48
N a v a n e e t h12-Nov-08 16:48 
AnswerRe: page level variable Pin
Brij12-Nov-08 18:12
mentorBrij12-Nov-08 18:12 
AnswerRe: page level variable Pin
Guffa12-Nov-08 22:23
Guffa12-Nov-08 22:23 
Questionpage events - please help Pin
BdvPetrov12-Nov-08 11:18
BdvPetrov12-Nov-08 11:18 
AnswerRe: page events - please help Pin
N a v a n e e t h12-Nov-08 16:52
N a v a n e e t h12-Nov-08 16:52 
Questiondetailsview does not update Pin
hassanmohamed12-Nov-08 9:55
hassanmohamed12-Nov-08 9:55 
QuestionSession Code Pin
bsse12-Nov-08 8:33
bsse12-Nov-08 8:33 
AnswerRe: Session Code Pin
Paul Conrad12-Nov-08 11:22
professionalPaul Conrad12-Nov-08 11:22 
AnswerRe: Session Code Pin
N a v a n e e t h12-Nov-08 16:58
N a v a n e e t h12-Nov-08 16:58 
QuestionRegarding GridView Update Pin
dayakar_dn12-Nov-08 7:36
dayakar_dn12-Nov-08 7:36 
AnswerRe: Regarding GridView Update Pin
N a v a n e e t h12-Nov-08 16:59
N a v a n e e t h12-Nov-08 16:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.