pcPirate Posted October 14, 2003 Posted October 14, 2003 Hi, In C# i) Is there anyway to input value on particular cell in datagrid in the coding? ii) How do I save the contents of the datagrid back to database? iii) I've made a custom datagrid myself, with button on column. However, what I really want is actually a textbox with button in one column. Is there any example regarding that? Pls advise. Thanks in advance. pcPirate. Quote Be you his eunuch, and your mute I'll be: When my tongue blabs, then let mine eyes not see.
AlexCode Posted October 14, 2003 Posted October 14, 2003 I think you're missing the datagrid point here... The datagrid is intended to be connected to a datasource... So, (1) if you want to write something on a certain cell, by code as you told, you just have to go to that datasource and input the data you want. (2) Following the logic of what I just told you on (1), the data have to be already on some datasource, it doesn't have to be a database, it can be a collection... So you have to implement the correspondent methods to save your data (If your using DataSets use the DataAdapter for example) (3) Here I can't help you... :) sorry Quote Software bugs are impossible to detect by anybody except the end user.
Moderators Robby Posted October 14, 2003 Moderators Posted October 14, 2003 1) I can think of many reason for this, a calculation or a condition is met so you update the grid through code,,,, 2) You can use the DataAdapter's Update command for this. (commandBuilder) 3) I only know for web controls, sorry. Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.