Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

Be you his eunuch, and your mute I'll be:

When my tongue blabs, then let mine eyes not see.

Posted

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

Software bugs are impossible to detect by anybody except the end user.
  • Moderators
Posted

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.

Visit...Bassic Software

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...