TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
jigar patel
NA
93
3.5k
Treeview node click retrive image from folder and imagepath
May 29 2017 3:07 AM
hello all of u,
i create simple desktop application in c# , which I use treeview , picturebox, datagridview.
i use storeprocedure in sqlserver 2005.
i use simple query in stored procedure and when i click on treenode then releted data show in datagrid and image show in picturebox.
please help me.
my source code giveb below, and i get data in datagridview but image not show in picturebox please help me.
thank you.
What I have tried:
my stored procedure:-
1) ALTER PROCEDURE [dbo].[FatchDatafromTreeView]
@ChallanType varchar(50),
@Challan_Series_No varchar(50),
@ItemNo int
AS
BEGIN
SET NOCOUNT ON;
SELECT ItemNo,ItemCode,ItemDescription,SupplierCode,SupplierName,Unit,ItmQty,PriceQuantity,PriceUOM,PhotoId,Main_Ch_Key,Approve,Balance_Qty,InTime_Approve,ItemImage from ChallanMaster where ChallanType=@ChallanType and Challan_Series_No=@Challan_Series_No and ItemNO=@ItemNo
my c# code:-
treeview afterselect click event--
private void tv_inward_mat_chk_AfterSelect(object sender, TreeViewEventArgs e)
{
SqlConnection con = new SqlConnection(str);
con.Open();
SqlCommand cmd = new SqlCommand("FatchDatafromTreeView", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@ChallanType",cmb_ChallanType.Text);
cmd.Parameters.AddWithValue("@Challan_Series_No",cmb_Challan_Series_No.Text);
cmd.Parameters.AddWithValue("@ItemNo",Convert.ToInt32(tv_inward_mat_chk.SelectedNode.Text));
SqlDataAdapter sda = new SqlDataAdapter(cmd);
DataTable dt=new DataTable ();
sda.Fill(dt);
dgv_inward_mat_check.DataSource = dt;
con.Close();
}
Reply
Answers (
1
)
Error when redirect page
basic Fundamental of .net