hi all i tried to find the existing sqlservers in the network, Eammonn Murray's article helped me to find the existing sql servers, but it didnt deducted the existing databases in the network, can any body help . Thanks in adv
kssk
hi all i tried to find the existing sqlservers in the network, Eammonn Murray's article helped me to find the existing sql servers, but it didnt deducted the existing databases in the network, can any body help . Thanks in adv
kssk
hi darkelv just i tried that , it also takes exactly 6 seconds. If i ignore that i am experiencing the same trouble in DataGridview combobox column. Can u tell me how to overcome that . Thank u for ur quick response kssk
senthil
hi I am using a combobox to load items using datatable. i am using sqlserver2005.when i tried to load a count of 32500 rows in a combobox , my application hangs more than for 5 min. Any body give me solution. Below is my code: private void _popItemCombo() //To load itemcode combobox { clsGrpObj = new clsGroupManip(); clsDataAccObj = new clsGloDataAcces(); //code to populate datatable Item table dtItem = new DataTable(); //stores item * datas dtItem = clsGrpObj._selItem_Assembly(); for (int i = 0; i < dtItem.Rows.Count - 1; i++) { string item = dtItem.Rows[i]["ItemCode"].ToString(); cmbItemCode.Items.Add(item); // code to pop combobox with datas. } }
help me, Thank u
kssk
hi can any body help me how to populate a DGV combobox column with datas from a datatable. // create a combobox column DataGridViewComboBoxColumn comboboxColumn; comboboxColumn = _createComboBoxColumn(); comboboxColumn.HeaderText = "Item"; dataGridView1.Columns.Insert(0, comboboxColumn); //Tried to populate data as below , but not successfull BindingSource s = new BindingSource(); s=dtItem.Columns["Item"].ToString(); comboboxColumn.DataSource = s;
thank you in advance ssk
senthil
hi mustafa assalamu alaikum my need is even though its a disabled contrl it should look like normal. i am beginner , can u tell me in detail thanku ssk
ssk
hi help me how to change the color of a readonly textbox and a Disabled combobox contrl to look like a normal one. comboBox1.Enabled = false; comboBox1.BackColor = System.Drawing.Color.Yellow;
senthil
hi aamir i too did so , its working . Thank u for responding me. kssk
senthil
hi all i have a form with First,Next,Prev,Buttons. i had populated a datatable with datas .Now i need to navigate through the records , can any body help me how to achieve this. conn = new SqlConnection(connstr); conn.Open(); SqlCommand cmd = new SqlCommand(sqlAllCustomers, conn); SqlDataAdapter adpt = new SqlDataAdapter(cmd); DataTable dtCust1 = new DataTable("CustomerDatTab"); adpt.Fill(dtCust1);
thanks
senthil
hi all i want to show a column value from datatable.I tried as below . it doesnt shows the values. pls help. SqlDataAdapter adpt = new SqlDataAdapter(cmd); DataTable dtCust1 = new DataTable("CustomerDatTab"); adpt.Fill(dtCust1); dataGridView1.DataSource=dtCust1; //datagrid shows data. DataRow dr = new DataRow(); foreach (DataRow dr in dtCust1.Rows) comboBox1.Items.Add(dr.ToString()); //the below code also didnt works. i tried in the below way also //comboBox1.DisplayMember = "CompanyName"; //for (int i = 0; i < dtCust1.Rows.Count - 1; i++) //comboBox1.Items.Add(dtCust1); //comboBox1.DataSource = dtCust1.DefaultView;
thank u
senthil
HI , i want to know how to create a class which has an INSERT method for several forms. for example: i have 3 forms , FORM1,FORM2 FORM3. FORM1 has 3 textboxes. FORM2 has 7 textboxes . FORM3 has 20 textboxes. Each textbox contrl has datas with differen datatypes.i want to create a common class with INSERT method which inserts data in different table for its corresponding calls made by every forms. i had already done this task but seperate INSERT methods for individual forms. now if i try to user a common insert method for the 3 form with diff contrls and datatypes, i cant get a clear idea to accomplish this task. can anybody give me solution. thanks
KSSK
ya its working. but one doubt, if i need this same task to be done without creating a button and setting its property to cancelbutton means , how ? dont think i am irritating u
senthil
can u tell in detail. i am a beginner. i never used the Cancelbutton of a form thanks
senthil
hi my code is not working .can any one suggest me. private void Form1_KeyPress(object sender, KeyPressEventArgs e) { if(e.KeyChar==(char)27) { this.Hide(); } }
ssk
hi all, any body pls help me to solve my problem. Though my code is right (i feel) i couldnt achieve the result i expect , i tried in all means, any one pls solve my headache!. private void DataGrdVw1_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) { string CurrentSelValue; CurrentSelValue = DataGrdVw1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); txtAreaName.Text = CurrentSelValue; }
it doent works!. i tried with cell mouse down event also no use. private void DataGrdVw1_CellMouseDown(object sender,DataGridViewCellMouseEventArgs e) { this.GrdText.Text = DataGrdVw1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); }
i need to show the current cell s text in a text box when the datagridview's cell is clicked with mouse, or arrow keys pls help kssk
KSSK
hi i have a datagridview contrl which populates a column from table thru dataset. when i click, or browse through arrow keys , the current cells items should be shown in textboxes for edition.(the selected cell item is key value, i pass it to storedproc and select its other fields to show in textboxes) i had did this through a button click as follows private void button1_Click(object sender, EventArgs e) { dsGridToTxtBx = obj._selectGridCellAreaDetails(DataGrdVw1.CurrentCell.Value.ToString()); { AreaIdValue = dsGridToTxtBx.Tables[0].Rows[0].ItemArray[0].ToString(); //here retrieved other fields are displayed in two text boxes txtAreaName.Text = dsGridToTxtBx.Tables[0].Rows[0].ItemArray[1].ToString(); //textbox1 txtRegion.Text = dsGridToTxtBx.Tables[0].Rows[0].ItemArray[2].ToString();//textbox2 } }
also i tried like this but this doesnt works? :doh: private void DataGrdVw1_CellClick(object sender, DataGridViewCellEventArgs e) { string CurrentSelValue; CurrentSelValue = DataGrdVw1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); txtAreaName.Text = CurrentSelValue; }
i would thank if anybody gives me solution kssk
kssk/div>
hi can u pls help me how to trace the DataGridview's cell click event. thnks
senthil
i think u didnt understand my exact problem. My problem is not hiding or making my MDIparent as visible. I have two forms FORM1 ,FORM2. FORM1 is MDIParent. FORM2 is Loginform i have a menustrp in FORM1(MDIParent).That menustrip should be invisible till the user enters the correct password(I had checked it in my code) in the FORM2(Login form), so if the passwd is correct menustrip should be visible! Hope now u can give me right idea.
senthil
hi i am creating a login page.Inthe form load itself i need to hide the MenuStrip in MDI Parent to HIDE, When the users gives the correct passwd and pushes the Loginbutton , My MDIParent1 forms menustrip should be visible . c my code . but it doesnt works. Any body pls clear my doubt. private void LoginForm_Load(object sender, EventArgs e) { mdifrm = new MDIParent1(); mdifrm.menuStrip.Visible = false; }
I had created formobj mdifrm and made it visible false on load. :doh: this also not works. private void btnLogin_Click_1(object sender, EventArgs e) { if (strPasswd == dsUsers.Tables[0].Rows[0].ItemArray[0].ToString()) { this.mdifrm.menuStrip.Visible = true; this.Hide(); } else { MessageBox.Show("Incorrect Password","Error",MessageBoxButtons.OK,MessageBoxIcon.Error); } }
thanks in adv kssk :doh:
senthil
hi all i have two forms FORM1 and FORM2.and form1 has two buttons. when buttons B1,B2 is clicked in FORM1, FORM2 should appear, but i need to trace which button is clicked .so that i want to display dfferent controls in FORM2 accordin to button click. Any body give some tips I am trying to trace the "event e" in the FORM2 's load event. pls help
senthil
sorry i actually never meant to repost to make it visible at top! it was my net problem. since when processing slowed i pressed the post button twice. kssk
senthil