Click here to Skip to main content
15,886,774 members

Comments by Jibesh (Top 200 by date)

Jibesh 21-Jan-23 0:10am View    
Adding more clarity to Grants answer.

You might be still getting an exception.

 
         catch (Exception ex)
                {

                    tbMessage.Text = ex.ToString();

                } // "Label Table Failed"
                conn.Close();
            }
        }

        tbMessage.Text = "Data Saved"; /// 


But message got overwritten by the statement
tbMessage.Text = "Data Saved"

if you still want to report "Data Saved" message

remove it from here and add as last statement inside the try {} block
eg: after
cmd.ExecuteNonQuery();
conn.Close();
tbMessage.Text = "Data Saved"; 
}
catch (Exception ex)
                {

                    tbMessage.Text = ex.ToString();

                } // "Label Table Failed"
                conn.Close();
            }
        }
     
        btnSave.Enabled = false;
Jibesh 15-Dec-13 14:05pm View    
improving the timeout value is not always a good option. I would suggest you to fine tune your SQL query which pulls the data for the first page only.

you can adapt something like this:
1. Getting the total rows count is faster than getting all the row data
2. have the grid pagination implemented in your screen and sql query
3. use the Page number and number of records per page to filter your data query from the sql data base
Jibesh 14-Oct-13 19:52pm View    
make sure that the property is public and you build the control after making the changes and try getting the properties in your client control or class.
Jibesh 14-Oct-13 19:49pm View    
listview does support a property called .SelectedIndex check following URL. try writing the code and compile to see it works or not. Visual Studio somestime may not display intellisense.

http://msdn.microsoft.com/en-us/library/system.windows.controls.primitives.selector.selectedindex.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1
Jibesh 17-Mar-13 15:18pm View    
Do not post commercial link/solution as an answer to a question unless otherwise OP has requested for it. Also why you answered for an old question which is already solved.