قرار دادن radiobutton در header datagirdview با استفاده از کد نویسی
سلام چگونه با استفاده از کد نویسی می تونم در کنار header ستون های datagridview ، radiobutton or checkbox اضافه کنم
سوال دیگری هم داشتم می خواستم ستون ردیف به datagridview اضافه کنم با استفاده از کد زیر جواب هم گرفتم ولی مشکلی که داشت این بود که این ستون ردیف را به انتهای datagridview اضافه می کنه چه کار کنم که به عنوان اولین ستون قرار بگیره
private DataTable AutoNumberedTable(DataTable SourceTable)
{
DataTable ResultTable = new DataTable();
DataColumn AutoNumberColumn = new DataColumn();
AutoNumberColumn.ColumnName = "ردیف";
AutoNumberColumn.DataType = typeof(int);
AutoNumberColumn.AutoIncrement = true;
AutoNumberColumn.AutoIncrementSeed = 1;
AutoNumberColumn.AutoIncrementStep = 1;
ResultTable.Columns.Add(AutoNumberColumn);
ResultTable.Merge(SourceTable);
return ResultTable;
}
با تشکر
نقل قول: قرار دادن radiobutton در header datagirdview با استفاده از کد نویسی
سلام به دوستان برنامه نویس کسی نیست که بگه چگونه می تونم به سطر datafridview،headertext
radiobutton یا checkbox اضافه کنم
که کاربر با انتخاب radiobutton یا checkbox فیلدی را که انتخاب کرده بر اساس آن جستجو کنه
نقل قول: قرار دادن radiobutton در header datagirdview با استفاده از کد نویسی
با سلام به دوستان آیا راهی هست که بشه به سطر headertext مربوط به checkbox ،datagridview اضافه کرد
نقل قول: قرار دادن radiobutton در header datagirdview با استفاده از کد نویسی
نیازی به اضافه کردن radiobutton وغیره نیست شما برای اینکه بدونید کاربر جستجو رو بر اساس چه فیلدی می خواهد فقط کافی که ببینید جه ستونی رو عمل sort انجام داده و این یک روش عمومی برای اینکار می باشد یعنی باید در رویداد ColumnHeaderClick گرید خودت بفهمی که کاربر روی چه ستونی اینکار رو می خواهد انجام بدهد
در مورد اضافه کردن ستون ردیف فقط کافیه مقدار dataGridView1.Columns[n].DisplayIndex اون ستون رو مقدار صفر یا هر شماره ای که می خواهی در گرید نمایش داده بشه قرار بدهی
نقل قول: قرار دادن radiobutton در header datagirdview با استفاده از کد نویسی
سلام دوست عزیز با تشکر از راهنمایی شما در مورد جواب اول شما کاربر وقتی بر روی ColumnHeaderClick کلیک می کنه رنگ اون و بزرگنمایی اون تغییر پیدا می کنه و من با توجه به شماره ستون عملیات search را انجام میدهم
حالا می خواستم ببینم آیا امکان داره radiobutton or checkbox (البته نظرم بیشتر checkbox)قرار دهم که کاربر با انتخاب یک یا دو یا چند ستون عمل جستجو ر انجام دهد
و سوال دیگر هم این است زمانی که عمل search انجام می شود و رکورد مورد نظر در datagridview را با رنگی مشخص کردم نمایش داده می شود آیا امکان دارد مثلثی که در ستون اول قرار دارد در همان سطری قرار گیرد که رکورد مورد نظر یافت شده است
در ضمن جواب سوال اول را هم پیدا کردم ولی باز هم تشکر