Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
GeneralRe: Hyperlinks to access outlook items Pin
Anthony Mushrow5-May-08 2:37
professionalAnthony Mushrow5-May-08 2:37 
GeneralRe: Hyperlinks to access outlook items Pin
asasov5-May-08 2:40
asasov5-May-08 2:40 
QuestionAsynCallback Pin
AlexPizzano5-May-08 1:28
AlexPizzano5-May-08 1:28 
QuestionHow to access the rights and authorised users of a shared folder (in C# web based application)? Pin
Deepali Dhingra5-May-08 0:48
professionalDeepali Dhingra5-May-08 0:48 
AnswerRe: How to access the rights and authorised users of a shared folder (in C# web based application)? Pin
Peter Josefsson Sweden5-May-08 3:01
Peter Josefsson Sweden5-May-08 3:01 
GeneralRe: How to access the rights and authorised users of a shared folder (in C# web based application)? Pin
Deepali Dhingra6-May-08 19:27
professionalDeepali Dhingra6-May-08 19:27 
GeneralRe: How to access the rights and authorised users of a shared folder (in C# web based application)? Pin
Peter Josefsson Sweden6-May-08 22:04
Peter Josefsson Sweden6-May-08 22:04 
QuestionWhile editing a cell that is newly created in GridView throws Index out of range error Pin
vytheese4-May-08 23:19
professionalvytheese4-May-08 23:19 
<br />
namespace WindowsFormsApplication1<br />
{<br />
    public partial class Form1 : Form<br />
    {<br />
        private List<Data> dataList = new List<Data>();<br />
        public Form1()<br />
        {<br />
            InitializeComponent();<br />
           // FillData();<br />
            dataGridView1.DataSource = dataList;<br />
        }<br />
<br />
        private void addTToolStripMenuItem_Click(object sender, EventArgs e)<br />
        {<br />
            dataList.Add(new Data() { Name = "V", LastName = "J" });<br />
            dataGridView1.DataSource = null;<br />
            dataGridView1.DataSource = dataList;            <br />
        }<br />
<br />
        private void FillData()<br />
        {<br />
            dataList.Add(new Data() { Name = "V", LastName = "J" });<br />
            dataList.Add(new Data() { Name = "A", LastName = "B" });<br />
            dataList.Add(new Data() { Name = "C", LastName = "D" });<br />
        }<br />
    }<br />
<br />
    public class Data<br />
    {<br />
        public string Name { get; set; }<br />
        public string LastName { get; set; }<br />
    }<br />
}<br />


In the above code I try to add a data in the List through gridview by using context menu.
Its working fine if already List is populated by data.

But fails if I try to add a data without the List is populated.
Scenario on fail:
screen 1: Form with empty gridview is shown.

screen 2: I right click the gridview which show the context menu "Add", when I clicks addTToolStripMenuItem_Click method is called. which creates the data and adds in the list.

screen 3: The gridview with the one data is appearing.

scrren 4: When I tried to click on the cell ( i.e, newly created ). The error is getting thrown "IndexOutOfRange" -1.

Is I am missing any propeties to set.

Thanks in advance

Regards,
Vythees

Miles to go before sleep...

AnswerRe: While editing a cell that is newly created in GridView throws Index out of range error Pin
Luc Pattyn4-May-08 23:33
sitebuilderLuc Pattyn4-May-08 23:33 
GeneralRe: While editing a cell that is newly created in GridView throws Index out of range error Pin
vytheese5-May-08 0:13
professionalvytheese5-May-08 0:13 
QuestionProblem with Modal Form Pin
MehmetFurkan4-May-08 22:21
MehmetFurkan4-May-08 22:21 
AnswerRe: Problem with Modal Form Pin
Anindya Chatterjee4-May-08 22:39
Anindya Chatterjee4-May-08 22:39 
AnswerRe: Problem with Modal Form Pin
Luc Pattyn4-May-08 23:14
sitebuilderLuc Pattyn4-May-08 23:14 
QuestionException : RowNotInTableException was unhandled by user code Pin
cocoonwls4-May-08 22:04
cocoonwls4-May-08 22:04 
QuestionHow to intercept Rapidshare file download in WebBrowser control? Pin
Anindya Chatterjee4-May-08 21:39
Anindya Chatterjee4-May-08 21:39 
AnswerRe: How to intercept Rapidshare file download in WebBrowser control? Pin
Vikram A Punathambekar4-May-08 23:14
Vikram A Punathambekar4-May-08 23:14 
GeneralRe: How to intercept Rapidshare file download in WebBrowser control? Pin
Anindya Chatterjee4-May-08 23:36
Anindya Chatterjee4-May-08 23:36 
GeneralRe: How to intercept Rapidshare file download in WebBrowser control? Pin
Vikram A Punathambekar5-May-08 0:07
Vikram A Punathambekar5-May-08 0:07 
QuestionThis application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. Pin
Member 39190494-May-08 21:05
Member 39190494-May-08 21:05 
AnswerRe: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. Pin
Christian Graus4-May-08 21:10
protectorChristian Graus4-May-08 21:10 
GeneralRe: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. Pin
Member 39190494-May-08 21:33
Member 39190494-May-08 21:33 
GeneralRe: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. Pin
Christian Graus4-May-08 22:55
protectorChristian Graus4-May-08 22:55 
GeneralRe: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. Pin
S. Senthil Kumar5-May-08 4:40
S. Senthil Kumar5-May-08 4:40 
GeneralRe: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. Pin
Member 39190495-May-08 17:00
Member 39190495-May-08 17:00 
GeneralRe: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. [modified] Pin
Member 39190495-May-08 17:31
Member 39190495-May-08 17:31 

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.