No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
6 Posted Topics
Re: > is there any way that when I enter a new company and press save icon, the combobox will update automatically ? simplest way to do it is: in the click event of the save button repopulate the combobox or you could check if the datasource has changed and if … | |
Re: > I have a sql statemente but I don't want to display all info in the gridview (c# webforms). How to bind specific columns at runtime on gridview? create a datatable and populate it with the columns you need Ex: > I have a sql statemente but I don't want … | |
Re: Add this to your button event [CODE] DataRow dr, drt; DataGridViewSelectedRowCollection myRow = dataGridView1.SelectedRows; DataGridViewRow row = dataGridView1.SelectedRows[0]; int yourRowPosition = dataGridView1.SelectedRows[0].Index; foreach (DataGridViewRow r in myRow) { int yourId = int.Parse(dtCommand.Rows[yourRowPosition][0].ToString());//or whatever the positon of id is deleteEntryFromDB(yourId); dr = (row.DataBoundItem as DataRowView).Row; dtCommand.Rows.Remove(dr); } [/CODE] where [CODE] public … | |
Re: i had a similar problem with a drop down list. My problem was if the user didn't change the ddl it didn't return any values, although the ddl was propperly populated I used something like [CODE] if(shippingSelection.SelectedValue != 0) { shippingId = shippingSelection.SelectedItem.Value; } else { shippingId = 1; //or … | |
Re: you could use ValidateRequest= false | |
Re: have you tried [CODE] private void DataGrid1_UpdateCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e) { string yourTextValue = ((TextBox)e.Item.Cells[1].Controls[1]).Text; } [/CODE] |
The End.